This is intended to be a complete guide for using text entry for custom queries for the places that allow that, such as the table view of your activities, the power curve chart and the mobile activities page.
The are two types of queries. Text queries simply look for activities that have titles, descriptions or activity types that contain the entered text. For example, richmond will find all the activities that have titles like “40km around Richmond”. Searching by activity type is less needed now that there is a drop down type filter, although the drop down filter always filters rather than giving the option of highlighting matched activities.
Logical queries are the second type of query, which evaluate based on activity summary data. For example, distance > 40 finds all activities with a distance greater than forty kilometers or miles, depending on your preferred units. The system automatically detects whether it’s a text or logical query. Here are the available variables and functions:
duration, total_time, moving_time — Times are in seconds, e.g., duration > 7200 is activities longer than two hoursdistance — Distance, speeds and climbing are in your preferred unitsclimbingworkepowerintensityvariabilityloadtrimppwc150, pwc170pwc_r2lrbalanceavg_cadence, avg_speed, avg_heartrate, avg_powermax_cadence, max_speed, max_heartrate, max_poweryear, month — 1–12, day — 1–31day_of_week — 1–7 for Monday to Sundaytime_of_day — 24 hour time as a decimal number, e.g., time_of_day < 8.30 is before 8:30am or time_of_day > 18.00 is after 6pmtype — 'cycling', 'running', 'gym' etc., see the ride object below for more detailssubtype, purpose — See the ride object belowpower_curve(time), epower_curve(time) — Power curve and effective power curve, enter time in seconds, e.g., power_curve(1200) > 300 is rides with a 20 minute power above 300Wtext(string) — Matches when the string is contained in the title or description, case insensitive, e.g., text('richmond')near(lat, lng, [distance]) — Matches when the GPS path goes near the given point, see below for more detailslike(ride_id) — Matches when the GPS path is similar to the given activity, see belowhas — An object that can be used like has.power or has.heartrate, see the ride object below for more detailsride — A ride object like thisnear(lat, lng, [distance]) finds activities that go near a given point, e.g., near(-37.995, 145.037) or near(-37.8048, 145.0239, 0.05). One way to use this is to go into Google Maps, right click on the map and click on the GPS coordinates to copy them and paste that into this. distance is an optional parameter that determines how close the point has to be to the path to match. It is in kilometers and is 1km if not specified. This uses a simplified version of the full GPS path that is increasingly simplified for longer activities so it may not find all activities if the distance is too low.
like(ride_id) finds activities that have a similar route to the given activity, e.g., like(469126681983). The ride ID can be found by selecting “ride ID” in the fields drop down on this page, and is also the number in the URL for a ride page. Similarity is based on the GPS path being similar and distance also being similar. Direction isn’t presently taken into account, so the direction of riding a loop doesn’t matter. Ride ID must be for one of your own activities. If you want more control over what is matched, consider using near and distance instead, e.g., distance > 40 && distance < 45 && near(-37.97391, 145.01472).
<, <=, ==, !=, >= and > are available to make comparisons. && (and) and || (or) are available to create multi-part queries. ( and ) brackets are also available to control precedence. For example:
year == 2024 && like(...) shows all the activities in 2024 that match a particular routedistance > 50 && power_curve(900) >= 300 shows all activities longer than 50km (or miles) with a 15 minute power at least 300WOnce a filter is applied, the table can be sorted by any visible column, a summary of the filtered activities is available, filtered activities can be mass edited or downloaded or deleted, and the table data can be exported as CSV data for further analysis in other programs like Excel.
This is the blog of Cycling Analytics, which aims be the most insightful, most powerful and most user friendly tool for analysing ride data and managing training. You might be interested in creating an account, or following via Facebook or Twitter.