lehdr

a package to grab LEHD data in support of city and regional planning economic and transportation analysis

https://github.com/jamgreen/lehdr

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 6 committers (16.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.1%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

a package to grab LEHD data in support of city and regional planning economic and transportation analysis

Basic Info
  • Host: GitHub
  • Owner: jamgreen
  • License: other
  • Language: R
  • Default Branch: master
  • Size: 432 KB
Statistics
  • Stars: 63
  • Watchers: 9
  • Forks: 16
  • Open Issues: 3
  • Releases: 0
Created almost 9 years ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.Rmd

---
title: "README"
author: "Jamaal Green, University of Pennsylvania;  Dillon Mahmoudi, University of Maryland Baltimore County; Liming Wang, Portland State University"
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%",
  eval = FALSE
)
```

# lehdr

## Build Status


[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/lehdr)](https://cran.r-project.org/package=lehdr)

[![R-CMD-check](https://github.com/jamgreen/lehdr/workflows/R-CMD-check/badge.svg)](https://github.com/jamgreen/lehdr/actions)

[![metacran downloads](https://cranlogs.r-pkg.org/badges/lehdr)](https://cran.r-project.org/package=lehdr)



**lehdr** (pronounced: _lee dur_ like a metric _litre_) is an R package that allows users to interface with the [Longitudinal and Employer-Household Dynamics (LEHD)](https://lehd.ces.census.gov/) Origin-Destination Employment Statistics (LODES) dataset returned as dataframes. The package is continually in development and can be installed via CRAN.

## Installation

You can install the released version of lehdr from [CRAN](https://CRAN.R-project.org) with:

``` r
install.packages("lehdr")
```
And the development version from [GitHub](https://github.com/) with:

```{r manualinstall, eval=FALSE}
install.packages("devtools", repos = "http://cran.us.r-project.org")
devtools::install_github("jamgreen/lehdr")
```

## Usage

This first example pulls the Oregon (`state = "or"`) 2020 (`year = 2020`) from LODES version 8 (`version="LODES8"`, default), origin-destination (`lodes_type = "od"`),  primary jobs including private primary, secondary, and Federal (`job_type = "JT01"`, default), as well as, primary jobs across ages, earnings, and industry (`segment = "S000"`, default), aggregated at the Census Tract level rather than the default Census Block (`agg_geo = "tract"`).

```{r usage1, eval=FALSE}
library(lehdr)
or_od <- grab_lodes(state = "or", 
                    year = 2020, 
                    version = "LODES8", 
                    lodes_type = "od", 
                    job_type = "JT01",
                    segment = "S000", 
                    state_part = "main", 
                    agg_geo = "tract")

head(or_od)
```

The package can be used to retrieve multiple states and years at the same time by creating a vector or list. This second example pulls the Oregon AND Rhode Island (`state = c("or", "ri")`) for 2013 and 2014 (`year = c(2013, 2014)` or `year = 2013:2014`).

```{r usage2, eval=FALSE}
grab_lodes(state = c("or", "ri"), 
           year = c(2013, 2014), 
           lodes_type = "od", 
           job_type = "JT01", 
           segment = "S000", 
           state_part = "main", 
           agg_geo = "tract")           
```

Not all years are available for each state. To see all options for `lodes_type`, `job_type`, and `segment` and the availability for each state/year, please see the most recent LEHD Technical Document at https://lehd.ces.census.gov/data/lodes/LODES8/.

Using the optional `version` paramater, users can specify which LODES version to use. Version 8 is default (`version="LODES8"`) is enumerated at 2020 Census blocks. LODES7 (`version="LODES7"`) is enumerated at 2010 Census blocks, but ends in 2019. LODES5 (`version="LODES5"`) is enumerated at 2000 Census blocks, but ends in 2009.

Other common uses might include retrieving Residential or Work Area Characteristics (`lodes_type = "rac"` or `lodes_type = "wac"` respectively), low income jobs (`segment = "SE01"`) or good producing jobs (`segment = "SI01"`). Other common geographies might include retrieving data at the Census Block level (`agg_geo = "block"`, not necessary as it is default).

## Why lehdr?

The LODES dataset is frequently used by transportation and economic development planners, regional economists, disaster managers and other public servants in order to have a fine grained understanding of the distribution of employment. Such data is integral for regional travel demand models that help to dictate transportation policy options, regional economists and economic development planners interested in the spatial distribution of particular kinds of work use the data to weigh different industrial or workforce policy options. Finally, as a census product, the LODES data can be joined to census Decennial or American Community Survey data to help visualize the interactions between different population groups and work. In short, the LODES dataset is the only source of detailed geographic information on employment for the country and should be more widely available for researchers and analysts who work on regional development issues. 

## Future Development

Currently, **lehdr** is designed to grab the LODES flat files (origin-destination, workplace, and residential association files) and includes an option to aggregate results to the census tract level for analysts who find the fuzzing at the block level too great. 

Next steps include exploring integration of the package with the [**sf**]( https://CRAN.R-project.org/package=sf) and [**tigris**]( https://CRAN.R-project.org/package=tigris) packages to allow for easier mapping of LODES data. 

## Acknowledgements

This package would not exist in its current format without the inspiration of [Bob Rudis's](https://rud.is/b/) [lodes package](https://github.com/hrbrmstr/lodes)


Owner

  • Login: jamgreen
  • Kind: user

GitHub Events

Total
  • Issues event: 5
  • Watch event: 10
  • Issue comment event: 11
  • Push event: 3
  • Pull request review event: 2
  • Pull request event: 4
Last Year
  • Issues event: 5
  • Watch event: 10
  • Issue comment event: 11
  • Push event: 3
  • Pull request review event: 2
  • Pull request event: 4

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 103
  • Total Committers: 6
  • Avg Commits per committer: 17.167
  • Development Distribution Score (DDS): 0.534
Past Year
  • Commits: 6
  • Committers: 2
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.333
Top Committers
Name Email Commits
jamgreen j****n@g****m 48
Dillon Mahmoudi d****i@g****m 29
lmwang l****g@g****m 20
Jamaal Green j****n@p****u 2
Kyle Walker k****a@g****m 2
matthewjrogers m****9@g****m 2
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 19
  • Total pull requests: 24
  • Average time to close issues: 9 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 15
  • Total pull request authors: 5
  • Average comments per issue: 1.79
  • Average comments per pull request: 0.5
  • Merged pull requests: 21
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 6
  • Average time to close issues: 15 days
  • Average time to close pull requests: 21 days
  • Issue authors: 2
  • Pull request authors: 1
  • Average comments per issue: 2.0
  • Average comments per pull request: 1.0
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Quantitative72 (2)
  • dillonma (2)
  • lmwang9527 (2)
  • jamgreen (2)
  • bnglasner (1)
  • paragemini (1)
  • ar-puuk (1)
  • bpb824 (1)
  • poppaaron (1)
  • hanrmonjerervmy (1)
  • berdaniera (1)
  • camille-s (1)
  • pavlito1 (1)
  • philiporlando (1)
  • higgicd (1)
Pull Request Authors
  • dillonma (15)
  • elipousson (5)
  • matthewjrogers (1)
  • walkerke (1)
  • lmwang9527 (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 316 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 6
  • Total maintainers: 1
cran.r-project.org: lehdr

Grab Longitudinal Employer-Household Dynamics (LEHD) Flat Files

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 316 Last month
Rankings
Forks count: 7.1%
Stargazers count: 7.6%
Average: 26.7%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Downloads: 53.6%
Maintainers (1)
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.3.0 depends
  • dplyr * imports
  • glue * imports
  • httr * imports
  • rappdirs * imports
  • readr * imports
  • rlang * imports
  • stringr * imports
  • devtools * suggests
  • knitr * suggests
  • pacman * suggests
  • rmarkdown * suggests
  • testthat >= 3.0.0 suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite