npct / pct-demo

A mini, reproducible version of the Propensity to Cycle Tool containing reproducible code and data
GNU General Public License v3.0
3 stars 2 forks source link

How to find the hilliness of routes/zones? #1

Open Robinlovelace opened 7 years ago

Robinlovelace commented 7 years ago

Question from Adam Martin on this - with an interest in London.

Robinlovelace commented 7 years ago

The following code, for example shows how to find the average hilliness at the route level (you can do this for the zones, 'z', also):

u = "https://github.com/npct/pct-outputs-regional-R/raw/master/commute/msoa/isle-of-wight/rf.Rds"
download.file(url = u, destfile = "rf.Rds")
rf = readRDS("rf.Rds")
library(tmap)
tmap_mode("view")
#> tmap mode set to interactive viewing
qtm(rf, lines.col = "rf_avslope_perc")

adammartin1 commented 7 years ago

Thanks, Robin. I downloaded the data as you suggested and find two (potentially) relevant variables: perc_rf_dist_u10km avslope_perc_u10km Please can you describe or provide a link to where I can find out what each is a measure of? thanks. Adam

usr110 commented 7 years ago

I downloaded the data as you suggested and find two (potentially) relevant variables: perc_rf_dist_u10km avslope_perc_u10km Please can you describe or provide a link to where I can find out what each is a measure of?

@adammartin1 I can reply to that. You will find descriptions of the z variable in a codebook written by @AnnaGoodman1

https://github.com/npct/pct-shiny/blob/master/regions_www/www/static/02_codebooks/commute/z_codebook.csv

perc_rf_dist_u10km: Percent of commuters in zone with fast route commute distance <10km [calculated excluding trips with no fixed work place] avslope_perc_u10km: Average fast route gradient (%) of commute trips in zone with fast route distance <10km

Robinlovelace commented 7 years ago

Great stuff, thanks for the reply Adam and the links Ali. Adam if you've any further issues let us know - and let us know if this is useful.

adammartin1 commented 7 years ago

Great, thanks for the quick responses... But I still don't fully understand what "Average fast route gradient (%) of commute trips in zone with fast route distance <10km" means. avslope_perc_u10km seems to vary between 0.39 and 4.12. Is that a percentage and, if so, a percentage of what? Thanks again.

AnnaGoodman1 commented 7 years ago

It is a percentage incline, i.e. if you change elevation up/down by 1m for every 100m horizontal, that is 1% (see appendix to https://www.jtlu.org/index.php/jtlu/article/view/862)

Robinlovelace commented 7 years ago

Plus if you've any other queries feel free to come across to LIDA to ask Adam. Plan to leave this 'issue' open so it's more prominent and raise questions about using the data, which is separate from our pct-shiny bug tracker.