ITSLeeds / pct

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

The pct vignette is not reproducible and contains out-of-date code #79

Closed Robinlovelace closed 3 years ago

Robinlovelace commented 3 years ago

As reported by @natesheehan, there is a mismatch between the default centroids data and the od data provided by the PCT package. Looking at it, seems this is the cause:

https://github.com/ITSLeeds/pct/blob/0ef47961cba092302abd4e6cadf87bfffc77c642/vignettes/pct.Rmd#L112-L116

A few issues: eval=FALSE (should be TRUE, no harm in running the code) and it should have geography = "msoa", to get it working.

Longer term: it would be great to download LSOA level OD data but not sure that's possible.

Robinlovelace commented 3 years ago

Done now : ) please can you take a look at the latest version: https://itsleeds.github.io/pct/articles/pct.html

Very grateful if you find/fix any additional issues @natesheehan, meaning we can eventually close this issue :tada:

natesheehan commented 3 years ago

@Robinlovelace Spotted a couple of things

  1. library(pct) is called twice (probably not needed)
  2. library(pbapply) should be loaded when running rnet = overline(wight_routes_30_ls, "govtarget")

If you confirm, I will make a PR fixing both of these and then we can close the issue 💥

Robinlovelace commented 3 years ago

If you confirm, I will make a PR fixing both of these and then we can close the issue boom

:+1: :smile: :bike: :rocket:

natesheehan commented 3 years ago

https://github.com/ITSLeeds/pct/pull/83

Robinlovelace commented 3 years ago

Definite improvements, thanks loads. Final change @natesheehan, will aim to add you as a contributor. Trying to get more people involved, this really helps and shows that open collaboration works!