Description Usage Arguments Value
View source: R/spatial_data_functions.R
Pull the latitude, longitude, and population for each grid cell associated with each location in a shapefile
1  | index_populated_grid_cells(pop, polys_sf, loc_field)
 | 
pop | 
 Population rasterLayer (representing a single year)  | 
polys_sf | 
 sf object representing polygons, with a field that has a unique identifier for each location  | 
loc_field | 
 Location identifier field in the polygons sf object  | 
A data.table containing four columns, where each row represents a grid cell: - <loc_field>: The location identifier - pop: Population - lat: Latitude - lon: Longitude
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.