Travel Mapping

Web Design Discussion => General Web Design Discussion => Topic started by: Jim on June 25, 2024, 01:53:31 pm

Title: "Unranked" users
Post by: Jim on June 25, 2024, 01:53:31 pm
I thought we had a thread for this but I'm not seeing it.

I and several others maintain multiple .list files on TM to show our travels in specific circumstances (I have one each for my current car and my most recent car, and one for each of the last 5 years showing only my travels for that year) in addition to our lifetime travels.  We also have things like 6lane.list, which does not represent anyone's travels at all.

I've been working on a mechanism (https://github.com/TravelMapping/DataProcessing/issues/71) to indicate which of the hundreds of .list files represent something other than the travels of a specific individual. Now it's time to think about where to omit or include those users (https://github.com/TravelMapping/Web/issues/741) on various parts of the TM site.  Here are some initial thoughts.

For stat.php's list of all users ranked by miles traveled and on similar but restricted lists elsewhere, like region.php and system.php, I would like to have all of the ranks not include the unranked users, but I am less sure about whether the unranked users should be just not given a rank in the tables or omitted completely.  I am thinking keep them in the list but don't number them.

The user page would remain mostly unchanged, other than the ranks not showing up for unranked users and being calculated without the unranked users for everyone else.

Traveler counts for mapview.php (when using "Color by Traveler Count") and showroute.php should omit unranked users.

Am I missing anything?
Title: Re: "Unranked" users
Post by: osu-lsu on June 25, 2024, 04:04:04 pm
As an aside to this topic; can we delete the 6lanetest account?
Never mind. The account in question has been deleted.
Title: Re: "Unranked" users
Post by: si404 on June 25, 2024, 05:08:05 pm
I've made/making a few for AARW that I'd have gotten rid of after I've used them for that purpose, but if they can be pulled out of the stats, then they may as well remain.

tem_corridors, tem_built, tent_comp, tent_core, tent_corr, tent_norbalcor, tent_scamedcor, tent_medcor, tent_balaegor, tent_rhidancor, tent_atlcor, tent_baladrcor, tent_balmedcor, tent_normedcor
Title: Re: "Unranked" users
Post by: Jim on June 25, 2024, 06:49:05 pm
I've made/making a few for AARW that I'd have gotten rid of after I've used them for that purpose, but if they can be pulled out of the stats, then they may as well remain.

tem_corridors, tem_built, tent_comp, tent_core, tent_corr, tent_norbalcor, tent_scamedcor, tent_medcor, tent_balaegor, tent_rhidancor, tent_atlcor, tent_baladrcor, tent_balmedcor, tent_normedcor

Would these make more sense in a third category, one for which they're not included in user lists at all?
Title: Re: "Unranked" users
Post by: Jim on June 25, 2024, 09:39:01 pm
I have some progress on this.

The stat.php page on the staging server behaves as I proposed above.  https://tmstage.teresco.org/stat.php  The unranked users listed so far in the new csv file (more on that below) should all now have no rank listed, and the ranks at the top of the page and in the big tables should not have ranks shown for those entries, though they are still in the table in the appropriate position.

The new csv file is in the UserData repository: https://github.com/TravelMapping/UserData/blob/master/list_files/listfileinfo.csv . Please feel free to add entries for other files you have uploaded that should be excluded from the rankings, or let me know in this thread or by email and I can add them.  You'll also see that there's an as-yet-unused description field that can be specified for any list file.  I think it's helpful for the unranked users to indicate the purpose of the file, and the third field should be a 0 for those.  If it's a regular traveler that should be included in the rankings, the third field should be a 1.  I'm sure there are a few places where it will make sense to display the description for any list file for which one is specified.
Title: Re: "Unranked" users
Post by: Duke87 on June 26, 2024, 12:55:53 am
For stat.php's list of all users ranked by miles traveled and on similar but restricted lists elsewhere, like region.php and system.php, I would like to have all of the ranks not include the unranked users, but I am less sure about whether the unranked users should be just not given a rank in the tables or omitted completely.  I am thinking keep them in the list but don't number them.

I'd suggest putting them at the bottom of the table and not moving them from there when people adjust the table sorting as well.
Title: Re: "Unranked" users
Post by: Jim on June 26, 2024, 06:48:25 am
Maybe users like my car or year should be listed in the rankings, but true non-traveler lists like 6lane should be fully omitted.  Nothing stopping us from having more than 2 categories.
Title: Re: "Unranked" users
Post by: yakra on June 26, 2024, 10:05:53 am
Now it's time to think about where to omit or include those users (https://github.com/TravelMapping/Web/issues/741) on various parts of the TM site.
Stats CSVs -- include or omit?
Title: Re: "Unranked" users
Post by: Jim on June 26, 2024, 11:10:29 am
Not sure about the stats CSVs.  Also not sure anyone looks at them.
Title: Re: "Unranked" users
Post by: si404 on June 26, 2024, 01:04:10 pm
Would these make more sense in a third category, one for which they're not included in user lists at all?
Maybe, as long as they are findable.

These are, somewhat, the sort of thing I talked with you in-person just shy of a year ago, the kind of non-mappable systems that if we had user-compare stats ('what travels have I done that match this other user') would perhaps be used. Here it's improvement corridors (cf AHDS / High Priority Corridors), but tourist stuff like National Scenic Byways would also be a way to do this.
Title: Re: "Unranked" users
Post by: michih on June 26, 2024, 01:46:49 pm
For stat.php's list of all users ranked by miles traveled and on similar but restricted lists elsewhere, like region.php and system.php, I would like to have all of the ranks not include the unranked users, but I am less sure about whether the unranked users should be just not given a rank in the tables or omitted completely.  I am thinking keep them in the list but don't number them.

stat.php is called "Highway Travelers' Stats". I'd restrict it to "real" users.
I like how you implemented the table now. I'd like to see that on region.php and system.php only.

Would these make more sense in a third category, one for which they're not included in user lists at all?
Maybe, as long as they are findable.

I think they should remain being selectable via the user dropdown lists - except on stat.php.

We need to add a description for listfileinfo.csv to the manual (https://tmstage.teresco.org/participate.php).
Title: Re: "Unranked" users
Post by: mapcat on June 26, 2024, 04:47:24 pm
Not sure about the stats CSVs.  Also not sure anyone looks at them.

I occasionally look at them, but the presence or lack of unranked users there doesn't matter to me.
Title: Re: "Unranked" users
Post by: Jim on June 29, 2024, 10:05:26 am
I've converted region.php to use the unranked designation.  It's also on tmstage.  Rather than "N/A" or something similar in the places where ranks would appear for normal travelers, this page simply omits the rank entirely. 

I will proceed soon with a similar conversion for system.php (where user ranks are currently broken on tmstage).

On stat.php, since there's a rank entry that should have something in it, I have replaced the rank with "NR" for unranked users.
Title: Re: "Unranked" users
Post by: michih on June 29, 2024, 10:39:59 am
I've converted region.php to use the unranked designation.  It's also on tmstage.  Rather than "N/A" or something similar in the places where ranks would appear for normal travelers, this page simply omits the rank entirely.

I do still see one out of four rank entries: https://tmstage.teresco.org/user/region.php?u=jt2020q5&rg=DC

(https://forum.travelmapping.net/index.php?action=dlattach;topic=6309.0;attach=739)

Title: Re: "Unranked" users
Post by: Jim on June 29, 2024, 11:00:57 am
Fixed that, thanks, but noticed I have since broken something else that causes unranked travelers to report 0 routes traveled.
Title: Re: "Unranked" users
Post by: michih on June 29, 2024, 11:06:12 am
Thanks, I've updated (https://github.com/TravelMapping/UserData/pull/11507/commits/eb708b2e74957dce6c1cfdf8d366d1f63eb9e4d8) listfileinfo.csv the other day. The users are still indicated with ranks on tmstage - albeit it's indicated The most recent TM - Highways site update completed at 2024-06-28 22:21:30 US/Eastern.
I guess that you've simply not updated UserData for tmstage?
Title: Re: "Unranked" users
Post by: Jim on June 29, 2024, 11:08:47 am
I'll try to reload the next .sql I generate into the test db for use on tmstage.  I'm not spending too much time automating updates of the test db since I hope to have this all live on the production database and main site before too long.
Title: Re: "Unranked" users
Post by: Jim on June 29, 2024, 11:15:25 pm
On tmstage, we now have /stat.php, /user, /user/region.php, and /user/system.php behaving as I intend with respect to unranked users.

Left to do: traveler counts and lists on hb/showroute.php and user/mapview.php, colors for "Color by Traveler Count" on user/mapview.php.

Also, the newest listfileinfo.csv (and newest of all other TM data) have been loaded into the test db so are on tmstage.

Again, please feel free to add entries to listfileinfo.csv for your highway list file(s), normal or "unranked".



Title: Re: "Unranked" users
Post by: michih on June 30, 2024, 11:20:46 am
Looks good :) I just like to have any info why there is no rank for those users in the 'Traveler' tables, e.g. a tooltip.

I also wonder if you wanna output the last column of listfileinfo.csv anywhere on the site, or if we just use it to indicate in the csv itself why that user is to be unranked.
Proposal: Below the headline, i.e.
- user new line below 'Main Travel Mapping - Highways User Page for ***'
- region.php new line below 'Traveler Statistics for *** in ***'
- system.php new line below 'Traveler Statistics for *** on *** in ***'
Title: Re: "Unranked" users
Post by: Jim on June 30, 2024, 01:17:59 pm
On tmstage, mapview and showroute now ignore unranked users.

Thanks, @michih for the other suggestions, will look at those soon.

Have I missed any other places where unranked users should be ignored?

I plan to have this go live on the main site soon, closing the big GitHub issues regarding this new feature, then we can open new issues for bugs and feature requests to track them more easily.
Title: Re: "Unranked" users
Post by: michih on June 30, 2024, 01:38:29 pm
Have I missed any other places where unranked users should be ignored?

I'm not aware of any.
Title: Re: "Unranked" users
Post by: Jim on July 04, 2024, 09:42:37 am
This is all live in the production database and on the main site.  Please report any problems or make any suggestions here or open new GitHub Issues.
Title: Re: "Unranked" users
Post by: yakra on August 29, 2024, 11:20:32 am
9aafcf9 (https://github.com/TravelMapping/DataProcessing/commit/9aafcf9454dd0dd272bfbc259b75c936fecfef9f#diff-a9628ca98720ba21a19933f4b3b1059ed1d7c674a4b83988dce9bb160e448d7a) came about a month after the switch to MariaDB (https://forum.travelmapping.net/index.php?topic=6251).
lab2 is still running mysql 8.0.16. It tells me:
Quote
ERROR 1064 (42000) at line 14223312: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS idx_com_region_traveler ON clinchedOverallMileageByRegion' at line 1
I'll see about updating my software. Maybe even my OS if I have to.
Might be less headache to set up MariaDB on another machine first and see how it does.
In the meantime, I think I may be able to just not create these indices on lab2 to do what I wanna do there.