How is city completion percent calculated?

Hi @JamesChevalier, I couldn’t find this mentioned… I intend to run the full length of each street by visually inspecting my lifetime map, and I am curious how well the city completion percent maps to that goal.

I imagine it’s calculated by the first or second of these:

  1. completed divided by total nodes within city
  2. completed divided by total streets within city (treating streets not contained within city limits as if only nodes in the city count?)
  3. distance covered divided by total street distance within city (ideal but unlikely without interpolated nodes)

Or something else?

BTW, thank you infinitely for your work on this project! I only wish my feet would carry me further!

2 Likes

I’m glad you’re enjoying it so much!

The calculation is the rounded out result of:
(number_of_streets_you_completed / number_of_streets_in_city) * 100

At this level, the code doesn’t care about nodes at all.

The layer prior to this - street completion/progression - is what cares about nodes. If you run 90%+ of the nodes of a street, then it’s marked as complete.

3 Likes

Ah, I see. How is a street that crosses a border handled? It seems that formula could both allow substantial progress by covering the shortest streets and ignoring the longest ones (maybe not a big deal in practice, but certainly implies hitting every tiny offshoot street would be “worthwhile”) … but then completing a street might require running far beyond a city limit if it’s a long street? Or the street is treated as if it ends at the city limit?

Thank you!

I’m somewhat certain that the nodes for a street that runs through multiple cities will be self contained in each city that has that street.
The best way to check this would be to visit a city page, find a street that you know extends into the next city, select it so its nodes are displayed map, and check to see if they extend into the next city. I don’t think they will.

2 Likes

@charlie Streets are definitely broken up by city, even if they cross boundaries. In some very rare cases there is bad data, and a node may lie outside the city limits. But this is pretty rare.

And yes, doing tiny streets nets you a much quicker % completion, but won’t get you to 100 % without doing the long ones. Vancouver is terrible for that. Nearly all the major streets cross the ENTIRE city and take multiple runs (or 50 km runs) to complete.

3 Likes

Thanks guys, I had not checked yet, but it makes sense for this data model.

I am slightly conflicted now, as I still intend to complete all the streets 100% as a goal, visually, but knowing how the calculation works, I am sure I will start subconsciously or consciously targeting areas where I can hit many smaller streets! At least I have to run them all eventually…

Having a % of nodes within city completed would be cool. And having a % of street-miles completed would be even cooler, but as mentioned, that would require some work on the nodes and interpolation I assume.

Thanks!

1 Like

If I’m in the lead in a city, like I am in Burnaby, then I like to work on regions rather than worrying about completion. If I’m racing someone for % completion then I do try to hit lots of neighbourhoods that have smaller nodes :smiling_imp:

1 Like

LOL, i am more or less alone who is hardcore running in this region here. And no milion citizen city of such. Just 300-500+ streets per city and one biggie with 1200. I just work neighbourhood by neighbourhood. From closeby till i have had enough. We’ll see where it ends.

1 Like

@JamesChevalier I’m wondering why city % seems to be taking days and days to update? Seems like something that would be calculable on the fly, but it’s extremely slow, even after an activity’s streets are flagged as complete.

Thoughts?

I think I have some excessive caching that’s not handled properly… that’ll be a good weekend hack/fix!

Happy New Year!

Early today I manually completed some buildings / streets where I ran all of the truly available nodes where I’ve already flagged the streets so they can eventually be cleaned up, but my completion percentage for the city has not budged. Are manually completed streets treated differently than node-based completions, or do I just have to wait longer? Thanks! :slight_smile:

It might just be the cache that’s holding things up from being displayed properly. There’s also a bit of a queue so some jobs might be delayed.
I’ll check on your flagged streets later today.

James - my completion percentages are now correct for both of the cities I’ve run in recently. Did you do something late on 01/02 to facilitate that or was it really just waiting out the cache? Thanks!