nptscot / npt

Data processing code, also use this repo for issue tracking for the Network Planning Tool. See https://nptscot.github.io for development version
https://www.npt.scot/
GNU Affero General Public License v3.0
5 stars 0 forks source link

Update utility methods report (#470) #474

Closed Robinlovelace closed 1 month ago

Robinlovelace commented 1 month ago

Heads-up @juanfonsecaLS1 I think the code in this PR presents similar data that you were looking from from NTS, but post COVID and with simpler summaries. The plan is to use this as the basis of trip numbers per distance band to improve our models of multi-modal trips. Will aim to add the .md file too, please try to reproduce this also @Hussein-Mahfouz but not urgent, most relevant to Juan I think, review comments welcome, results are v. interesting and relevant I think.

juanfonsecaLS1 commented 1 month ago

I just found this https://www.transport.gov.scot/media/cxwdlrm5/transport-and-travel-in-scotland-2022-pdf.pdf, which reports median travel by mode in Scotland in 2022. image

There are also some tables that might be useful:

See https://www.transport.gov.scot/publication/transport-and-travel-in-scotland-2022/

I have not found anything on trip purpose and mean travelled distance.

Robinlovelace commented 1 month ago

Thanks Juan, that's helpful. At the moment just focussing on trip distance distributions by purpose for all purposes and making good progress, almost there, it's a mission but making quick progress with this approach:

image

Could you try reproducing the report, just to check the results are reproducible and make sense?

juanfonsecaLS1 commented 1 month ago

I think they have not published the data for the 2022 report. Or I might not been able to find it. The UK data service only has from 2014 until 2019. I could try to see if I can reproduce the figures for the previous results.

juanfonsecaLS1 commented 1 month ago

Just a quick question on the model, does it not overestimate the number of short distance trips?

Robinlovelace commented 1 month ago

Just a quick question on the model, does it not overestimate the number of short distance trips?

For which purposes and how short?

Compared with the best data we have which is commute it seems to under-predict trips in the 1-2 and 2-3 km bins. It does seem to over-prect trips in the 0-1 km category for the OD data we have. However, I think that is likely due to limitations with the input data: it only includes interzonal flows so the training data itself under-predicts short trips.

Given that the purpose of this model is to drive a spatial interaction model with a spatial resolution of ~500m, I think the estimates for very short trips are less relevant than for trips above 1km.

I'm not saying that it doesn't over-estimate short trips, just that we need a good way to test it. And if it does I think it's likely that the over-estimate will be less than the over-estimate currently in the model.

To me the exponential decay seems to fit the data pretty well but happy to hear suggestions of ways to improve it.

Robinlovelace commented 1 month ago

Heads-up @joeytalbot the last 3 commits above solve the issue of the OD model generating way too many OD pairs. Now a number is sampled, with weight proportional to the estimated interaction, from each group with the number being set to it's relation to a minimum amount (currently set to 10, which means around 10 to 30 desire lines per zone).