knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
library(magrittr)

lemis

CircleCI

unclass(desc::desc_get_authors(here::here("DESCRIPTION"))) %>% 
  purrr::keep(~"aut" %in% .$role) %>% 
  purrr::map_chr(~paste(.$given, .$family)) %>% 
  paste(collapse = ", ") %>% 
  paste0("Authors: _", ., "_") %>% 
  cat()

The lemis package provides access to U.S. Fish and Wildlife Service (USFWS) data on wildlife and wildlife product imports to and exports from the United States. This data was obtained via more than 14 years of Freedom of Information Act (FOIA) requests by EcoHealth Alliance.

Installation

Install the lemis package with this command:

source("https://install-github.me/ecohealthalliance/lemis")

As this is currently a private repository, you must have a GitHub personal access token set up to install and use the package. Instructions for this can be found here.

Usage

The main function in lemis is lemis_data(). This returns the main cleaned LEMIS database as a dplyr tibble.

lemis makes use of datastorr to manage data download. The first time you run lemis_data(), the package will download the most recent version of the database (~160 MB at present). Subsequent calls will load the database from storage on your computer.

The LEMIS database is stored as an efficiently compressed .fst file, and loading it loads it a remote dplyr source. This means that it does not load fully into memory but can be filtered and manipulated on-disk. If you wish to manipulate it as a data frame, simply call dplyr::collect() to load it fully into memory, like so:

all_lemis <- lemis_data() %>% 
  collect()

Note that the full database will be ~1 GB in memory.

lemis_codes() returns a data frame with descriptions of the codes used by USFWS in the various columns of lemis_data(). This is useful for lookup or joining with the main data for more descriptive outputs. The ?lemis_code help file also has a searchable table of these codes.

Our paper (Smith et. al. 2017) provides a broader introduction to this data and its relevance to infectious disease. See the vignette for a more in-depth tutorial and example use cases for the package. See the developer README for more on the data cleaning process.

About

Please give us feedback or ask questions by filing issues.

lemis is developed at EcoHealth Alliance. Please note that this project is released with a Contributor Code of Conduct. By participating in this project, you agree to abide by its terms.

http://www.ecohealthalliance.org/



kephelps/LEMIS documentation built on May 7, 2019, 4:40 p.m.