Description Usage Arguments Details Value Examples
This function returns a dataframe with MSA data for a vector of Latitudes and Longitudes in a dataframe.
1 | get_msa_data(Latitude, Longitude, year = 2016)
|
Latitude |
vector of Latitudes |
Longitude |
Vector of Longitudes |
The package operates by matching Lat/Long to shapefiles of Metropolitan and Micropolitan Statistical Areas - from CBSA files. Then, the package matches Lat/Long that have not yet been coded to Metropolitan and Micropolitan NECTAS
It returns a dataframe with the following components: GEOID: The GEOID of the MSA or NECTA NAME_LSAD: The Name of the MSA or NECTA LSAD: A Code indicating whether it is a Metro or Micro MSA or NECTA -M1 are Metropolitan MSAs -M2 are Micropolitan MSAs -M5 are Metropolitan NECTAS -M6 are Micropolitan NECTAS Source: A constructed variable, indicating if the boundaries were based on NECTA or MSAs
A datafame with associated MSA info. Will be in correct order as original Lat/Long to make it easy to append the data
1 2 3 | msas<-get_msa_data(NEA$CoLatitude, NEA$CoLongitude)
NEA$MSA_GEOID<-msa$csba_GEOID
NEA$MSA_NameLSAD<-msa$cbsa_NameLSAD
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.