This function returns a dataframe with Census Tract ID data for a vector of Latitudes and Longitudes in a dataframe.
vector of Latitudes
Vector of Longitudes
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.
A datafame with associated CT info. Will be in correct order as original Lat/Long to make it easy to append the data
1 2 3
CT<-get_ct_data(NEA$CoLatitude, NEA$CoLongitude) NEA$CT_GEOID<-CT$CT_GEOID NEA$CT_NameLSAD<-CT$CT_NameLSAD
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.