Cumulative miles for any run in a city that completes a node

So I am doing a presentation at the IMT Des Moines Marathon expo in a few weeks and I’m trying to figure out a way to determine a way to calculate all of the miles that I ran to complete any node in a city that I have at 100%. I only want to include runs that had at least one node completed on them. So if a run was 10 miles and 1 node was completed I want to count +10 miles. If there were no new nodes ran then don’t count that run towards the total. Any ideas on how to gather this information? I have runs all the way back from 2012 that count towards this city and I completed it in February of 2021. I’d also be interested in the number of runs it took me to complete the city. I have the estimate of the number of miles in the city from the streets department.

Before I post a few links, I kinda remember reading something about OSM not knowing the concept of distance, which makes no sense, as it knows about GPS coordinates, and from that you can get distance… But similar ideas have come up. There may be more, but these are the ones I remember:

This is the idea that specifically talks about why it’s hard to do:

The data I want should all be within the City Strides database. Any node completed within a city add that run to a list and total all of the miles ran. I don’t care if it is only 1 node or 100 nodes. Both of those count as activities to complete a city. I may have ran 7 miles to complete one street. Hope this is making sense.

1 Like

If I’m remembering correctly, @JamesChevalier would have to write the code to compute distance, from the coordinate data at OSM.

Other sites that use OSM do their own calculations. Routing is not a feature at OSM either (although there are distance tags). You can do some searches, at the OSM help page for more info. I used “distance calculation” as my query, and got more reading than I could handle.

Edit: Just thought of something else. What GPS device, or service, do you run with? Maybe they have the option to filter and compute distance?

I have used Strava and Garmin to import to City Strides in the past. Strava should have all of the data as a common source. The hard part for me is to know what runs actually completed a node in the town. If I could get that list I could take the data dump from Strava and calculate distance on my own, but CS should also know that data. Take for instance my last run that completed Des Moines. February 27th, 2021, Matt Millard's Activity on February 27, 2021 - CityStrides. It completed 8 streets (I don’t see the number of nodes completed, but I thought at one time I remember seeing that somewhere) in 4 miles. I can see all of this information in City Strides as it is. All I would need is the list of runs that had either a completed or progressed street in Des Moines to get the number I’m after. I would want the distance from Strava, not OSM.

1 Like

Yeah this is all your data - I won’t need anything from OSM for this.

I think I can query for all your completed nodes within one city … grab the activity IDs from those … collect the distance on each of those and sum them up.
I can “just get it done” for you, but I’m also interested in building this out as a display on your city page … activity count, total distance, and maybe some other interesting stats.

3 Likes

That would be great. I am speaking at the IMT Des Moines Marathon expo this coming Saturday about running all the streams of Des Moines during the pandemic.

2 Likes

That would be super cool!

1 Like

Any chance I’d have this by Saturday. If not no big deal. Just thought it would be cool to have the number of miles.

Thanks for the reminder!

367 activities
2,398.9866651022903 miles (every step counts! :laughing:)
1250 streets
37,385 nodes completed
238 days of activities
409 total hours

So I suppose that means you have a 19.65 minute/street “CityStrides pace”? :rofl:

4 Likes

Awesome! Some of those surprise me but great info to add to my talk. Thanks so much!

1 Like