read_lodes: Retrieve a LODES file/data

Description Usage Arguments Value Note References Examples

View source: R/lodes.r

Description

Files are cached in download_dir

Usage

1
2
read_lodes(state, type = c("origin", "residence", "workplace", "od", "rac",
  "wac"), segment, job_type, year, download_dir = getwd())

Arguments

state

2-leter state code (auto-converted to lower case)

type

one of "origin", "residence" or "workplace" or their short equivalents "od", "rac", "wac"

segment

segment identifier

job_type

job identifier

year

year to retrieve

download_dir

location to cache the file (defaults to current directory)

Value

'tibble' of results if data file was found

Note

the full path to the downloaded file is displayed in message

References

See the codebook for valid parameters.

Examples

1
2
3
read_lodes("de", "od", "aux", "JT00", "2006")
read_lodes("ak", "residence", "S000", "JT00", "2002")
read_lodes("id", "workplace", "SE02", "JT03", "2013")

hrbrmstr/lodes documentation built on May 17, 2019, 5:10 p.m.