-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from afsc-gap-products/slope
v3.3.0
- Loading branch information
Showing
8 changed files
with
116 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Package: akgfmaps | ||
Type: Package | ||
Title: Alaska Groundfish and Ecosystem Survey Area Mapping | ||
Version: 3.2.0 | ||
Version: 3.3.0 | ||
Authors@R: c(person("Sean", "Rohan", email = "[email protected]", role = c("aut", "cre")), | ||
person("Jason", "Conner", email = "[email protected]", role = "ctb"), | ||
person("Liz", "Dawson", email = "[email protected]", role = "ctb"), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Return coordinates for plotting gridded data using make_2d_grid() | ||
|
||
### _Feature added in 3.3.0 (see [NEWS](/NEWS))_ | ||
|
||
This example show how to use the make_2d_grid() function to produce grid cell centroid | ||
coordinates that facilitate plotting data from 2d grids that are used for spatial | ||
analyses (e.g. using VAST or sdmTMB). Otherwise this would require post-processing | ||
manipulation of gridded data. | ||
|
||
The plotting coordinate columns (lon_plot and lat_plot) should only be used for | ||
visualization. | ||
|
||
``` r | ||
library(akgfmaps) | ||
|
||
ebs_layers <- akgfmaps::get_base_layers(select.region = "sebs", | ||
set.crs = "EPSG:3338") | ||
|
||
ebs_grid <- akgfmaps:::make_2d_grid(obj = ebs_layers$survey.strata, | ||
resolution = res, | ||
bbox = vast_bbox, | ||
output_type = "point", | ||
include_tile_center = TRUE) | ||
|
||
p1 <- ggplot() + | ||
geom_tile(data = ebs_grid, | ||
mapping = aes(x = lon_plot, | ||
y = lat_plot, | ||
fill = Stratum)) | ||
|
||
p1 | ||
``` | ||
|
||
![](/assets/ex_2d_grid_with_plot_centroids.png) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.