ATFutures / who3

Third phase of WHO prototype
0 stars 0 forks source link

Deliverable 4 (linked to output 1). Draft prototype webtool #19

Open Robinlovelace opened 4 years ago

Robinlovelace commented 4 years ago

Draft prototype webtool: concurrent with the preceding two stages, the prototype webtool will be set-up and served from a stable web location and will be maintained for the duration of the project. This stage includes the search and update of relevant datasets, coding and thorough documentation of the development process.

Robinlovelace commented 4 years ago

We have a prototype web tool, but it needs the updated data and scenario values in there, work in progress by @mpadge.

mpadge commented 4 years ago

here is the layer: image

That's using your scenario with a 0.8% modal shift towards walking, with the resultant exposure scaled to total relative risk for increasing mortality under this scenario of 1.13 per year. I think that's the most sensible way to incorporate that. I'll get that uploaded and upthat'ed now ...

Robinlovelace commented 4 years ago

Interesting that the high values seem to appear on a relatively small number of short road segments.

mpadge commented 4 years ago

yeah, i've run that for a few other random cities, and Accra seems to be quite unusual in that regard. Most of them yield fairly dispersed centres, but (1) Accra really is extraordinarily strongly defined by it's major road system; and (2) the trotro system is nothing but entirely integrated with that system, and so because most walking happens in relation to trotro use, then most walking by definition happens along those roads.

Robinlovelace commented 4 years ago

Update: the latest data for Accra are up there now 🎉

https://atfutures.github.io/uta/

@mpadge could you update the minimum reproducible example dataset here to reflect the latest column names of the input data? I guess that may depend on #18 but great to see the approach to updating the data on the public facing instance hosted in Leeds works!

mpadge commented 4 years ago

@Robinlovelace This seems like the best place to ping this - please continue elsewhere if you think somewhere else might be better. But ... I just uploaded data for Bristol. There were a few bugs in the who-data code, but it now all just worked for me for Bristol as described in README, and generated the result that has now been uploaded. Two notes:

  1. There were some glitches with dodgr, which crashed a couple of times because of something odd with the bus network, but these were not repeatable, so I can't really work out what that might have been. Anyway, I just retried and all was good.
  2. The results are really just a very rough first go, and in particular clearly suffer from "edge effects". This means most areas of highest pedestrian activity are towards the edges, because people get off buses here and have effectively nowhere else to walk because they hit the boundary of the network. I remember this from previous attempts, and it's difficult to solve because we need a spatial definition of Bristol that is larger than this boundary, but there is none. I say plenty good enough as a proof-of-principle for tomorrow.
Robinlovelace commented 4 years ago

Hi @mpadge I cannot see net-bristol.Rds in there - there is an updated Accra network by the looks of it though, see below:

 piggyback::pb_download()
downloading crashes-simulated-accra.Rds ...
  |==========================================================================================================================================| 100%
  |==========================================================================================================================================| 100%
downloading net-accra.Rds ...
Robinlovelace commented 4 years ago

Correction: it's downloading now. Seems it does not auto download everything.

mpadge commented 4 years ago

I also just updated a considerably improved version - the pedestrian model is quite okay, but the vehicle and emissions layers still suffer from edge effects. Note that this pedestrian model is not realistic, just a proof of principle, but even then it seems quite okay - really emphasising walking behaviour around the uni.

Robinlovelace commented 4 years ago

Just to clarify, are you still using this script to generate the layers?

city <- "Bristol" # or Accra
hw <- who3_network (city) # way network
bus <- who3_bus_network (city)
bus <- who3_bus_centrality (city)
cent <- who3_centrality (city) # time-based centrality for motorcars
b <- who3_buildings (city)
netf <- who3_flow (city) # calculate pedestrian flows from buses and activity centres

As mentioned I've not been able to reproduce the results for any city using this approach so far. But that's probably also off topic, just thought it worth mentioning/asking. Looking better each time but it's not clear what changes in the code are changing the results and that's an issue.

mpadge commented 4 years ago

Yes, that is precisely what i used that for Bristol, except there's the crucial final step that actually generates the "production" layers, which is:

netf <- who3_disperse_centrality (city, disperse_width = 200) 

As mentioned, i did encounter a couple of crashes and had to repeat a couple of steps before it all worked out of the box. I'll return to those down the track.