TravelMapping / Web

Web-facing tool/page development
8 stars 26 forks source link

system.php: System Stats & mileage figures #56

Closed yakra closed 8 years ago

yakra commented 8 years ago

crossposted to the tm forum

http://tm.teresco.org/user/system.php?sys=usame&u=yakra http://tm.teresco.org/user/system.php?sys=usame&u=deathtopumpkins

System Stats table: • system.php lists my mileage on usame as 2756.24/4845.83 • deathtopumpkins has mileage on usame of 2600.10/4454.29

I looked at Oscar's stats, then at all 3 of us in usanh. Different total overall mileage for all 3 of us, in both systems. I'm sure it'd be the same for any other number of site users and highway systems.

The top line, above the map, under the "Show Markers" checkbox: • Traveled mileage is slightly less (<0.1) than the number reported in the System Stats table in most cases. • Total mileage is the same for all 3 users. That's a good sign, an indication this may be the (more) "correct" figure. It mismatches the figure in usame-all.csv -- probably because the figure in system.php doesn't account for multiplexes.

To investigate this further, using the data in my "Statistics per Route" table: Sum Clinched Mileage for all routes = 2756.27. Same ballpark as 2756.17 & 2756.24. Cumulative rounding errors, yadda yadda. Sum Total Mileage for all routes = 5651.06. Same ballpark as 5650.98. Cumulative rounding errors, yadda yadda. So yes, this would confirm that multiplexes are not counted in the system.php figure.

But where & how did the figures in the System Stats table go wrong?

mapcat commented 8 years ago

Not only are the totals not matching up, but the rankings are wonky. Example:

http://tm.teresco.org/user/system.php?u=mapcat&sys=usaif

It says my rank is 24, but I checked http://tm.teresco.org/devlogs/usaif-all.csv and according to my total mileage, I should be ranked 3. User lkefct, who should be 2 based on total mileage, is ranked 14 on his usaif stats page, and oscar, who should be 1, has a rank of 11 on his stats page.

Note that since usaif-all has no total mileage column (it's broken down by state), I had to calculate totals myself. Total mileage for the system is 1204.92; oscar has 1188.41, lkefct has 1014.81, and I have 997.57.

michihdeu commented 8 years ago

I've also noticed that my ranking is often wrong compared to http://tm.teresco.org/devlogs/allbyregion.csv.

jteresco commented 8 years ago

I believe these have been addressed. Please feel free to open another issue if/when similar problems are found.