Description Usage Arguments Value
Locates spatial coordinates within user-specified regions.
| 1 | get_regions(df, regions, lat, long, X = NULL, Y = NULL, epsg = 4326)
 | 
| df | A data frame with lat/long or X/Y coordinates. | 
| regions | The type of region. Options include: "CAs", "districts", "tracts", "zips", and "wards." | 
| lat | Name of the field storing latitude. Should be in quotes. | 
| long | Name of the field storing longitude. Should be in quotes. | 
| X | The 'X coordinate' you find on some tables from the data portal. | 
| Y | The 'Y coordinate' you find on some tables from the data portal. Should use EITHER lat/long or X/Y but not both. | 
| epsg | The epsg. Only relevant if using lat/long. Default is 4326 (WSG84). | 
A data frame. More specifically, df + one or two regional variables. If region = "CAs", the CA number and name are added. For all other regions a single field is added: 'TRACTCE10" for tracts, "DIST_NUM" for districts, and "ZIP" for zips.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.