This dataset was generated using the following code:
1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
# After downloading the file from the 'wicid' data access repo
flow = readr::read_csv("wu03ew_v2.csv")
sel = grep(pattern = "W", x = flow$`Area of residence`)
od_wales = flow[sel,]
od_wales = as.data.frame(od_wales)
use_data(od_wales, overwrite = TRUE)
ukmsoas = geojsonio::geojson_read("../pct-bigdata/cents.geojson", what = "sp")
library(sp)
plot(ukmsoas)
welsh_msoas = ukmsoas[grep("W", ukmsoas$geo_code),]
od_wales = od_wales[od_wales$`Area of residence` %in% welsh_msoas$geo_code,]
od_wales = od_wales[od_wales$`Area of workplace` %in% welsh_msoas$geo_code,]
plot(welsh_msoas)
od_wales_lines = stplanr::od2line(od_wales, welsh_msoas)
names(od_wales_lines)
class(od_wales)
use_data(od_wales_lines)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.