stupidpupil / wales_ish_r5r_runner

Generates LSOA-to-LSOA public transport travel time matrices for Wales and bordering areas using {r5r}
https://stupidpupil.github.io/lsoa_travel_time_viewer/
1 stars 0 forks source link

Add guidance on importing and transforming data #2

Open stupidpupil opened 2 years ago

stupidpupil commented 2 years ago

Possible systems of interest:

stupidpupil commented 2 years ago

Powershell: https://stackoverflow.com/questions/59637078/powershell-convert-multiple-coulmns-csv-to-two-column-csv-or-unpivot

stupidpupil commented 2 years ago

R/tidyverse

library(tidyverse)
travel_time_matrix <- read_csv("arrive_by_0900_driving.csv", comment="#")
travel_time_lookup <- travel_time_matrix %>% pivot_longer(-from_id, names_to='to_id', values_to='travel_time_minutes')