ATFutures / upthat

Urban planning and transport health assessment tool
4 stars 1 forks source link

Data in demo data is of different units than in city releases #24

Open Robinlovelace opened 4 years ago

Robinlovelace commented 4 years ago

Leading to outputs like this:

image

Linked to #21 but opening a new issue as it affects usability and reproducibility. You up for tackling this one @mpadge ?

Robinlovelace commented 4 years ago

Clarification, this is in the inst/net.Rds demo file.

mpadge commented 4 years ago

Cross link to this image which i can reproduce. I'm not sure why Kathmandu only goes to 700 when Accra goes to 6,000. Once i figure that out, we'll be pretty much there ...


Edit: It's because the flows in Accra are derived using the procedure from NYC, and the Accra trotro system is ubiquitous just like the NYC subway, so loads of people flowing out of both, giving large estimates for pedestrian flows. In short:

city numbers of bus stops
Accra 2,248
Kathmandu 242

So the latter ends up with estimates around an order of magnitude lower. I've nevertheless worked out a rough scaling as the best that we can possibly derive from the data provided to us, which suggests that flows in Kathmandu should be scaled to flows in Accra as follows:

net_kath$flows <- max(net_accra$flows) * (net_kath$flows / max (net_kath$flows)) * 8.1878 / 7.015

So values for Kathmandu should go up to about 7000, instead of 750.

Scaling Kathmandu flows

Accra has very detailed data, from which I estimated an average daily distance walked of 7.0145km. Kathmandu has just one figure under "2a" for person kilometres walked per year. For an assumed population of 1.74 million, this translates to 8.187687km per day. That's where the above scaling came from, and that's what I've applied to the now-updated Kathmandu data here. It's the best we can do for now.

mpadge commented 4 years ago

I've updated the Kathmandu data according to the above, so it now looks like this: image

Robinlovelace commented 4 years ago

:+1:

mpadge commented 4 years ago

I'll leave this issue open, because I actually still have another layer to add to the Kathmandu data which will increase the overall flow numbers somewhat. Will be closed simultaneously with #42

Robinlovelace commented 4 years ago

Still an issue. Any chance you could upload the demo data shipped in the package @mpadge ?

Current pedestrian flows looking good for Accra (although I suspect a bit low in the city centre):

image

mpadge commented 4 years ago

The flow values have now been optimally standardised to the best of current abilities - both kathmandu and Bristol max out at around 2,600, while Accra is around 9,000 because (1) people walk more there, and (2) activity is much more concentrated in specific areas, rather than broadly dispersed as for the other 2 cities. (And yes, it is interesting that flows in central Accra are relatively low compared with other regions, but that appears to be just the way things are given the current state of all input data, so i think we have to accept that for now.)

Robinlovelace commented 4 years ago

Great. Are you up for working on this issue at some point, will be great to have demo data on same order of magnitude as publicly available outputs.