get_ct_data: Get Dataframe of Matching Census Tract IDs

Description Usage Arguments Details Value Examples

Description

This function returns a dataframe with Census Tract ID data for a vector of Latitudes and Longitudes in a dataframe.

Usage

1
get_ct_data(Latitude, Longitude)

Arguments

Latitude

vector of Latitudes

Longitude

Vector of Longitudes

Details

Census Tract shapefiles can only be downloaded at the state level; as such, this function runs in a loop, downloading and matching the shapefile for each state. All shapefiles are the most precise boundary option with the exception of CA, which offers only smaller boundary data

It returns a dataframe with the following components: CT_GEOID: The GEOID of the Census Tract CT_NAME_LSAD: The Name of the Census Tract

It is IMPORTANT to note that the CT GEOID is an 11 character digit It is recommended that CT are matched at the same time that CT level data will be matched. If the file is saved and reimported, the ID must be padded to 11 digits, and must be set to not read out as scientific notation.

Value

A datafame with associated CT info. Will be in correct order as original Lat/Long to make it easy to append the data

Examples

1
2
3
CT<-get_ct_data(NEA$CoLatitude, NEA$CoLongitude)
NEA$CT_GEOID<-CT$CT_GEOID
NEA$CT_NameLSAD<-CT$CT_NameLSAD

gmellon/neaR documentation built on May 14, 2019, 2:42 p.m.