-
-
Notifications
You must be signed in to change notification settings - Fork 351
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
Mode shift #448
Comments
time to drive/bike, the elevation profile, and the distance. #448
This looks for all driving trips in the map and shows the expected time to drive vs bike. Also shows the distance and elevation gain/loss of the trip. You can filter by different things and count the number of matching trips. So it's a super rudimentary interactive PCT-ish query. These're good candidate trips that could be swayed to cycle. Maybe a next step would be to figure out what kind of infrastructure changes (better signal timing, more protected cycle lanes along the route) would convince the person to switch. @Robinlovelace Any feedback on this approach? Anything you'd like to see in this kind of dashboard? Handing you a blank cheque here. ;) |
This looks great, a solid basis for implementing mode shift models in A/B Street by the looks of it! Wish list for things I'd like to see:
There may well be some lower hanging fruit. Good news is: there's lots of literature on mode shift and much of it revolves around logit models. Not so great news: not much of the research is reproducible or based on open code. Here are some figures showing the concepts of distance decay and hilliness decay in action. |
Ideas from a call with Michael & Robin:
|
…converted trips... but that're missing bike infrastructure. #448
Alright, starting to put a few things together... |
Very good being able to link trips filtered by length and mode to the map. |
If you wanted to leverage the work of others in this department, there exists: https://bna.peopleforbikes.org/#/places/0ea909ec-0b15-4bae-b593-a40da8a72312/ e.g. here's seattle low vs high stress streets: They have many cities and towns in the US (including Seattle), and a handful of international cities. It looks like their scoring logic is also based on OSM tagging and census data. Also, I came across their nice bike-centric OSM tagging guide: The BNA score seems to come from this repository: After a cursory review, I think the analysis is primarily driven from here(?): https://github.com/azavea/pfb-network-connectivity/blob/develop/src/analysis/scripts/run_analysis.sh and largely driven by a string of SQL mutations: https://github.com/azavea/pfb-network-connectivity/tree/develop/src/analysis/stress If not literally using their results, it might be worth checking some of their methods, e.g. in https://github.com/azavea/pfb-network-connectivity/blob/develop/src/analysis/stress/stress_tertiary_ints.sql#L14 |
I absolutely want to avoid reinventing the wheel on defining high-stress. Thank you for the detailed links! I'll figure out tradeoffs between importing their data separately vs trying to replicate their classifier. (An argument for the latter being: the user will probably be changing roads to make things less stressful) |
https://osmus.slack.com/archives/C2VJAJCS0/p1630599064085200 Discussion of tagging levels of traffic stress in OSM directly |
That sounds good to me. Couldn't see the Slack (do I need to join the group?) but interested in the idea. After chatting with Martin about tagging 'LTN' I tentatively agree with the 'keep it objective' approach, unless there is a very clear definition of traffic stress, including things like surface quality that may not be captured in OSM. Stress is key to prioritising effort where it's most needed though and likely levels of use so great to see more potential data sources on it. |
Try https://osmus-slack.herokuapp.com/ to join the Slack. Luckily it's public and has permanent archiving (afaict), but you do need to sign up. :( Note that tagging level of cycling stress is different than tagging an LTN, but they're definitely related. |
I'm going to take some more steps on this, but in the context of the bike network tool for #743. The end goal is to predict which trips from an input scenario will switch from driving to biking due to the user's proposed map edits. The "differential" approach needs to avoid the "spurious" changes mentioned in the original message of this issue. So on an unedited map, given the chosen parameters for distance/time/elevation thresholds, calculate which trips would switch "baseline." Then after edits, repeat, and see how many more trips match. But... I'm not sure this makes sense. If all those trips would have switched without the user's edits, why hasn't that happened yet? One of the main barriers from the real human perspective is safety. So I think we can "score" the user's network by running mode shift and seeing how many trips will make use of new infrastructure. In other words, take the existing "find the most important gaps" layer, and just overlay that with the proposed network. So some concrete steps to get there, as a gift to my less clear-headed future self in the morning:
Then more speculative steps:
|
…ode-shift. #448 Just load the scenario and scrape data from it, to start.
…ed edits. #448 Not updating when making edits yet, though!
This new page works as follows:
I took a video showing the end-to-end workflow of the tool so far, but the GIF is too big for github; I'll record a youtube video talking through it later. But the gist is this:
|
This looks like a really useful development. The approach sounds sensible. Looking forward to giving it a spin! |
…esting knobs to turn. Biking distance is pretty related to biking time. And driving time is irrelevant for people considering a switch. #448 Also adjust initial elevation gain max from 30 to 100 feet
…esn't render in a silly way. #448
I think would great for the user to be able to explore different scenarios of behaviour (e.g. max % people willing to cycle, which could be cultural and slow to change) and willingness to cycle on busy infrastructure. 2D plots showing 'distance decay', 'hilliness decay', 'business decay' and other variables could help people understand what moving these slides does, perhaps by moving things inside a 2D plotting window. Sketchy idea below, thinking you could represent each of those variables (max elevation gain, max distance) inside the graph and have linear or curved 'ramp up' and 'ramp down' lines showing that it's not about hard limits but %s dropping... |
The thing is that the links between the different factors are not yet know. I'm confident that for distance the 5 slides enable the user to capture most possible variability, e.g. by shifting max distance (and right plateau) vertical dotted lines right to represent E-Bike adoption. Interactive sketch: https://excalidraw.com/#room=11d6a02f5445a16de228,DadvVTIbaYcHi4tsQG86KQ |
(In the above plots Distance could be switched for Time and the curves would be similar, I think time is more realistic but distance is easier to model due to high variability of cycling speeds.) |
I need to think about this a little more to guess how hard it'd be to implement. I think it's possibly not so bad. Plenty of ideas about requirements in this thread...
My probability knowledge is super fuzzy right now. Would it be reasonable to start by assuming these 3 factors are independent, so we could multiply the probabilities? The logic would be something like:
|
Yes, that's reasonable. An actual working function, published in the R package pct, that calculates probability of cycling if citizens switch to Dutch likelihood of cycling is as follows: uptake_pct_godutch = function(distance,
gradient,
alpha = -3.959 + 2.523,
d1 = -0.5963 - 0.07626,
d2 = 1.866,
d3 = 0.008050,
h1 = -0.2710,
i1 = 0.009394,
i2 = -0.05135,
verbose = FALSE) {
distance_gradient = check_distance_gradient(distance, gradient, verbose)
distance = distance_gradient$distance
gradient = distance_gradient$gradient
logit_pcycle = alpha + (d1 * distance) +
(d2 * sqrt(distance)) + (d3 * distance ^ 2) +
(h1 * gradient) +
(i1 * distance * gradient) +
(i2 * sqrt(distance) * gradient)
boot::inv.logit(logit_pcycle)
} I don't actually like that function - too complex - functional forms based on the Beta distribution are neater and require fewer parameters, but the point is many different functions can be used. I think keeping it simple as you suggest is the way forward. |
Discussing this with Fred, Lucas and others today. |
Quoting some docs: The travel demand model is extremely fixed; the main effect of a different random number seed is currently to initially place parked cars in specific spots. When the player makes changes to the map, exactly the same people and trips are simulated, and we just measure how trip time changes. This is a very short-term prediction. If it becomes much more convenient to bike or bus somewhere, then more people will do it over time. How can we transform the original demand model to respond to these changes?
Here's a strawman proposal for how this could work: after the player edits the map, re-evaluate every trip in the scenario. Calculate a cost for driving/walking/transit/biking for each one. Change the mode specified by the input to the best choice.
Thinking a little about UX of switching modes.
The text was updated successfully, but these errors were encountered: