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

**URL:** <https://community.citystrides.com/t/cumulative-miles-for-any-run-in-a-city-that-completes-a-node/23732>\
**Category:** Ideas\
**Created:** [October 5, 2021, 11:00pm UTC](https://community.citystrides.com/t/cumulative-miles-for-any-run-in-a-city-that-completes-a-node/23732 "2021-10-05T23:00:48Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![millard.matt](https://community.citystrides.com/user_avatar/community.citystrides.com/millard.matt/32/721_2.png) [@millard.matt](https://community.citystrides.com/u/millard.matt)\
**Post date:** [October 5, 2021, 11:00pm UTC](https://community.citystrides.com/t/cumulative-miles-for-any-run-in-a-city-that-completes-a-node/23732/1 "2021-10-05T23:00:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ericjrw](https://community.citystrides.com/user_avatar/community.citystrides.com/ericjrw/32/1065_2.png) [@ericjrw](https://community.citystrides.com/u/ericjrw)\
**Post date:** [October 6, 2021, 12:13am UTC](https://community.citystrides.com/t/cumulative-miles-for-any-run-in-a-city-that-completes-a-node/23732/2 "2021-10-06T00:13:21Z")

</div>

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:

> [@Total miles in a city idea](https://community.citystrides.com/t/total-miles-in-a-city-idea/18116):
>
> Not sure if this has been mentioned or suggested before so apologies if it has. I’m not sure if the databases used for these cities have the length of each road/street that is within that city. It would be cool to finish a city and find out that all of the streets combined is say 52 miles or something like that. Would also be neat as you’re keeping track of the streets that you’ve run in a town. The percentage complete can be misleading. For example I’m working on the town of Epping NH curren…

> [@Export Run - Street Statistics?](https://community.citystrides.com/t/export-run-street-statistics/22754):
>
> I’m curious if there could be a way to export my runs including street statistics per run. The columns would be date, city, miles, streets completed, and streets progressed. That way I could track and trend in Excel what my progress looks like over time. My project will last years, so that would be a helpful feature.

> [@Stats for complete city](https://community.citystrides.com/t/stats-for-complete-city/22272/):
>
> Hi I was thinking it would be cool to get some finisher stats when you complete a city. things like total KM in city start from first node till last ranking among active striders … open to additionnel ideas what do you guys think?

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

> [@Option to order by completed street length](https://community.citystrides.com/t/option-to-order-by-completed-street-length/20054):
>
> Rather than search by name, ordered alphabetically, add an option to order completed streets by length (physical distance ideally, or number of nodes, which may be easier)

---

<div class="post-metadata">

**Author:** ![millard.matt](https://community.citystrides.com/user_avatar/community.citystrides.com/millard.matt/32/721_2.png) [@millard.matt](https://community.citystrides.com/u/millard.matt)\
**Post date:** [October 6, 2021, 1:52pm UTC](https://community.citystrides.com/t/cumulative-miles-for-any-run-in-a-city-that-completes-a-node/23732/3 "2021-10-06T13:52:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ericjrw](https://community.citystrides.com/user_avatar/community.citystrides.com/ericjrw/32/1065_2.png) [@ericjrw](https://community.citystrides.com/u/ericjrw)\
**Post date:** [October 6, 2021, 2:20pm UTC](https://community.citystrides.com/t/cumulative-miles-for-any-run-in-a-city-that-completes-a-node/23732/4 "2021-10-06T14:20:19Z")

</div>

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](https://help.openstreetmap.org/) 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?

---

<div class="post-metadata">

**Author:** ![millard.matt](https://community.citystrides.com/user_avatar/community.citystrides.com/millard.matt/32/721_2.png) [@millard.matt](https://community.citystrides.com/u/millard.matt)\
**Post date:** [October 6, 2021, 2:46pm UTC](https://community.citystrides.com/t/cumulative-miles-for-any-run-in-a-city-that-completes-a-node/23732/5 "2021-10-06T14:46:32Z")

</div>

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](https://citystrides.com/activities/20984637). 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.

---

<div class="post-metadata">

**Author:** ![JamesChevalier](https://community.citystrides.com/user_avatar/community.citystrides.com/jameschevalier/32/2_2.png) [@JamesChevalier](https://community.citystrides.com/u/JamesChevalier)\
**Post date:** [October 9, 2021, 5:17pm UTC](https://community.citystrides.com/t/cumulative-miles-for-any-run-in-a-city-that-completes-a-node/23732/6 "2021-10-09T17:17:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![millard.matt](https://community.citystrides.com/user_avatar/community.citystrides.com/millard.matt/32/721_2.png) [@millard.matt](https://community.citystrides.com/u/millard.matt)\
**Post date:** [October 9, 2021, 9:02pm UTC](https://community.citystrides.com/t/cumulative-miles-for-any-run-in-a-city-that-completes-a-node/23732/7 "2021-10-09T21:02:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ericjrw](https://community.citystrides.com/user_avatar/community.citystrides.com/ericjrw/32/1065_2.png) [@ericjrw](https://community.citystrides.com/u/ericjrw)\
**Post date:** [October 13, 2021, 11:02pm UTC](https://community.citystrides.com/t/cumulative-miles-for-any-run-in-a-city-that-completes-a-node/23732/8 "2021-10-13T23:02:02Z")

</div>

> [@JamesChevalier](#):
>
> 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.

That would be super cool!

---

<div class="post-metadata">

**Author:** ![millard.matt](https://community.citystrides.com/user_avatar/community.citystrides.com/millard.matt/32/721_2.png) [@millard.matt](https://community.citystrides.com/u/millard.matt)\
**Post date:** [October 14, 2021, 9:42pm UTC](https://community.citystrides.com/t/cumulative-miles-for-any-run-in-a-city-that-completes-a-node/23732/9 "2021-10-14T21:42:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JamesChevalier](https://community.citystrides.com/user_avatar/community.citystrides.com/jameschevalier/32/2_2.png) [@JamesChevalier](https://community.citystrides.com/u/JamesChevalier)\
**Post date:** [October 15, 2021, 12:34am UTC](https://community.citystrides.com/t/cumulative-miles-for-any-run-in-a-city-that-completes-a-node/23732/10 "2021-10-15T00:34:05Z")

</div>

Thanks for the reminder!

367 activities  
2,398.9866651022903 miles (every step counts! 😆)  
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”? 🤣

---

<div class="post-metadata">

**Author:** ![millard.matt](https://community.citystrides.com/user_avatar/community.citystrides.com/millard.matt/32/721_2.png) [@millard.matt](https://community.citystrides.com/u/millard.matt)\
**Post date:** [October 15, 2021, 2:48am UTC](https://community.citystrides.com/t/cumulative-miles-for-any-run-in-a-city-that-completes-a-node/23732/11 "2021-10-15T02:48:12Z")

</div>

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