get_od: Get origin destination data from the 2011 Census

View source: R/desire_lines.R

get_odR Documentation

Get origin destination data from the 2011 Census

Description

This function downloads a .csv file representing movement between MSOA zones in England and Wales. By default it returns national data, but region can be set to subset the output to a specific local authority or region.

Usage

get_od(
  region = NULL,
  n = NULL,
  type = "within",
  omit_intrazonal = FALSE,
  base_url = paste0("https://s3-eu-west-1.amazonaws.com/",
    "statistics.digitalresources.jisc.ac.uk", "/dkan/files/FLOW/"),
  filename = "wu03ew_v2",
  u = NULL
)

Arguments

region

The PCT region or local authority to download data from (e.g. west-yorkshire or Leeds). See View(pct_regions_lookup) for a full list of possible region names.

n

top n number of destinations with most trips in the 2011 census within the region.

type

the type of subsetting: one of from, to or within, specifying how the od dataset should be subset in relation to the region.

omit_intrazonal

should intrazonal OD pairs be omited from result? FALSE by default.

base_url

the base url where the OD dataset is stored

filename

the name of the file to download, if not the default MSOA level data.

u

full url of file to download

Details

OD datasets available include wu03uk_v3 and others listed on the Wicid website.

Examples


get_od("wight", n = 3)
get_od()
get_od(filename = "wu03uk_v3")
u = "https://www.nomisweb.co.uk/output/census/2011/wf02ew_oa.zip"
# get_od(u = u)


pct documentation built on May 31, 2023, 7:55 p.m.