Author Topic: HB: traveler mileage and percent  (Read 1992 times)

0 Members and 1 Guest are viewing this topic.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1318
  • Last Login:Today at 08:16:02 pm
HB: traveler mileage and percent
« on: December 19, 2017, 09:11:28 pm »
Code addressing the main feature requested in

https://github.com/TravelMapping/Web/issues/218

is now in the HB on tmtest.  Please give it a try.  I think it's pretty straightforward, but I'd like to get a little feedback before going live with it on the production site.

(Grades went in for the semester, and I felt I should knock off at least one item from the TM backlog before taking care of a bunch of other work-related items I have been putting off.)

Offline mapcat

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 715
  • Last Login:Yesterday at 01:49:53 pm
Re: HB: traveler mileage and percent
« Reply #1 on: December 19, 2017, 09:40:44 pm »
Found a bug:

http://tmtest.teresco.org/hb/?units=miles&u=mapcat&r=ca.ca163

(I just selected the route at random)

Even though I'm listed among those who have clinched the route, and my length traveled (10.87 mi) equals the total length (also 10.87 mi), my percent traveled is 99.97%.

Similar situation on two more short clinched routes:

http://tmtest.teresco.org/hb/?units=miles&u=mapcat&r=ca.ca056
http://tmtest.teresco.org/hb/?units=miles&u=mapcat&r=ca.ca282

Note that, for CA282, a route clinched by everyone who's driven it, the average traveled is 100.00% even though users are credited with 100.6%.

Longer routes don't have the problem:

http://tmtest.teresco.org/hb/?units=miles&u=mapcat&r=ca.i005
http://tmtest.teresco.org/hb/?units=miles&u=mapcat&r=ca.i010
http://tmtest.teresco.org/hb/?units=miles&u=mapcat&r=ca.i040



« Last Edit: December 19, 2017, 09:43:12 pm by mapcat »
Clinched:

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1318
  • Last Login:Today at 08:16:02 pm
Re: HB: traveler mileage and percent
« Reply #2 on: December 19, 2017, 09:55:57 pm »
Ah, a rounding problem.  Thanks for finding it.  I think I've fixed it.

Offline mapcat

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 715
  • Last Login:Yesterday at 01:49:53 pm
Re: HB: traveler mileage and percent
« Reply #3 on: December 19, 2017, 10:04:17 pm »
Looks good!
Clinched:

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1721
  • Last Login:Today at 02:07:03 pm
Re: HB: traveler mileage and percent
« Reply #4 on: December 20, 2017, 04:47:43 am »
Straightforward, and cleanly presented. As @mapcat noted on GitHub, we can compare our percent travelled to the average. I like.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1318
  • Last Login:Today at 08:16:02 pm
Re: HB: traveler mileage and percent
« Reply #5 on: December 20, 2017, 08:06:18 pm »
This first improvement is now on the main site.  I'll see if I can implement the highlighting of segments in the waypoint table next.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1318
  • Last Login:Today at 08:16:02 pm
Re: HB: traveler mileage and percent
« Reply #6 on: December 20, 2017, 10:53:24 pm »
Highlighting in the waypoint table for segments traveled by the selected user is now on tmtest.  Give it a look if you have a chance.

Offline mapcat

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 715
  • Last Login:Yesterday at 01:49:53 pm
Re: HB: traveler mileage and percent
« Reply #7 on: December 21, 2017, 12:32:29 am »
Looks good to me. It's already helped me identify a short unclinched segment that's almost impossible to see on the map.
Clinched:

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1184
  • Gender: Male
  • Last Login:Today at 11:16:00 am
Re: HB: traveler mileage and percent
« Reply #8 on: December 21, 2017, 04:28:23 am »
It's already helped me identify a short unclinched segment that's almost impossible to see on the map.

There could be a "Goto first unclinched segment" button. On clicking, the marker box on the map could appear...

The last row should automatically get the same color like the second to last row.
« Last Edit: December 21, 2017, 04:30:25 am by michih »

Offline mapmikey

  • TM Collaborator
  • Sr. Member
  • *****
  • Posts: 319
  • Last Login:Today at 04:59:29 pm
    • Co-curator Virginia Highways Project
Re: HB: traveler mileage and percent
« Reply #9 on: December 21, 2017, 06:20:30 am »
Looks good to me. It's already helped me identify a short unclinched segment that's almost impossible to see on the map.

No idea how hard this would be...

How about an 'inverse' button that switches the bolded lines on the map to the unclinched segments...?
Clinched:
I: 4 12 16 17 20 26 27 30 59 64 66 68 72 73 ew74 77 78 79 82 83 ew84 85 ew86 e88 97 99
US: 4 6N 9W 11E 11W 13 15 19W 21 44 46 48 58 72 92 113 117 123 130 158 163 176 178 192 206 209 211 219 220 221 222 258 264 276 290 311 319 322 340 360 378 401 ew422 501 521 522 601 701
PriSystems: VA, DE

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1318
  • Last Login:Today at 08:16:02 pm
Re: HB: traveler mileage and percent
« Reply #10 on: December 21, 2017, 07:40:52 am »
It's already helped me identify a short unclinched segment that's almost impossible to see on the map.

There could be a "Goto first unclinched segment" button. On clicking, the marker box on the map could appear...

A couple reasons not to do it at least not right away.  I hesitate to add more UI elements for something like that, and the page doesn't really store that kind of information for dynamic behavior.  At this point, the colors in the tables and on the map are set on creation and there's no information stored to allow such a search.

Quote
The last row should automatically get the same color like the second to last row.

My hesitation on this is because I think it would somehow imply two clinched segments at the end when one really exists.  The way to think about the table's colors is to see the segments that start at each point that are clinched or not.  It would be impossible to clinch a segment starting at the end.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1318
  • Last Login:Today at 08:16:02 pm
Re: HB: traveler mileage and percent
« Reply #11 on: December 21, 2017, 07:42:23 am »
No idea how hard this would be...

How about an 'inverse' button that switches the bolded lines on the map to the unclinched segments...?

Something to think about.  With the current code structure, I think this would require a page reload.  I'd like to put that off pending a better way to select colors overall.

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1184
  • Gender: Male
  • Last Login:Today at 11:16:00 am
Re: HB: traveler mileage and percent
« Reply #12 on: December 21, 2017, 09:56:36 am »
The last row should automatically get the same color like the second to last row.

My hesitation on this is because I think it would somehow imply two clinched segments at the end when one really exists.

As it is today. If you have clinched the entire route, the last segment is still indicated unclinched.... That's why I suggested to use the color of the previous segment. Who really cares about the number of segments traveled?

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1318
  • Last Login:Today at 08:16:02 pm
Re: HB: traveler mileage and percent
« Reply #13 on: December 21, 2017, 01:35:37 pm »
I don't know how hard it would be, but here's something I think would make some sense. 

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1318
  • Last Login:Today at 08:16:02 pm
Re: HB: traveler mileage and percent
« Reply #14 on: December 21, 2017, 01:51:55 pm »
Related to this, I'd like to replace the light pink to dark pink scale currently used to map percentages with something nicer.  One possibility is a scheme like CHM's, where high percentages are blue (or close) and low percentages are orange.  I never liked that a whole lot but I am also not sure what a better scale should look like.  I'd like to come up with a scheme and apply it in maps and tables throughout TM. 

Suggestions?