ITSLeeds / pct

Get and reproduce data from the Propensity to Cycle Tool (PCT)
https://itsleeds.github.io/pct/
19 stars 10 forks source link

Demonstration of the approach for other cities #78

Closed Robinlovelace closed 1 year ago

Robinlovelace commented 3 years ago

Reproducible example shown below for Cardiff. Any other examples from other cities welcome. Should we add this to a new vignette? Thoughts welcome @layik, @ccamara or anyone.

install.packages("remotes", quiet = TRUE)
remotes::install_cran("pct", dependencies = "Suggests")
#> Skipping install of 'pct' from a cran remote, the SHA1 (0.6.0) has not changed since last install.
#>   Use `force = TRUE` to force installation
library(tidyverse)
library(sf)
#> Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 7.0.0

region_name = "wales"
la_name = "Cardiff"

zones_all = pct::get_pct_zones(region_name)
unique(zones_all$lad_name)
#>  [1] "Cardiff"               "Wrexham"               "Conwy"                
#>  [4] "Newport"               "Caerphilly"            "Rhondda Cynon Taf"    
#>  [7] "Carmarthenshire"       "Swansea"               "The Vale of Glamorgan"
#> [10] "Bridgend"              "Neath Port Talbot"     "Pembrokeshire"        
#> [13] "Denbighshire"          "Flintshire"            "Monmouthshire"        
#> [16] "Powys"                 "Torfaen"               "Blaenau Gwent"        
#> [19] "Ceredigion"            "Gwynedd"               "Merthyr Tydfil"       
#> [22] "Isle of Anglesey"
zones = zones_all %>% 
  filter(lad_name == la_name)
plot(zones["bicycle"])

rnet_all = pct::get_pct_rnet(region_name)
# rnet = rnet_all[zones, , op = sf::st_within]
rnet = rnet_all[zones, ]
#> although coordinates are longitude/latitude, st_intersects assumes that they are planar
plot(zones$geometry)
plot(rnet["dutch_slc"], add = TRUE)

Created on 2020-11-18 by the reprex package (v0.3.0)

natesheehan commented 3 years ago

Yes! I think this would be great to add in, both in terms of providing insight for our friends in Wales and as future prep for the 2021 census.

Robinlovelace commented 3 years ago

Great, could be a new vignetted. Input very welcome @natesheehan, thanks for the comment!

natesheehan commented 3 years ago

Welcome! Yes, I can write a vignette based on the example above ~ this week?

Robinlovelace commented 3 years ago

That would be amazing!

cristitosa commented 2 years ago

Has there been any documented case studies for cities outside the UK, and the customization of the PCT tool? Thank you.

Robinlovelace commented 2 years ago

Hi @cristitosa yes, work building on the PCT have been developed in Norway and New Zealand, in prototype mode. We are actively working on developing a strategic cycling uptake model for the Republic of Ireland and Lisbon region, Portugal. Are you interested in deploying the methods in Romania (based on your GitHub bio)? Happy to help!

cristitosa commented 2 years ago

Hi @Robinlovelace thank you for your reply. Good to know! At the moment I am not in Romania, but surely it is needed there as well. Currently a postdoc in Stavanger, Norway, and a PhD student @ayda89 of ours wanted to explore the PCT.

Robinlovelace commented 2 years ago

OK great, I can link up with you on that. Please drop me an email at r. lovelace at leeds dot ac dot UK (sorry for cryptic email address)!