lodes : Retrieve Data from LEHD Origin-Destination Employment Statistics Server

The following functions are implemented:

Both functions take a download_dir parameter and local copies of the remote files will be cached to that directory and read from vs re-downloading (be kind to servers). Remove the file if you want a fresh version.

Installation

devtools::install_git("https://github.com/hrbrmstr/lodes.git")
options(width=120)

Usage

library(lodes)
library(dplyr)

# current verison
packageVersion("lodes")

# Grab a crosswalk file
id_xwalk <- read_xwalk("id", "~/Data/lodes")

glimpse(id_xwalk)

# Some different params
de <- read_lodes("de", "od", "aux", "JT00", "2006", "~/Data/lodes")
glimpse(de)

ak <- read_lodes("ak", "residence", "S000", "JT00", "2002", "~/Data/lodes")
glimpse(ak)

id <- read_lodes("id", "workplace", "SE02", "JT03", "2013", "~/Data/lodes")
glimpse(id)

Test Results

library(lodes)
library(testthat)

date()

test_dir("tests/")


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