Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TW Presidential Hackathon #743

Open
dabreegster opened this issue Aug 31, 2021 · 7 comments
Open

TW Presidential Hackathon #743

dabreegster opened this issue Aug 31, 2021 · 7 comments

Comments

@dabreegster
Copy link
Collaborator

dabreegster commented Aug 31, 2021

A/B Street is participating in the Taiwan presidential hackathon! The new "ungap the map" bike network tool is our focus, as a way to help citizens & advocacy groups push governments for alternatives to driving in cities. The tool is related to SDG 11 and SDG 13. The demo is at: http://abstreet.s3-website.us-east-2.amazonaws.com/0.2.56/abstreet.html?--ungap&system/us/seattle/maps/aurora_central.bin

I'll use this issue to organize project management.

Work plan

Summarizing from a spreadsheet, subject to change:

  • 19-27 Aug: Prep for the Aurora workshop at Lantern: Lantern Brewing burndown list #725.
  • 30 Aug - 3 Sept: Address UI feedback so far, improve road editor
  • 6 - 10 Sept: Proposal sharing
  • 13 - 17 Sept: Flesh out the routing tool, and work on mode shift Mode shift #448 to predict how many driving trips might change if infrastructure is built
  • 20 - 24 Sept: Add basic carbon emissions modeling
  • 27 Sept - 1 Oct: Deploy to more cities. Depending on connections we can make, Tempe, NYC, and Taipei are possibilities.
  • 4 - 8 Oct: Improve performance of tool, especially on the large Seattle-wide map
  • 11 - 14 Oct: Write documentation, prepare for final demo, catch up on any final polishing needed.

Feedback from judges

Two people mentioned tying the work into climate change more directly:

  • "The stackholders can analyze the carbon saved by this platform"
  • "-No use or generate of data on climate change. (traffic data is used instead) A suggested improvement would be to calculate the carbon emission reduction from the proposed change. (calculate measurable impacts)"

And in response, I think I'll prioritize "testing" somebody's proposed bike network by

  1. Seeing how many short driving trips would make use of new infrastructure - Mode shift #448
  2. Adding a basic carbon emissions model and estimating savings from people making different travel choices
@dabreegster
Copy link
Collaborator Author

dabreegster commented Aug 31, 2021

Tasks

I'm bad at keeping TODO lists in one place, but I'll try to consolidate here. These come from #725 and https://github.com/a-b-street/abstreet/projects/12...

Solidify map model

  • Make progress on snapping cycleways, Include separate cyclepaths and trails osm2streets#59
  • Write up an article clearly explaining the snapping problem, to communicate to the OSM community better
  • Consider merging divided highways like Aurora into one object with an explicit median, so proposals can consider the entire right-of-way width

Road editor UI

  • More lane width pre-sets, probably based on NACTO
  • Individual edits are slow -- adjusting lane width using the spinner really reveals this
  • Consult with Yuwen about ideas to simplify the controls, like making lane types a dropdown or hiding the "add new lane" while selecting a current lane

Explore mode

  • Improve color scheme for showing hierarchy of bike lane types
  • Improve highlighting of road types
  • Show elevation data while zoomed in?
  • Possibly add a layer with historic collision data
  • Bug: Opening previous proposal has error message sometimes

Create new bike lanes tool

  • Click and drag control to paint?
  • Be more clear that the "create new lanes" tool will only modify existing lanes, not expand width. Need a clear error state. And make sure it doesn't expand width -- parking -> bike lane + separators currently looks too wide.
  • Test everything in left-handed maps

Plan a route

  • Just click to add waypoints
  • Let user set their preferences, probably based on some tuned pre-sets (avoid hills, avoid stressful roads, bravely blaze through anything to be fast)
  • Automatically show alternate routes (the slow-but-safe route, vs the direct-but-scary route)
  • Show how the route could change with a proposal?
  • Watch the route: just animate somebody walking/biking/driving along the route, using the traffic sim, and follow along
  • Save routes that the user draws, and browse them later. The user thinks of these as "test cases"

Sharing proposals

  • Get the "share URL" function working end-to-end... update the URL correctly
  • Find a cheaper SQL host
  • Get a manual moderation workflow working
  • Add a "browse proposals" UI

Advocacy

  • Test the tool end-to-end by mocking up Seattle's basic bike network
  • Mock up my own ideas for extensions to the network
  • Ask SNG to use this for their "ungap the map" campaign
  • Establish a connection with NYC / TransAlt

dabreegster added a commit that referenced this issue Aug 31, 2021
dabreegster added a commit that referenced this issue Sep 1, 2021
organization, insulates from the upcoming complexity increase for
viewing the route result, and paves the way for using this component in
something like a better tool for spawning a simulation agent to visit
waypoints. #743
dabreegster added a commit that referenced this issue Sep 1, 2021
dabreegster added a commit that referenced this issue Sep 1, 2021
dabreegster added a commit that referenced this issue Sep 2, 2021
dabreegster added a commit that referenced this issue Sep 2, 2021
dabreegster added a commit that referenced this issue Sep 2, 2021
Some messiness, but step forward.
dabreegster added a commit that referenced this issue Sep 2, 2021
stressful roads. Initially experiment in the route debugger UI. #743

This is a binary map format change, but temporarily working around
that...
dabreegster added a commit that referenced this issue Sep 2, 2021
... just sketching out things, nothing working.
dabreegster added a commit that referenced this issue Sep 3, 2021
Some UX clunkiness:
- not allowing custom names yet
- no autosave
- the left/right arrows can silently eat the current route
dabreegster added a commit that referenced this issue Sep 3, 2021
Also some drag-n-drop API tweaks:
- Don't require the caller to set `named()`
- Vertical card layout!

Some UX issues:
- deletion button alignment
- horizontal card alignment off
- sync up highlighting between map and cards
- selection state for a waypoint is meaningless
dabreegster added a commit that referenced this issue Sep 3, 2021
stressful roads. Initially experiment in the route debugger UI. #743

This is a binary map format change, but temporarily working around
that...
@dabreegster
Copy link
Collaborator Author

dabreegster commented Sep 5, 2021

Status update from week 2

The original plan was to address the most urgent UX feedback from the workshop. Some of that has happened:

While I was fixing up the route tool, I started on some stuff from week 4:

  • Saving routes, so the user can define them as "test cases," then edit the bike network, and see how things work before/after
  • Showing elevation along the route both on the map and in the line plot

And I started digging into performance issues and trimming down the size of the region-wide maps in #746. I think there's some invasive refactoring work there that I want to work on early...

And finally, I spend lots of time writing up a project demo reel & retrospective and an article diving into one of the hardest problems A/B Street tackles, making intersection geometry. These aren't directly related to the hackathon, but are increasingly vital for the project's long-term health -- I want other people to understand how tricky parts of the code work.

The stated plan for week 3 is proposal sharing. Due to an upcoming conference deadline, I will spend more time writing docs/articles, and also keep pushing forward this performance and route tool work. I think the m.v.p. for sharing shouldn't take more than a day or two anyway.

Some of the new features in the route tool are demoed below:
screencast

Updated web build: http://abstreet.s3-website.us-east-2.amazonaws.com/0.2.57/abstreet.html?--ungap&system/us/seattle/maps/udistrict.bin

dabreegster added a commit that referenced this issue Sep 6, 2021
stressful roads. Initially experiment in the route debugger UI. #743

This is a binary map format change, but temporarily working around
that...
@dabreegster
Copy link
Collaborator Author

Status update from week 3

I got fairly off-track this week due to interviews and preparing for a talk at the SUMO conference tomorrow. I wound up writing 3 things this week, not directly related to the hackathon's scope, but again useful for ensuring the project could continue without my knowledge.

Direct work on the bike network tool from this week included a huge breakthrough for performance after editing the map (#748) and some help from Michael polishing the route tool (#751). New build at http://abstreet.s3-website.us-east-2.amazonaws.com/0.2.58/abstreet.html?--ungap&system/us/seattle/maps/udistrict.bin

The plan for this week is to continue on the routing tool and mode shift. I hope to focus on code, not writing, this week finally! I'll also pay down the debt of sharing map edits from last week.

dabreegster added a commit that referenced this issue Sep 16, 2021
dabreegster added a commit that referenced this issue Sep 17, 2021
…gger into the new route tool. It's actually easier to parameter tune here, since drawing and saving routes is polished here. #743
@dabreegster
Copy link
Collaborator Author

Status update from week 4

Falling slightly behind the original schedule, but I've never been great at predicting when things will happen. A fair bit happened this week -- the routing tool got lots more detail added and better management of saved routes. There were some more performance improvements, for pathfinding and for serving the website through a CDN. The quick-sketch tool now works in the UK and other left-handed maps. And, unrelated to the bike network tool, I published the article about intersection geometry and got quite a strong response online.

Also, yesterday I attended DemocracyLab's national day of civic hacking and had the pleasure of 3 people joining for the day to work on the tool! Mara redesigned the route tool, pretty much solving the UX problems with the panels covering up the map: https://www.figma.com/file/6WMaKr49CHCHv5B98Ytmli/Map?node-id=0%3A1
Screenshot from 2021-09-18 15-15-30
And Jennifer started helping with the quick sketch tool, finding lots of problems where the automated changes would actually require repaving the road and changing its curb-to-curb width. There's a design to deal with this problem more clearly:
https://www.figma.com/file/TrOmz7fq53l80yNHUelLgt/AB-street-mockups?node-id=0%3A1
Screenshot from 2021-09-18 15-20-04

So I guess this week my priorities are:

  1. Take the next steps on the mode shift tool and integrate it to the bike network UI. I'm now understanding this as a sort of "large-scale test case" for the user's proposed bike network. The existing route UI is the "small scale" test.
  2. Then use the results of the mode shift to calculate carbon savings. I'm hoping this is just a matter of plugging in total mileage into a formula and making some reasonable guesses about vehicle types.
  3. Implement Mara's designs
  4. If there's time, catch up on the proposal sharing work.

@dabreegster
Copy link
Collaborator Author

dabreegster commented Sep 26, 2021

Status update from week 5

I made lots of progress on first 3 tasks from last week -- most notably, the tool now looks at an existing travel demand model and predicts how many people will switch from driving to biking, and what that looks like in terms of CO2 emissions. There are loads of assumptions in this calculation, but the tool exposes a way to interactively tune these parameters.

Try it out: http://play.abstreet.org/0.2.60/abstreet.html?--ungap&system/us/seattle/maps/udistrict.bin
Watch a ~10 min (very unedited) demo of the tool so far: https://www.youtube.com/watch?v=o6_SGzIYwLk

I also started a very simple prototype of a related tool to help UK cities plan low-traffic neighborhoods to reduce rat running.

Try it: http://play.abstreet.org/0.2.60/abstreet.html?--ltn&system/gb/leeds/maps/north.bin
Quick video explanation: https://www.youtube.com/watch?v=l_klZxlKmXU

There are about 3 weeks left in this hackathon. As the longer video shows, the tool is working end-to-end, but there's lots of polish missing. The only major missing feature is the ability to share proposals online. So I think next week, I'll finally prioritize that, and spend the rest of the time polishing the UI, performance, and testing the tool with real examples for plans around Seattle.

dabreegster added a commit that referenced this issue Sep 29, 2021
- workaround dragging / clicking conflicts
- make AltRouteResults wrap RouteResults
- plumb names/params around
dabreegster added a commit that referenced this issue Sep 29, 2021
Some quirks, but finally got this working.
dabreegster added a commit that referenced this issue Sep 29, 2021
…der. And now multiple alt routes! #743

But deduping routes isn't great; many alts mostly cover up the main route
dabreegster added a commit that referenced this issue Sep 29, 2021
…ally speeds up the bike network routing tool, since it's now restricted to just a few params. #743
@dabreegster
Copy link
Collaborator Author

Status update from week 6

The FOSS4G conference and more interviews ate most of my time this week. I did implement alternate low-stress or low-hill routes, and then started down the rabbit hole of #763 to pay down technical debt for how complicated it is to manage selection and dragging for different waypoints and alternate routes.

New build: http://play.abstreet.org/0.2.61/abstreet.html?--ungap&system/us/seattle/maps/udistrict.bin

With 2 weeks left, ordered priorities become:

  1. Get the absolute mvp for sharing proposals working (although I'd really like to properly work on Refactor file management pattern #765)
  2. Use the tool myself and record a bunch of example network extensions, and not get too distracted by all the adjustments to how the tool works that I'll inevitably imagine...
  3. Make progress on Performance idea: squeezing down file size #746. The mitigation if this falls through is just asking people to download the tool and run locally. It's only a big problem in the web version.
  4. Start writing all the final deliverable system docs
  5. Keep polishing UI -- Michael's alternate route feedback, the mode shift page, route details particularly

dabreegster added a commit that referenced this issue Oct 6, 2021
Let the map be panned even when we're snapped to an intersection.
Previously it's super obnoxious to start drawing a route in a huge map.
Also I'd love to switch to the new World API and stop with this ad-hoc
logic, but slightly confused about how to do that here...

Also add a reset button, otherwise I just switch tabs to force a reset,
which is silly.
dabreegster added a commit that referenced this issue Oct 6, 2021
Previously, the undirected graph search would switch sides sporadically.
Now it sticks to one side.

Now we probably just need an option to also include the other direction,
to avoid having to sketch over Aurora twice.
@dabreegster
Copy link
Collaborator Author

dabreegster commented Oct 9, 2021

Status update from week 7

The most important tasks have been done -- sharing proposals now works, some of the major performance problems have been smoothed out (like editing a large map), I've mocked up my grand vision for Seattle, and most of the final report is at least drafted. There are just a few days left, so this is my plan:

  • today: finish all of the writing
  • Sunday: blaze through a burndown list of last code changes
  • Monday: record the final presentation
  • Tuesday: "launch" the tool to a few stakeholders

I'll hold off on the usual Sunday release probably until Monday.

Burndown list

Can't launch without this:

  • Making the color scheme work for large maps (Change the styling for edited bike network roads -- just use bright c… #771)
  • Fix crashes in the quick sketch tool (I think when you drag a waypoint onto an existing one?)
  • Add Creative Commons notice to proposal sharing
  • Settle branding for the tool. Is it "the A/B Stree bike network planner"? Or "Ungap the Map"?
  • Decide the default Seattle map
  • Include the example Seattle vision
    • and also one based on the bike master plan? Actually figuring out what it promises is challenging...
  • Skim through TODOs in the code and carefully check all UI interactions for major bugs
  • Make the quick sketch tool work in huge map when unzoomed (need to boost the size of everything)
  • Make the route tool work in huge maps when unzoomed

Quite important:

  • Add a parameter to mode shift for how much safer a route has to become for the switch to succeed

The default Seattle map problem: this tool works best at the huge_seattle scale. Initially loading that is slow. #746 has lots of ideas for fixing, but let's realistically say they can't happen in the next few days. So maybe we just split into 2 or 3 large chunks and ask people to use the downloaded version for anything bigger?

dabreegster added a commit to a-b-street/docs that referenced this issue Oct 10, 2021
dabreegster added a commit that referenced this issue Oct 11, 2021
- after adding lanes, stay on the quick sketch page
- be clear people are uploading proposals in the public domain
- link to docs about mode shift
dabreegster added a commit that referenced this issue Oct 11, 2021
network tool reasonably on the web. #743, #746

I'm declaring the budget to be 20MB gzipped map files.

- north and south seattle boundaries extended a bit
- central seattle added
- stripping out unused pathfinding data for walking and transit to
  squeeze down the size. avoiding crashes for empty pathfinding -- if
  you try to simulate a minified map, most trips will just fail
dabreegster added a commit that referenced this issue Oct 11, 2021
- after adding lanes, stay on the quick sketch page
- be clear people are uploading proposals in the public domain
- link to docs about mode shift
dabreegster added a commit that referenced this issue Oct 11, 2021
- after adding lanes, stay on the quick sketch page
- be clear people are uploading proposals in the public domain
- link to docs about mode shift
dabreegster added a commit that referenced this issue Oct 12, 2021
To avoid needing 3 copies of the proposal for different splits of the
map, make loading edits "permissive" (filtering out unknown roads) when
loading from proposals.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant