The DfT's Journey Time Statistics are outlined here on the gov.uk website.

get_jts_data(
  table,
  year = 2017,
  u_csv = jts_url(),
  clean = TRUE,
  ods = FALSE,
  output_format = "data_frame",
  type = NULL
)

Arguments

table

The title of the table, e.g. "jts0501"

year

The year, e.g. 2017. If "meta" is supplied, get metadata.

u_csv

The base url of the files

clean

Should the dataset be cleaned with jts_clean?

ods

Download and read-in raw ODS files? FALSE by default, which reads-in csv files instead. The .csv files were created to overcome performance limitations of readODS, which cannot read-in large .ods files.

output_format

Which file format should be returned? data_frame by default; sf optional.

type

Options are lsoa, la (local authority district/unitary authority) and lpa (local planning authority); lsoa by default.

Details

The function uses a data frame of existing tables, created by the script 'accessibility_tables.R' in the data-raw folder.

The tables starting JTS01 to JTS03 provide national overview data.

The tables JTS0401 to JTS0409 provide data at the Local Authority level.

The tables JTS0501 to JTS0509 provide the same data at the LSOA level.

The tables beginning JTS09 provide data on accessibility to transport hubs.

And the tables beginning JTS10 contain add other variables.

Data is provided every year from 2014 to 2019 in many cases

Examples

head(jts_tables)
#> # A tibble: 6 x 7 #> table_code csv_file_name table_title table_url csv_url service year #> <chr> <chr> <chr> <chr> <chr> <chr> <chr> #> 1 jts0101 jts0101-JTS01… Average minim… https://ass… https://… Time: E… meta #> 2 jts0102 jts0102-2014.… Average minim… https://ass… https://… Time, r… 2014 #> 3 jts0102 jts0102-2015.… Average minim… https://ass… https://… Time, r… 2015 #> 4 jts0102 jts0102-2016.… Average minim… https://ass… https://… Time, r… 2016 #> 5 jts0102 jts0102-2017.… Average minim… https://ass… https://… Time, r… 2017 #> 6 jts0103 jts0103-2014.… Average minim… https://ass… https://… Time by… 2014
head(jts_tables$table_title)
#> [1] "Average minimum travel time to reach the nearest key services by mode of travel: England" #> [2] "Average minimum travel time to reach the nearest key services by mode of travel, rural and urban areas: England" #> [3] "Average minimum travel time to reach the nearest key services by mode of travel, rural and urban areas: England" #> [4] "Average minimum travel time to reach the nearest key services by mode of travel, rural and urban areas: England" #> [5] "Average minimum travel time to reach the nearest key services by mode of travel, rural and urban areas: England" #> [6] "Average minimum travel time to reach the nearest key services by public transport or walking, region: England"
metadata = get_jts_data(table = "jts0101", year = "meta")
#> Warning: Multiple column headings found: :
head(metadata)
#> # A tibble: 6 x 13 #> Year Mode `Places with 10… `Places with 50… `Places with 50… #> <fct> <fct> <dbl> <dbl> <dbl> #> 1 2014 Publ… 9.7 12.7 32.6 #> 2 NA Cycle 9.2 10.9 32.7 #> 3 NA Car 7.6 8.5 17.2 #> 4 2015 Publ… 9.8 12.7 32.7 #> 5 NA Cycle 9.2 10.8 32.2 #> 6 NA Car 7.5 8.3 16.8 #> # … with 8 more variables: `Primary school` <dbl>, `Secondary school` <dbl>, #> # `Further Education` <dbl>, GP <dbl>, Hospital <dbl>, `Food store` <dbl>, #> # `Town Centres` <dbl>, NA <fct>
# uncomment on released version jts0401_2017 = get_jts_data(table = "jts0401", year = 2017) head(jts0401_2017[1:7])
#> # A tibble: 6 x 7 #> Region LA_Code LA_Name Empl_pop `100EmpPTt` `100EmpPT15n` `100EmpPT30n` #> <fct> <fct> <fct> <int> <dbl> <dbl> <dbl> #> 1 North E… E060000… County Dur… 387726 9.10 2.33 8.97 #> 2 North E… E060000… Darlington 76400 8.42 3.35 9.29 #> 3 North E… E060000… Hartlepool 67192 7.90 3.50 9.63 #> 4 North E… E060000… Middlesbro… 101165 6.26 3.97 9.94 #> 5 North E… E060000… Northumber… 234010 15.2 1.49 6.65 #> 6 North E… E060000… Redcar and… 97971 7.94 2.40 9.62
jts0401_2014 = get_jts_data(table = "jts0401", year = 2014) head(jts0401_2014[1:7])
#> # A tibble: 6 x 7 #> Region LA_Code LA_Name Empl_pop `100EmpPTt` `100EmpPT15n` `100EmpPT30n` #> <fct> <fct> <fct> <int> <dbl> <dbl> <dbl> #> 1 North E… E060000… County Dur… 384110 10.6 1.86 8.52 #> 2 North E… E060000… Darlington 76142 8.84 2.88 9.25 #> 3 North E… E060000… Hartlepool 67013 8.04 3.26 9.60 #> 4 North E… E060000… Middlesbro… 100614 7.50 3.43 9.97 #> 5 North E… E060000… Northumber… 232459 16.2 1.32 6.54 #> 6 North E… E060000… Redcar and… 98459 9.06 2.01 9.32
jts0401_2017_sf = get_jts_data(table = "jts0401", year = 2017, output_format = "sf")
#> Joining, by = "LA_Code"
head(jts0401_2014[1:7])
#> # A tibble: 6 x 7 #> Region LA_Code LA_Name Empl_pop `100EmpPTt` `100EmpPT15n` `100EmpPT30n` #> <fct> <fct> <fct> <int> <dbl> <dbl> <dbl> #> 1 North E… E060000… County Dur… 384110 10.6 1.86 8.52 #> 2 North E… E060000… Darlington 76142 8.84 2.88 9.25 #> 3 North E… E060000… Hartlepool 67013 8.04 3.26 9.60 #> 4 North E… E060000… Middlesbro… 100614 7.50 3.43 9.97 #> 5 North E… E060000… Northumber… 232459 16.2 1.32 6.54 #> 6 North E… E060000… Redcar and… 98459 9.06 2.01 9.32
# jts0401_2017_raw = get_jts_data(table = "jts0401", year = 2017, clean = FALSE) # head(jts0401_2017_raw[1:7]) # jts0501_2017 = get_jts_data(table = "jts0501", year = 2017) # head(jts0501_2017[1:7]) # jts0501_2017 = get_jts_data(table = "jts0501", year = 2017, output_format = "sf") # head(jts0501_2017) jts0501_meta = get_jts_data(table = "jts0501", year = "meta")
#> Warning: Multiple column headings found: 1618:
head(jts0501_meta)
#> # A tibble: 6 x 4 #> `Service users source: Census and u… NA NA NA #> <fct> <fct> <fct> <fct> #> 1 Field Alterna… Description Paramet… #> 2 LSOA_Code Emp005 LSOA Code Referen… #> 3 Region Emp001 Region of England Referen… #> 4 LA_Code Emp002 LA Code Referen… #> 5 LA_Name Emp003 LA Name Referen… #> 6 Empl_pop Emp004 Service users in LSOA … Number