| make_grid | R Documentation |
Create a spatial grid
make_grid(xlims, ylims, grid_int = 1)
xlims |
A two-element numeric vector for the left and right limits of your grid, in decimal degrees of longitude in which W coordinates are negative. |
ylims |
A two-element numeric vector for the bottom and top limits of your grid, in decimal degrees of latitude. |
grid_int |
The target interval (in north-south km) represented by each grid cell. This interval will be translated to degrees latitude and longitude. If your target is a square km, you may need to adjust this slightly to account for the smaller distance represented by a degree of longitude at higher latitudes. |
A data.frame with a row for every grid cell and the following columns:
y1 Bottom (southern) latitude boundary of the grid cell
y2 Top (northern) latitude boundary of the grid cell
y Center latitude of the grid cell
x1 Left (western) longitude of the grid cell
x2 Right (easter) longitude of the grid cell
x Center longitude of the grid cell
km2 Spatial area of the grid cell, in square km
id A unique identifier for each grid cell (1:nrow(grid))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.