Author Topic: Top Stats on tmtest  (Read 16123 times)

0 Members and 2 Guests are viewing this topic.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2856
  • Last Login:Yesterday at 09:42:37 pm
Top Stats on tmtest
« on: May 31, 2020, 10:38:22 pm »
Early work on a "Top Stats" page, similar to what used to exist on CHM, is now on tmtest.

Go to http://tmtest.teresco.org/user/topstats.php to see what's there so far.  I hope to have time on Monday to add more.  I don't promise I won't be breaking it as I add features.  I'm focused mostly on getting the stats on the page for now, haven't thought much about presentation yet (so it's ugly).

Offline mapcat

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1767
  • Last Login:Yesterday at 09:47:09 pm
Re: Top Stats on tmtest
« Reply #1 on: May 31, 2020, 11:18:47 pm »
Thanks for working on this! I like what you've done with it so far.

A few ideas:
  • Cut off the tables when there aren't enough routes to fill them. I selected Alberta, and kept the default 25 entries, and my "most traveled" table had the 20 I had traveled plus 5 random ones with 0 miles. The clinched route table showed only the routes I'd clinched, so that one worked.
  • Include only connected routes that exist in the selected region. My Alberta tables had interstates and US highways on them. I see the disclaimer next to the region drop-down in the table, so you know about this, but even with the disclaimer, I don't understand why these are showing on every page. Maybe the user should have to choose between region and connected routes?
  • The CHM tables included one that showed the non-clinched routes with the shortest missing mileage, which would be helpful for identifying segments that users may have forgotten to enter, or would want to go back to finish off.
Is there a limit to the max entries per table?
Clinched:

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4422
  • Last Login:November 11, 2024, 12:50:03 pm
  • I like C++
Re: Top Stats on tmtest
« Reply #2 on: June 01, 2020, 12:47:14 am »
Clicking on "US2 (New York - Maine)" takes me here.
It's appropriate with the features currently available, but a way to view connected routes in mapview would be good.
I had a go at waypoints.js.php back in November, but didn't get too far with it; a lot of moving parts to wrap my head around.
That file undergirds the HB too, so once the right changes are in place, we're most of the way to having ConnectedRoutes in the HB, yes?
Sri Syadasti Syadavaktavya Syadasti Syannasti Syadasti Cavaktavyasca Syadasti Syannasti Syadavatavyasca Syadasti Syannasti Syadavaktavyasca

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2856
  • Last Login:Yesterday at 09:42:37 pm
Re: Top Stats on tmtest
« Reply #3 on: June 01, 2020, 08:25:39 am »
Cut off the tables when there aren't enough routes to fill them. I selected Alberta, and kept the default 25 entries, and my "most traveled" table had the 20 I had traveled plus 5 random ones with 0 miles. The clinched route table showed only the routes I'd clinched, so that one worked.

Just fixed it.

Quote
Include only connected routes that exist in the selected region. My Alberta tables had interstates and US highways on them. I see the disclaimer next to the region drop-down in the table, so you know about this, but even with the disclaimer, I don't understand why these are showing on every page. Maybe the user should have to choose between region and connected routes?

I think ultimately, I'll have the option as you mention to think about connected routes or in-region only.

Quote
The CHM tables included one that showed the non-clinched routes with the shortest missing mileage, which would be helpful for identifying segments that users may have forgotten to enter, or would want to go back to finish off.

Definitely on my list.

Quote
Is there a limit to the max entries per table?

Currently set to 500 but other than the fact that the tables would be huge, there's no reason I couldn't make it larger.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2856
  • Last Login:Yesterday at 09:42:37 pm
Re: Top Stats on tmtest
« Reply #4 on: June 01, 2020, 08:28:37 am »
Clicking on "US2 (New York - Maine)" takes me here.
It's appropriate with the features currently available, but a way to view connected routes in mapview would be good.
I had a go at waypoints.js.php back in November, but didn't get too far with it; a lot of moving parts to wrap my head around.
That file undergirds the HB too, so once the right changes are in place, we're most of the way to having ConnectedRoutes in the HB, yes?

waypoints.js.php was modeled after CHM's mechanism for getting DB info.  Scrollable Mapview and this page don't use it.  I think it's OK for the HB, but wasn't a good choice for original Mapview, parts of HDX, and some other things that use it.  It's been mangled to handle lots of cases for which the model it uses is not great.  I'm hoping to move more code away from waypoints.js.php and into AJAX calls to query the DB on demand.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2856
  • Last Login:Yesterday at 09:42:37 pm
Re: Top Stats on tmtest
« Reply #5 on: June 01, 2020, 12:11:27 pm »
It also occurs to me that there should be options here to choose active only, active+preview, or maybe even include devel (though I hesitate to do the last as it risks encouraging people to start plotting devel routes even before they go from devel to preview, a step that usually happens pretty quickly).

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4849
  • Last Login:November 20, 2024, 11:21:09 am
Re: Top Stats on tmtest
« Reply #6 on: June 01, 2020, 12:45:24 pm »
Please don't include devel routes!

Since we distinguish between active and active+preview all over the user pages, we should do the same here.

(I don't like the general policy but we should be consistent)

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2856
  • Last Login:Yesterday at 09:42:37 pm
Re: Top Stats on tmtest
« Reply #7 on: June 01, 2020, 05:06:24 pm »
Various improvements plus "closest to clinched" tables are up.  Keep letting me know if you see anything broken.

Offline mapcat

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1767
  • Last Login:Yesterday at 09:47:09 pm
Re: Top Stats on tmtest
« Reply #8 on: June 01, 2020, 07:13:23 pm »
Changing the username in the options box correctly delivers stat tables for that user, but doesn't change the username in the URL. So when you select a route from one of the tables, you will get a map for a different user.
Clinched:

Offline ntallyn

  • TM Collaborator
  • Sr. Member
  • *****
  • Posts: 337
  • Last Login:October 31, 2024, 08:04:24 pm
Re: Top Stats on tmtest
« Reply #9 on: June 01, 2020, 09:04:54 pm »
I took a look at my stats, and went looking for the missing 0.54 miles of I-526, so I clicked on the route.

The system displayed I-526, I-526BS, and FutI-26 all on the map viewer (which is fine), but connected the ends of the routes with each other. So there's an extraneous segment from the west end of I-526 to the south end of I-526BS, and another one from the north end of I-526BS to the west end of FutI-526.

Incidentally, that only happens when the username (u=ntallyn) is not specified in the URL. Once I added that, I saw the map that I expected.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2856
  • Last Login:Yesterday at 09:42:37 pm
Re: Top Stats on tmtest
« Reply #10 on: June 02, 2020, 08:39:46 am »
A few thoughts and questions on this.

- I am not planning to reproduce lists you can find on other pages like regions and systems ranked by travels (on the main user stats page).

- Would it make more sense to put the functionality currently in topstats.php right onto the user stats pages, or keep it on a separate page?  I'm thinking to keep it separate but with a link to it from the user stats page.

- I'd also like to have more stats based on all users of the project overall (and seem to recall CHM doing some of that), and opened an Issue for this: https://github.com/TravelMapping/Web/issues/452

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2856
  • Last Login:Yesterday at 09:42:37 pm
Re: Top Stats on tmtest
« Reply #11 on: June 02, 2020, 10:45:50 am »
Since this is independent of other parts of the site, I see no reason to keep it hidden over on tmtest.  It's merged into the master branch on GitHub and on the production site.  There's also a link at the top of the user stats page.

Please make report any lingering errors and make feature suggestions in new Issues or forum topics.

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4849
  • Last Login:November 20, 2024, 11:21:09 am
Re: Top Stats on tmtest
« Reply #12 on: June 02, 2020, 11:04:15 am »
Whatever I select, I never get any stats.

region is not selectable on start but later on.

Example:
1. http://travelmapping.net/user/topstats.php?units=km&u=michih
2. Select Andorra system
3. Press Update Stats

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2856
  • Last Login:Yesterday at 09:42:37 pm
Re: Top Stats on tmtest
« Reply #13 on: June 02, 2020, 11:09:53 am »
Whatever I select, I never get any stats.

region is not selectable on start but later on.

Example:
1. http://travelmapping.net/user/topstats.php?units=km&u=michih
2. Select Andorra system
3. Press Update Stats

Region is not selectable when you are using connected routes.  Switch to in-region and you can select a region.

When I do your example, I get stats.  Can anyone else reproduce michih's error?

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4849
  • Last Login:November 20, 2024, 11:21:09 am
Re: Top Stats on tmtest
« Reply #14 on: June 02, 2020, 11:17:53 am »
http://tmtest.teresco.org/user/topstats.php?units=km&u=michih works pretty fine! but not the production site.