get_od_spatial: get_od_spatial

Description Usage Arguments Value Author(s) References Examples

View source: R/lodesR.R

Description

Function that converts output of get_od_data or get_od_subset into a format that enables plotting of job flows from residence to workplace areas. The function creates centroids for each census block and joins the coordinates of these onto the workplace and residence census blocks.

Usage

1

Arguments

df

Requires as input an output dataframe of get_od_data or get_od_subset.

Value

Returns a dataframe with two individual simple feature collection columns containing the point geometries for the workplace area census blocks and the residence area census blocks.

Author(s)

Ballantyne, Patrick

References

LODES data available to download manually from: https://lehd.ces.census.gov/data/lodes/LODES7/

Examples

1
2
3
4
5
## Get OD data for Illinois, for 2014
df <- get_od_data("il", "2014")

## Convert to format that enables linestring plotting
df2 <- get_od_spatial(df)

patrickballantyne/tidylodes documentation built on June 1, 2020, 1:12 p.m.