Skip to content

Commit

Permalink
Update webpage
Browse files Browse the repository at this point in the history
  • Loading branch information
MikkoVihtakari committed Jul 5, 2023
1 parent 9589195 commit 5998812
Show file tree
Hide file tree
Showing 22 changed files with 86 additions and 40 deletions.
2 changes: 2 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ knitr::opts_chunk$set(

**Breaking news (pun intended): ggOceanMaps goes [sf](https://r-spatial.github.io/sf/)!** Most of ggOceanMaps code has been rewritten. There are plenty of new features in 2.0 (see [this](https://mikkovihtakari.github.io/ggOceanMaps/articles/new-features.html)), but likely also many new bugs. Please [report them here](https://github.com/MikkoVihtakari/ggOceanMaps/issues).

**Note:** There is a critical bug in the CRAN version (2.0.0) which prevents automatic downloads on Windows. **Please use the GitHub version for now**: `remotes::install_github("MikkoVihtakari/ggOceanMaps")`

## Overview

The ggOceanMaps package for [R](https://www.r-project.org/) allows plotting data on bathymetric maps using [ggplot2](https://ggplot2.tidyverse.org/reference). The package is designed for ocean sciences and greatly simplifies bathymetric map plotting anywhere around the globe. ggOceanMaps uses openly available geographic data. Citing the particular data sources is advised by the CC-BY licenses whenever maps from the package are published (see the [*Citations and data sources*](#citations-and-data-sources) section).
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# ggOceanMaps

**Plot data on oceanographic maps using ggplot2. R package version
2.0.2**
2.0.4**

<!-- badges: start -->

Expand All @@ -20,6 +20,10 @@ been rewritten. There are plenty of new features in 2.0 (see
but likely also many new bugs. Please [report them
here](https://github.com/MikkoVihtakari/ggOceanMaps/issues).

**Note:** There is a critical bug in the CRAN version (2.0.0) which
prevents automatic downloads on Windows. **Please use the GitHub version
for now**: `remotes::install_github("MikkoVihtakari/ggOceanMaps")`

## Overview

The ggOceanMaps package for [R](https://www.r-project.org/) allows
Expand Down Expand Up @@ -193,7 +197,7 @@ citation("ggOceanMaps")
#> To cite package 'ggOceanMaps' in publications use:
#>
#> Vihtakari M (2023). _ggOceanMaps: Plot Data on Oceanographic Maps
#> using 'ggplot2'_. R package version 2.0.2,
#> using 'ggplot2'_. R package version 2.0.4,
#> <https://mikkovihtakari.github.io/ggOceanMaps/>.
#>
#> A BibTeX entry for LaTeX users is
Expand All @@ -202,7 +206,7 @@ citation("ggOceanMaps")
#> title = {ggOceanMaps: Plot Data on Oceanographic Maps using 'ggplot2'},
#> author = {Mikko Vihtakari},
#> year = {2023},
#> note = {R package version 2.0.2},
#> note = {R package version 2.0.4},
#> url = {https://mikkovihtakari.github.io/ggOceanMaps/},
#> }
```
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 44 additions & 21 deletions docs/articles/new-features.html

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ articles:
poster: poster.html
premade-maps: premade-maps.html
premade-shapefiles: premade-shapefiles.html
last_built: 2023-07-05T11:08Z
last_built: 2023-07-05T13:35Z

4 changes: 2 additions & 2 deletions docs/reference/get_depth.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/search.json

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions vignettes/new-features.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,22 @@ Note that shapefiles providing better polygon bathymetry resolution in ggOceanMa

Since the new bathymetry system is mostly raster based now, it is advised to **save the maps made by ggOceanMaps in raster format** (most journals accept [jpeg](https://stat.ethz.ch/R-manual/R-patched/library/grDevices/html/png.html)s with highest quality setting and >= 600 ppi `res`olution). To **learn more about the new bathymetry system**, please check out the [User Manual](https://mikkovihtakari.github.io/ggOceanMaps/articles/ggOceanMaps.html)

# Get depth from bathymetry grids

(Added to v2.0.4, which is currently available on GitHub, but not on CRAN). Thanks to the shift to raster bathymetries, it is easy to use ggOceanMaps to estimate depth (and whether the point is on land) now:

```{r, timeit = TRUE}
lon = deg_to_dd(seq(0,360,30)); lat = c(80,50,20,0,-20,-50,-80)
dt <- data.frame(
lon = rep(lon, length(lat)), lat = rep(lat, each = length(lon)))
dt <- get_depth(dt)
```

```{r, fig.cap = "Depth of data frame coordinates extracted from the raster_continuous ETOPO 60 arc-second dataset. Grey (NA) indicates coordinates on land."}
qmap(dt, color = depth) +
scale_color_viridis_c()
```

# The new world is round - sometimes

The [sf package uses round-Earth model](https://cran.r-project.org/web/packages/sf/vignettes/sf7.html) ([s2](https://CRAN.R-project.org/package=s2) package) instead of the flat-Earth model used by geos. While thinking round can be challenging when making polygons, ggOceanMaps attempts to use the s2 capabilities as much as possible - and you might encounter unexpected "features" as a consequence. The benefit of going round-Earth is that we can now use only one land polygon shapefile in decimal degrees, which gets projected to flat-Earth on the fly while plotting maps:
Expand Down

0 comments on commit 5998812

Please sign in to comment.