diff --git a/docs/404.html b/docs/404.html deleted file mode 100644 index 9df8cd8..0000000 --- a/docs/404.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - -Page not found (404) • SOmap - - - - - - - - - - - - - - - - - - -
-
- - - - -
-
- - -Content not found. Please use links in the navbar. - -
- - - -
- - - - -
- - - - - - - - diff --git a/docs/CODE_OF_CONDUCT.html b/docs/CODE_OF_CONDUCT.html deleted file mode 100644 index d3aa5ce..0000000 --- a/docs/CODE_OF_CONDUCT.html +++ /dev/null @@ -1,98 +0,0 @@ - -Contributor Code of Conduct • SOmap - - -
-
- - - -
-
- - -
- -

As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.

-

We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.

-

Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.

-

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.

-

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.

-

This Code of Conduct is adapted from the Contributor Covenant (http://contributor-covenant.org), version 1.0.0, available at http://contributor-covenant.org/version/1/0/0/

-
- -
- - - -
- - - -
- - - - - - - - diff --git a/docs/apple-touch-icon-120x120.png b/docs/apple-touch-icon-120x120.png deleted file mode 100644 index 2df133e..0000000 Binary files a/docs/apple-touch-icon-120x120.png and /dev/null differ diff --git a/docs/apple-touch-icon-60x60.png b/docs/apple-touch-icon-60x60.png deleted file mode 100644 index 4b178e6..0000000 Binary files a/docs/apple-touch-icon-60x60.png and /dev/null differ diff --git a/docs/apple-touch-icon-76x76.png b/docs/apple-touch-icon-76x76.png deleted file mode 100644 index c14bc9a..0000000 Binary files a/docs/apple-touch-icon-76x76.png and /dev/null differ diff --git a/docs/apple-touch-icon.png b/docs/apple-touch-icon.png deleted file mode 100644 index 81a4377..0000000 Binary files a/docs/apple-touch-icon.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction.html b/docs/articles/SOmap-introduction.html deleted file mode 100644 index 8384859..0000000 --- a/docs/articles/SOmap-introduction.html +++ /dev/null @@ -1,810 +0,0 @@ - - - - - - - -SOmap-introduction • SOmap - - - - - - - - - - - - - - - - - - - -
-
- - - - -
-
- - - - -
-

SOmap introduction -

-

This vignette was adapted from the SCAR-EGABI Tools for -Southern Ocean Spatial Analysis and Modelling course and Mapping in R -workshop.

-
-
-

Background -

-
-

Maps in R -

-

The oldest and most core general mapping package in R is the -maps package. It has a simple whole-world coastline data -set for immediate use.

-
-maps::map()
-

-

The data underlying this live map is available by capturing the -output as an actual object. Notice that the coastline for Antarctica -does not extend to the south pole, and that parts of Russia that are -east of 180 longitude are not in the western part of the map.

-
-m <- maps::map(plot = FALSE)
-
-lonlat <- cbind(m$x, m$y)
-
-plot(lonlat, pch = "+", cex = 0.4, axes = FALSE)
-lines(lonlat, col = "dodgerblue")
-
-abline(h = c(-90, 90), v = c(-180, 180))
-

-

A very similar and more modern data set is available in the -maptools package.

-
-data("wrld_simpl", package = "maptools")
-library(sp)
-plot(wrld_simpl)
-

-

This data set aligns exactly to the conventional -180/180 -90/90 -extent of the longitude/latitude projection.

-
-plot(0, type = "n", axes = FALSE, xlab = "", ylab = "", xlim = c(-180, 180), ylim = c(-90, 90))
-rect(xleft = -180, ybottom = -90, xright = 180, ytop = 90, border = "darkred", lwd = 4, lty = 2)
-plot(wrld_simpl, add = TRUE)
-

-
-

Exercises -

-
    -
  1. How can we find the longitude and latitude ranges of the maps data -m and the maptools data wrld_simpl?
  2. -
  3. Can we draw polygons with a fill colour with the maps package?
  4. -
-

Answer 1: range(m$x, na.rm = TRUE) -range(m$y, na.rm = TRUE) also m$range

-

Answer 2: polygon(lonlat, col = "grey") does not work, -and map(mp, fill = TRUE, col = "grey") does not work, but -maps::map(fill = TRUE, col = "grey") does seem to work.

-

What’s going on? Look at the very south-eastern corner of the map. -The “coastline” has been extended to the very south boundary of the -available area.

-
-plot(0, type = "n", axes = FALSE, xlab = "", ylab = "", xlim = c(-150, 180), ylim = c(-90, -60))
-plot(wrld_simpl, add = TRUE, col = "grey")
-rect(xleft = -180, ybottom = -90, xright = 180, ytop = 90, border = "darkred", lwd = 4, lty = 2)
-
-maps::map(add = TRUE, col = "dodgerblue", lwd = 3)
-

-

When we add the old maps coastline see that it does not extend to 90S -and it does not traverse the southern boundary.

-

One reason for this is that if we choose a projection where the east -and west edges of the Antarctic coastline meet then we get what looks a -fairly clean join.

-
-## scale factor
-f <- 3e6
-plot(rgdal::project(lonlat, "+proj=laea +lat_0=-90 +datum=WGS84"), asp = 1, type = "l",
-     xlim = c(-1, 1) * f, ylim = c(-1, 1) * f, xlab = "", ylab = "")
-

-

If we try the same with wrld_simpl it’s not as neat. We -have a strange “seam” that points exactly to the south pole (our -projection is centred on longitude = 0, and latitude = -90.

-
-plot(sp::spTransform(wrld_simpl, "+proj=laea +lat_0=-90 +datum=WGS84"), asp = 1,
-     xlim = c(-1, 1) * f, ylim = c(-1, 1) * f, xlab = "", ylab = "", lwd = 3)
-abline(v = 0, h = 0, lty = 2, col = "grey")
-

-
-
-

Let’s use the maps data! -

-

In m we have the maps data structure, and this looks -promising.

-
-str(m)
-#> List of 4
-#>  $ x    : num [1:82403] -69.9 -69.9 -69.9 -70 -70.1 ...
-#>  $ y    : num [1:82403] 12.5 12.4 12.4 12.5 12.5 ...
-#>  $ range: num [1:4] -180 190.3 -85.2 83.6
-#>  $ names: chr [1:1627] "Aruba" "Afghanistan" "Angola" "Angola:Cabinda" ...
-#>  - attr(*, "class")= chr "map"
-
-mp <- m
-pxy <- rgdal::project(lonlat, "+proj=laea +lat_0=-90 +datum=WGS84")
-mp$x <- pxy[,1]
-mp$y <- pxy[,2]
-mp$range <- c(range(mp$x,na.rm = TRUE), range(mp$y, na.rm = TRUE))
-mp$range
-#> [1] -12709814  12704237 -12576156  12470787
-plot(c(-1, 1) * f, c(-1, 1) * f, type = "n", asp = 1)
-maps::map(mp, add = TRUE)
-

-
-
-
-## but it doesn't take much to go awry
-plot(c(-1, 1) * f, c(-1, 1) * f, type = "n", asp = 1)
-maps::map(mp, add = TRUE, fill = TRUE, col = "grey")
-

-

The problem is that the maps database has enough internal structure -to join lines correctly, with NA gaps between different -connected linestrings, but not enough to draw these things as polygons. -A similar problem occurs in the default projection. While -wrld_simpl has been extend by placing two dummy coordinates -at the east and west versions of the south pole, this data set does not -have those.

-

We have to look quite carefully to understand what is happening, but -this is wrapping around overlapping itself and so close to the southern -bound we barely notice.

-
-plot(0, type = "n", axes = FALSE, xlab = "", ylab = "", xlim = c(-180, -110), ylim = c(-90, -60))
-
-rect(xleft = -180, ybottom = -90, xright = 180, ytop = 90, border = "darkred", lwd = 4, lty = 2)
-
-maps::map(add = TRUE,col = "grey", fill = TRUE)
-

-
-
-maps::map(col = "grey", fill = TRUE)
-

-
-
-
-mpmerc <- m
-pxy <- rgdal::project(lonlat, "+proj=merc +datum=WGS84")
-mpmerc$x <- pxy[,1]
-mpmerc$y <- pxy[,2]
-mpmerc$range <- c(range(mpmerc$x,na.rm = TRUE), range(mpmerc$y, na.rm = TRUE))
-mpmerc$range
-#> [1] -20037508  20037508 -20179524  18351859
-
-## the catastrophe made a little clearer 
-plot(0, xlim = range(mpmerc$range[1:2]), ylim = c(mpmerc$range[1], 0))
-maps::map(mpmerc,  fill = TRUE, col = "grey", add = TRUE)
-

-
-
-
-
-

SOmap -

-

The SOmap package is intended to solve some of these -problems, and provide an easier way to produce nice-looking maps of -Antarctica and the Southern Ocean. It is primarily focused on maps in -polar stereographic projection (although the SOmap_auto -function extends this to other projections). SOmap won’t -necessarily get you exactly the map you want in every circumstance, but -the idea is that in most cases it should get you close enough, and if -need be you can make modifications to suit your exact purposes.

-

Please bear in mind that SOmap is still in development, -and so its functionality (function parameters and/or behaviour) may -change.

-

By default, SOmap works with base graphics (and -associated functionality from packages such as raster and -sp). It is also possible to work with -ggplot2-based graphics, as described below.

-

Start by installing the SOmap package if you haven’t -done so already:

-
-remotes::install_github("AustralianAntarcticDivision/SOmap")
-

Then load the package:

-
-library(SOmap)
-#> Loading required package: raster
-## also define a colour map to use for some examples
-my_cmap <- colorRampPalette(c("#4D4140", "#596F7E", "#168B98", "#ED5B67",
-                              "#E27766", "#DAAD50", "#EAC3A6"))(51)
-
-

Circumpolar maps -

-

A basic circumpolar map in polar stereographic projection. Here we -save our map to the base_plot variable, so that we can use -it again later without re-generating the map from scratch each time:

-
-base_map <- SOmap()
-plot(base_map)
-

-

SOmanagement() provides a number of contextual layers -such as MPA boundaries and management zones.

-
-SOmap(trim = -40) ## plot to 40S
-## add the exclusive economic zones management layer
-SOmanagement(eez = TRUE)
-

-
-
Adding points -
-
-## some longitude/latitude data
-library(sp)
-my_points_ll <- data.frame(lon = seq(0, 350, by = 10), lat = -55, z = runif(36))
-coordinates(my_points_ll) <- c("lon", "lat")
-projection(my_points_ll) <- "+proj=longlat +datum=WGS84"
-

Our data need to be reprojected to match our map before plotting. The -SOproj function does this:

-
-## reproject to our SOmap projection
-my_points <- SOproj(my_points_ll)
-## and plot
-plot(base_map)
-plot(my_points, col = "blue", add = TRUE)
-

-

Or use SOplot to reproject and plot in one step:

-
-plot(base_map)
-SOplot(my_points_ll, col = "blue")
-

-
-
-
Adding raster layers -
-

First let’s construct some artificial raster data (in -longitude-latitude space) for demonstration purposes:

-
-library(raster)
-temp <- as.data.frame(expand.grid(lon = seq(100, 140, by = 0.25),
-                                  lat = seq(-65, -45, by = 0.1)))
-temp$val <- sqrt((temp$lon - 120)^2/3 + (temp$lat - -40)^2/5)
-## create raster object
-xr <- rasterFromXYZ(temp)
-projection(xr) <- "+proj=longlat +datum=WGS84"
-

SOplot will reproject and plot this for us:

-
-plot(base_map)
-SOplot(xr)
-

-

The legend is out of character with the rest of the map. We can use -SOleg to fix that:

-
-## draw the base map
-plot(base_map)
-## add our raster
-SOplot(xr, legend = FALSE, col = my_cmap)
-## add the legend
-SOleg(xr, position = "topright", col = my_cmap, ticks = 6,
-      type = "continuous", label = "My variable")
-

-

OK, well that worked but clearly the labels need tidying up. The -easiest way is probably to set the number of decimal places in the label -values via the rnd parameter:

-
-plot(base_map)
-SOplot(xr, legend = FALSE, col = my_cmap)
-SOleg(xr, position = "topright", col = my_cmap, ticks = 6, rnd = 2,
-      type = "continuous", label = "My variable")
-

-

Alternatively, we could explicitly set the colour range and -labels.

-
-## draw the base map
-plot(base_map)
-## add our raster, controlling the colour range to span the values 0 to 30
-colour_breaks <- seq(0, 30, length.out = length(my_cmap) + 1)
-SOplot(xr, legend = FALSE, col = my_cmap, breaks = colour_breaks)
-## add the legend, again controlling the colour range
-label_breaks <- seq(0, 30, length.out = 7)
-SOleg(position = "topright", col = my_cmap, breaks = label_breaks,
-      type = "continuous", label = "My variable")
-

-

Note that if we don’t want to show the bathymetric legend, -we may run into problems:

-
-SOmap(bathy_legend = FALSE) ## suppress the bathy legend
-SOleg(position = "topright", col = my_cmap, breaks = label_breaks,
-      type = "continuous", label = "My variable")
-

-

The legend has been chopped off because the layout has not left -enough space around the map for the curved legend. There are a couple of -ways around this. The elegant way is to specify -bathy_legend = "space", which will leave appropriate space -for a bathymetry legend but not actually plot it. This will also have -the effect of leaving adequate space for other legends:

-
-SOmap(bathy_legend = "space")
-SOleg(position = "topright", col = my_cmap, breaks = label_breaks,
-      type = "continuous", label = "My variable")
-

-

The second, rather hackier way is to generate the SOmap -object with the bathymetric legend, but then remove the -bathymetric legend before plotting:

-
-temp <- base_map
-temp$bathy_legend <- NULL ## remove the bathy legend
-plot(temp)
-SOleg(position = "topright", col = my_cmap, breaks = label_breaks,
-      type = "continuous", label = "My variable")
-

-

See the Modifying map -objects section below for more details on modifying map objects.

-

Multiple rasters:

-
-xr2 <- raster::shift(xr, -70) ## offset in longitude
-plot(base_map)
-SOplot(xr, legend = FALSE, col = my_cmap)
-SOplot(xr2, legend = FALSE, col = my_cmap)
-

-
-
-
Create a raster from points -
-

Let’s say that we have a large number of points that we wish to add -to the map. We could simply add them:

-
-points <- data.frame(lon = runif(1000, min = 30, max = 90), lat = runif(1000, min = -70, max = -50))
-plot(base_map)
-SOplot(x = points$lon, y = points$lat, pch = 19, col = 2)
-

-

However, the overlap of the points reduces the utility of the map. -One option is to create a density layer, showing the number of points -that fall into each cell of a raster grid. The SObin -function can do this for us:

-
-plot(base_map)
-SObin(x = points$lon, y = points$lat, dim = c(100, 100),
-      col = hcl.colors(100, "Viridis"), legend = FALSE, add = TRUE)
-

-
-
-
-

Non-circumpolar maps -

-

The SOmap_auto function will take your input data and -make a guess at an appropriate projection and extent to use. Note that -this is not always going to guess the best projection and -extent, so you should view it as a starting point from which you can -generate a map to your exact requirements.

-

Use the elephant seal track data bundled with the package:

-
-ellie <- SOmap_data$mirounga_leonina
-## construct and plot the map
-SOmap_auto(ellie$lon, ellie$lat)
-

-

Just a blank map to which you could add other things:

-
-SOmap_auto(ellie$lon, ellie$lat, input_points = FALSE, input_lines = FALSE)
-

-

You can pass a raster as input data, but note that it won’t plot the -raster (it uses its extent to infer an appropriate extent for the -map):

- -

-

But we can add the raster if we wish:

-
-SOmap_auto(xr)
-SOplot(xr, col = my_cmap)
-

-

We can force a particular projection:

-
-SOmap_auto(xr, target = "laea", centre_lon = 147, centre_lat = -42)
-SOplot(xr, col = my_cmap)
-

-

Same but by supplying a full proj4 string to target:

-
-SOmap_auto(xr, target = "+proj=laea +lat_0=-42 +lon_0=147")
-SOplot(xr, col = my_cmap)
-

-

See the -SOmap_auto vignette for more examples.

-
-
-

Plotting via ggplot2 -

-

The SOmap and SOmap_auto functions do their -plotting using base graphics. If you are more comfortable working with -ggplot2, this is also possible. The SOgg -function takes an object created by one of those functions (using base -graphics) and converts it to use ggplot2 graphics instead. -As with other SOmap functions, this returns an object (of -class SOmap_gg or SOmap_auto_gg) that contains -all of the information needed to generate the map. Printing or plotting -this object will cause it to construct a ggplot object. -Printing or plotting that object will cause it to be drawn to -the graphics device, just like any other ggplot object.

-
-myplotgg <- SOgg(base_map) ## creates a SOmap_gg object
-class(myplotgg)
-#> [1] "SOmap_gg"
-my_ggplot <- plot(myplotgg) ## creates a ggplot object
-class(my_ggplot)
-#> [1] "gg"     "ggplot"
-plot(my_ggplot) ## plot it
-

-

Or in one step (this will cause myplot to be converted to SOmap’s -internal gg format, then a ggplot object constructed from that, then -that object will be plotted):

-
-SOgg(base_map)
-

-
-
-

Modifying map objects (advanced usage) -

-

The goal of SOmap is to make it fairly easy to produce a -fairly-good-looking map that will be adequate for most mapping -requirements. It will never be possible to automatically produce a -perfect map in every circumstance, but the aim is to -have a low-effort way of getting fairly close most of the time.

-

This section describes some approaches to modifying a map to get it -closer to your particular needs. Be warned: depending on the exact -modifications needed, this might get you pretty close to the crumbling -edge of SOmap development. In particular, anything that -requires modifying the internal structure of an SOmap -object may change in the future (with luck, we’ll make this sort of -thing easier - but we’re not there yet.)

-
-
Modifying base graphics maps -
-

Calls to SOmap(), SOmanagement(), -SOmap_auto() return an object of class SOmap, -SOmap_management, or SOmap_auto. These objects -contain all of the data and plotting instructions required to draw the -map. Calling print() or plot() on one of these -objects will cause that code to be executed, and the object to be drawn -in the current graphics device. Hence, calling SOmap() -directly without assigning the result to a variable will make -it appear in the graphics device, because the returned object is being -printed to the console (and thus triggering the print -method). But you can also assign the result to a variable, -e.g. myplot <- SOmap() and then explicitly plot the -object with plot(myplot). The advantage of this is that you -can potentially manipulate the myplot object to make -changes to the map before plotting it.

-

Note, this is likely to be fragile. Proceed at your own risk!

-
-mymap <- base_map
-names(mymap)
-#>  [1] "projection"    "target"        "straight"      "trim"         
-#>  [5] "bathy"         "box"           "plot_sequence" "coastline"    
-#>  [9] "ice"           "outer_mask"    "bathy_legend"  "border"
-

The object contains a plot_sequence component, which -defines the order in which each part of the plot is drawn. The other -components of the object contain the code required to draw each part. -Take e.g. the ice component (this is the ice shelves, glacier tongues, -etc). This is a list (in this case with only one element). Each element -of the list is an object of class SO_plotter, which is a -SOmap-specific object that specifies a function to run along with -arguments to pass to it:

-
-str(mymap$ice)
-#> List of 1
-#>  $ :List of 2
-#>   ..$ plotfun : chr "plot"
-#>   ..$ plotargs:List of 4
-#>   .. ..$ x     :sfc_POLYGON of length 354; first list element: List of 1
-#>   .. .. ..$ : num [1:5, 1:2] 1022981 1026000 1021994 1021935 1022981 ...
-#>   .. .. ..- attr(*, "class")= chr [1:3] "XY" "POLYGON" "sfg"
-#>   .. ..$ col   : logi NA
-#>   .. ..$ border: chr "black"
-#>   .. ..$ add   : logi TRUE
-#>   ..- attr(*, "class")= chr "SO_plotter"
-

We can modify the function and/or its arguments:

-
-mymap$ice[[1]]$plotargs$col <- "green"
-
-plot(mymap)
-

-

We can remove entire components, either by setting the component to -NULL or removing its name from the -plot_sequence:

-
-temp <- mymap
-temp$coastline <- NULL ## set the coastline object to NULL
-temp$plot_sequence <- setdiff(temp$plot_sequence, "ice") ## remove "ice" from plot_sequence
-plot(temp) ## map without coastline or ice shown
-

-

But note that some elements are required. In particular, the -bathymetry layer can’t currently be removed because the code that draws -this is also the code that creates the plot page via -plot.new(). The code below would fail outright if there was -no existing existing plot. If there was an existing plot in the graphics -device, this code would run but give unpredictable results because it -would draw on top of the previously-setup plot:

-
-## code not run here
-temp <- mymap
-temp$bathy <- NULL
-plot(temp)
-

One way around this would be to simply replace all of the bathymetric -data values with NAs. The plotting code would still have -the extent of the bathymetric layer that it needs in order to set up the -plot, but no data would be shown:

-
-temp <- mymap
-## the bathy data is held in temp$bathy[[1]]$plotargs$x
-## and it's a raster, so we can set its values to NA with
-raster::values(temp$bathy[[1]]$plotargs$x) <- NA_real_
-temp$bathy_legend <- NULL
-plot(temp)
-

-

We could also replace the bathymetry data with another raster object. -Note that we do need to be careful about the extent and projection of -this raster. For example, replacing the bathymetry raster with the ice -raster (which has the same polar stereographic projection but smaller -extent) gives:

-
-temp <- mymap
-temp$bathy[[1]]$plotargs$x <- ice
-temp$bathy_legend <- NULL
-plot(temp)
-

-

It’s chopped off because the extent of the ice raster is being used -to set the plot extent. But if we extend the ice raster to match the map -extent:

-
-temp <- mymap
-temp$bathy[[1]]$plotargs$x <- raster::extend(ice, mymap$target)
-temp$bathy_legend <- NULL
-plot(temp)
-

-
-
-
Combining map objects -
-

A new function in SOmap version 0.6 is SOmerge, which -can take separate objects and combine them into a single map. For -example:

-
-mymap <- SOmap(bathy_legend = "space")
-mylegend <- SOleg(x = runif(100), position = "topright", col = hcl.colors(80, "Viridis"),
-                  breaks = c(0.1, 0.2, 0.5, 0.9), trim = -45, label = "Thing",
-                  rnd = 1, type = "continuous")
-mymgmt <- SOmanagement(eez = TRUE, basemap = mymap)
-merged <- SOmerge(mymap, mymgmt, mylegend)
-plot(merged)
-

-
-
-
Modifying ggplot maps -
-

We can modify ggplot2-based maps at two levels.

-
-
Modifying the ggplot object. -
-

Remember that printing or plotting a SOmap_gg object -produces a ggplot object. This can be modified by adding -e.g. layers or themes just like a normal ggplot. Remember -to load the ggplot2 library now that we are using -ggplot2 functions directly.

-
-library(ggplot2)
-my_ggplot + geom_point(data = as.data.frame(my_points), aes(lon, lat, colour = z), size = 3) +
-  scale_colour_distiller(palette = "Spectral")
-

-

Multiple rasters or multiple sets of points gets tricky if they are -on different scales, because ggplot2 is only designed to -work with a single colour scale per geometry type. However, the -ggnewscale package can be used to add multiple fill or -colour scales.

-
-library(ggnewscale)
-plot(SOgg(SOmap(straight = TRUE))) +
-  new_scale_fill() +
-  geom_raster(data = as.data.frame(SOproj(xr), xy = TRUE),
-                  aes(x = x, y = y, fill = val)) +
-  scale_fill_gradientn(colors = my_cmap, na.value = NA, name = "My variable")
-

-
-
-
Modifying the SOmap_gg object -
-

SOmap_gg objects are similar in structure to -SOmap objects, in that they contain all of the data and -plotting instructions required to draw the map:

-
-names(myplotgg)
-#>  [1] "projection"    "target"        "straight"      "trim"         
-#>  [5] "init"          "bathy"         "coord"         "plot_sequence"
-#>  [9] "scale_fill"    "bathy_legend"  "coastline"     "ice"          
-#> [13] "axis_labels"   "theme"         "border"
-

However, instead of base plotting functions, SOmap_gg -objects use ggplot2 function calls, e.g.:

-
-myplotgg$ice[[1]]$plotfun
-#> [1] "ggplot2::geom_sf"
-

We can modify these functions and/or arguments in a similar manner to -SOmap objects.

-
-myplotgg$ice[[1]]$plotargs$fill <- "green"
-
-plot(myplotgg)
-

-

Or remove the bathymetric raster layer:

-
-temp <- myplotgg
-temp$bathy <- NULL
-temp$bathy_legend <- NULL
-plot(temp)
-

-

Or replace it with a different raster (use the ice -raster as an example):

-
-temp <- myplotgg
-## convert ice raster to suitable data.frame
-ice_raster_as_df <- raster::as.data.frame(SOproj(ice), xy = TRUE)
-names(ice_raster_as_df)[3] <- "ice"
-## add this to our object in place of bathy
-temp$bathy <- SO_plotter(plotfun = "ggplot2::geom_raster",
-                         plotargs = list(data = ice_raster_as_df,
-                                         mapping = aes_string(fill = "ice")))
-## change the colour scale
-temp$scale_fill[[1]]$plotargs <- list(colours = my_cmap, na.value = "#FFFFFF00", guide = "none")
-## remove the bathy legend
-temp$bathy_legend <- NULL
-plot(temp)
-

-
-
-
-
-

Other SOmap gotchas -

-

Some other things worth noting.

-
-
Automatic printing and for-loops -
-

If you type a variable/object name directly into the console then it -triggers that object’s print method automatically. Typing -SOmap() at the console returns an object of class -SOmap, and because it’s happening at the console that -object’s print method is called, which causes the map to be -plotted in the current graphics device.

-

However, R turns off automatic printing inside for loops -and functions. So this code:

-
-for (i in 1:5) {
-  SOmap_auto()
-}
-

won’t produce anything, because the print method never -gets called. If you are generating maps using loops, you will need to -explicitly call the print method:

-
-for (i in 1:5) {
-  print(SOmap_auto())
-}
-
-
-
-

Supporting data for maps -

-

When constructing maps, we commonly want to show features like -oceanographic fronts, ice extent, coastline, place names, and MPA -boundaries. There are a few sources of such data:

- -
-
-
- - - -
- - - - -
- - - - - - - - diff --git a/docs/articles/SOmap-introduction_files/accessible-code-block-0.0.1/empty-anchor.js b/docs/articles/SOmap-introduction_files/accessible-code-block-0.0.1/empty-anchor.js deleted file mode 100644 index ca349fd..0000000 --- a/docs/articles/SOmap-introduction_files/accessible-code-block-0.0.1/empty-anchor.js +++ /dev/null @@ -1,15 +0,0 @@ -// Hide empty tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) --> -// v0.0.1 -// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020. - -document.addEventListener('DOMContentLoaded', function() { - const codeList = document.getElementsByClassName("sourceCode"); - for (var i = 0; i < codeList.length; i++) { - var linkList = codeList[i].getElementsByTagName('a'); - for (var j = 0; j < linkList.length; j++) { - if (linkList[j].innerHTML === "") { - linkList[j].setAttribute('aria-hidden', 'true'); - } - } - } -}); diff --git a/docs/articles/SOmap-introduction_files/figure-html/laea-1.png b/docs/articles/SOmap-introduction_files/figure-html/laea-1.png deleted file mode 100644 index 5020a09..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/laea-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/lon180-lat90-1.png b/docs/articles/SOmap-introduction_files/figure-html/lon180-lat90-1.png deleted file mode 100644 index 446d63c..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/lon180-lat90-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/maps-assign-1.png b/docs/articles/SOmap-introduction_files/figure-html/maps-assign-1.png deleted file mode 100644 index b02e28c..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/maps-assign-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/maps-data-1.png b/docs/articles/SOmap-introduction_files/figure-html/maps-data-1.png deleted file mode 100644 index 51be8d7..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/maps-data-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/maps-data-2.png b/docs/articles/SOmap-introduction_files/figure-html/maps-data-2.png deleted file mode 100644 index 82bc03a..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/maps-data-2.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/maps-package-1.png b/docs/articles/SOmap-introduction_files/figure-html/maps-package-1.png deleted file mode 100644 index d5c61b3..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/maps-package-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/no-pole-1.png b/docs/articles/SOmap-introduction_files/figure-html/no-pole-1.png deleted file mode 100644 index 13e7e66..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/no-pole-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/no-pole-2.png b/docs/articles/SOmap-introduction_files/figure-html/no-pole-2.png deleted file mode 100644 index 885e1f6..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/no-pole-2.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/no-pole-3.png b/docs/articles/SOmap-introduction_files/figure-html/no-pole-3.png deleted file mode 100644 index ec20e00..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/no-pole-3.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/soauto1-1.png b/docs/articles/SOmap-introduction_files/figure-html/soauto1-1.png deleted file mode 100644 index 06e1f63..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/soauto1-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/soauto2-1.png b/docs/articles/SOmap-introduction_files/figure-html/soauto2-1.png deleted file mode 100644 index 52508e0..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/soauto2-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/soauto3-1.png b/docs/articles/SOmap-introduction_files/figure-html/soauto3-1.png deleted file mode 100644 index 0ee4238..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/soauto3-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/soauto4-1.png b/docs/articles/SOmap-introduction_files/figure-html/soauto4-1.png deleted file mode 100644 index 1fcc312..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/soauto4-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/soauto5-1.png b/docs/articles/SOmap-introduction_files/figure-html/soauto5-1.png deleted file mode 100644 index 53570fc..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/soauto5-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/soauto6-1.png b/docs/articles/SOmap-introduction_files/figure-html/soauto6-1.png deleted file mode 100644 index 53570fc..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/soauto6-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/sobin1-1.png b/docs/articles/SOmap-introduction_files/figure-html/sobin1-1.png deleted file mode 100644 index c7cca08..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/sobin1-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/sobin2-1.png b/docs/articles/SOmap-introduction_files/figure-html/sobin2-1.png deleted file mode 100644 index b58f292..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/sobin2-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap1-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap1-1.png deleted file mode 100644 index 41a48f1..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap1-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap2-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap2-1.png deleted file mode 100644 index e3a8c7a..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap2-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap2d-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap2d-1.png deleted file mode 100644 index 63dba44..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap2d-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap2e-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap2e-1.png deleted file mode 100644 index a39c028..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap2e-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap2g-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap2g-1.png deleted file mode 100644 index ed6202f..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap2g-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap2h-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap2h-1.png deleted file mode 100644 index e20ccce..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap2h-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap2h2-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap2h2-1.png deleted file mode 100644 index e08bc5c..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap2h2-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap3-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap3-1.png deleted file mode 100644 index 52a1b6b..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap3-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap4-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap4-1.png deleted file mode 100644 index 52a1b6b..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap4-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap5c-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap5c-1.png deleted file mode 100644 index ec32b5b..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap5c-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap5d-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap5d-1.png deleted file mode 100644 index 741ae2e..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap5d-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap5e-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap5e-1.png deleted file mode 100644 index 92f2ce2..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap5e-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap5f-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap5f-1.png deleted file mode 100644 index fff6c9d..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap5f-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap5g-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap5g-1.png deleted file mode 100644 index 8f68705..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap5g-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap6-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap6-1.png deleted file mode 100644 index 88fc66e..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap6-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap_legend1-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap_legend1-1.png deleted file mode 100644 index 3699e81..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap_legend1-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap_legend2-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap_legend2-1.png deleted file mode 100644 index 0bfbc9c..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap_legend2-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap_legend3-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap_legend3-1.png deleted file mode 100644 index 0bfbc9c..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap_legend3-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap_pts2-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap_pts2-1.png deleted file mode 100644 index a1cf6c9..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap_pts2-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap_pts3-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap_pts3-1.png deleted file mode 100644 index a1cf6c9..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap_pts3-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap_raster2-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap_raster2-1.png deleted file mode 100644 index da8ef1d..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap_raster2-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap_raster3-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap_raster3-1.png deleted file mode 100644 index 745a27f..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap_raster3-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap_raster4-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap_raster4-1.png deleted file mode 100644 index 1c9d2a5..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap_raster4-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap_raster4rnd-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap_raster4rnd-1.png deleted file mode 100644 index da420b6..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap_raster4rnd-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somap_raster5-1.png b/docs/articles/SOmap-introduction_files/figure-html/somap_raster5-1.png deleted file mode 100644 index c1b7e5a..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somap_raster5-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/somerge1-1.png b/docs/articles/SOmap-introduction_files/figure-html/somerge1-1.png deleted file mode 100644 index 506892d..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/somerge1-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/south-east-1.png b/docs/articles/SOmap-introduction_files/figure-html/south-east-1.png deleted file mode 100644 index e281fc0..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/south-east-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/wrld-1.png b/docs/articles/SOmap-introduction_files/figure-html/wrld-1.png deleted file mode 100644 index 4355306..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/wrld-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/figure-html/wrld-simpl-1.png b/docs/articles/SOmap-introduction_files/figure-html/wrld-simpl-1.png deleted file mode 100644 index 51c2d55..0000000 Binary files a/docs/articles/SOmap-introduction_files/figure-html/wrld-simpl-1.png and /dev/null differ diff --git a/docs/articles/SOmap-introduction_files/header-attrs-2.1/header-attrs.js b/docs/articles/SOmap-introduction_files/header-attrs-2.1/header-attrs.js deleted file mode 100644 index dd57d92..0000000 --- a/docs/articles/SOmap-introduction_files/header-attrs-2.1/header-attrs.js +++ /dev/null @@ -1,12 +0,0 @@ -// Pandoc 2.9 adds attributes on both header and div. We remove the former (to -// be compatible with the behavior of Pandoc < 2.8). -document.addEventListener('DOMContentLoaded', function(e) { - var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); - var i, h, a; - for (i = 0; i < hs.length; i++) { - h = hs[i]; - if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 - a = h.attributes; - while (a.length > 0) h.removeAttribute(a[0].name); - } -}); diff --git a/docs/articles/index.html b/docs/articles/index.html deleted file mode 100644 index ce8736c..0000000 --- a/docs/articles/index.html +++ /dev/null @@ -1,91 +0,0 @@ - -Articles • SOmap - - -
-
- - - -
-
- - -
-

All vignettes

-

- -
SOmap-introduction
-
-
many-automap-examples
-
-
-
-
- - -
- - - - - - - - diff --git a/docs/articles/many-automap-examples.html b/docs/articles/many-automap-examples.html deleted file mode 100644 index 13c6bfe..0000000 --- a/docs/articles/many-automap-examples.html +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - - -many-automap-examples • SOmap - - - - - - - - - - - - - - - - - - - -
-
- - - - -
-
- - - - -
-library(SOmap)
-#> Loading required package: raster
-#> Loading required package: sp
-
-# lonrange, latrange
-# lonvec, latvec
-# sp, sf object
-# raster, stars object
-# file
-
-
-set.seed(1)
-SOmap_auto()
-

-
-SOmap_auto(target = "+proj=laea +lat_0=-20 +ellps=WGS84")
-

-
-llx <-  c(100, 120)
-lly <- c(-60, -30)
-SOmap_auto(llx, lly)
-

-
-SOmap_auto(llx, lly, target = NULL)
-

-
-SOmap_auto(cbind(llx, lly), target = NULL)
-

-
-SOmap_auto(SOmap_data$mirounga_leonina$lon, SOmap_data$mirounga_leonina$lat, target = "laea")
-

-
-SOmap_auto(SOmap_data$mirounga_leonina$lon, SOmap_data$mirounga_leonina$lat, centre_lon = 147)
-

-
-
-SOmap_auto(SOmap_data$mirounga_leonina$lon, SOmap_data$mirounga_leonina$lat, target = NULL)
-

-
-## causes crash for yet-to-be-investigated reasons
-SOmap_auto(ice)
-
-## causes crash for yet-to-be-investigated reasons
-SOmap_auto(ice, target = "laea", centre_lon = 147, centre_lat = -42)
-SOplot(ice, col = palr::ice_pal(100))
-
-## causes crash for yet-to-be-investigated reasons
-SOmap_auto(ice, centre_lon = 147, centre_lat = -42)
-SOplot(ice, col = palr::ice_pal(100))
-
-## causes crash for yet-to-be-investigated reasons
-SOmap_auto(ice, target = "merc", centre_lon = 147, centre_lat = -42)
-SOplot(ice, col = palr::ice_pal(100))
-
-SOmap_auto(x = c(10, 60), y = c(-40, -70))
-

-
-SOmap_auto(x=c(10,60), y=c(-40,-70), trim_background = FALSE)
-#> Warning in SOmap_auto_inner(x = x, y = y, centre_lon = centre_lon, centre_lat =
-#> centre_lat, : 'trim_background' argument to SOmap() is defunct
-

-
-x <- cbind(c(runif(50, -180, -160), runif(50, 160, 180)), runif(100, -65, -30))
-SOmap_auto(x)
-#> Warning in warp_in_memory_gdal_cpp(x, source_WKT = source_projection, target_WKT
-#> = projection, : GDAL Error 2: gdalwarpoperation.cpp, 1845: cannot allocate
-#> 29859840008 bytes
-

-
-x <- cbind(c(runif(50, -180, -130), runif(50, 160, 180)), runif(100, -65, -30))
-SOmap_auto(x)
-

-
-x <- cbind(c(runif(50, -180, -130), runif(50, 130, 180)), runif(100, -65, -30))
-SOmap_auto(x)
-#> Warning in warp_in_memory_gdal_cpp(x, source_WKT = source_projection, target_WKT
-#> = projection, : GDAL Error 2: gdalwarpoperation.cpp, 1845: cannot allocate
-#> 29859840008 bytes
-

-
-x <- cbind(c(runif(50, -180, -160), runif(50, 130, 180)), runif(100, -65, -30))
-SOmap_auto(x)
-#> Warning in warp_in_memory_gdal_cpp(x, source_WKT = source_projection, target_WKT
-#> = projection, : GDAL Error 2: gdalwarpoperation.cpp, 1845: cannot allocate
-#> 29859840008 bytes
-

-
-x <- cbind(c(runif(50, -180, -160), runif(50, 160, 180)), runif(100, -85, -50))
-
-SOmap_auto(x)
-

-
-x <- cbind(c(runif(50, -180, -130), runif(50, 160, 180)), runif(100, -85, -50))
-
-SOmap_auto(x)
-

-
-x <- cbind(c(runif(50, -180, -130), runif(50, 130, 180)), runif(100, -85, -50))
-SOmap_auto(x)
-

-
-x <- cbind(c(runif(50, -180, -160), runif(50, 130, 180)), runif(100, -85, -50))
-SOmap_auto(x)
-

-

Handle missing values in input data.

-

temporarily turn this off …

-
-data("albatross", package = "adehabitatLT")
-## convert the albatross data to a single matrix of lon, lat points
-albatrack <- do.call(rbind, lapply(albatross, function(z) rgdal::project(rbind(as.matrix(z[, c("x", "y")]), NA), "+proj=utm +zone=42 +south +datum=WGS84", inv = TRUE)))
-
-## construct the map and return it, but don't plot it
-alb_map <- SOmap_auto(albatrack[, 1], albatrack[, 2])
-alb_map
-
- - - -
- - - - -
- - - - - - - - diff --git a/docs/articles/many-automap-examples_files/accessible-code-block-0.0.1/empty-anchor.js b/docs/articles/many-automap-examples_files/accessible-code-block-0.0.1/empty-anchor.js deleted file mode 100644 index ca349fd..0000000 --- a/docs/articles/many-automap-examples_files/accessible-code-block-0.0.1/empty-anchor.js +++ /dev/null @@ -1,15 +0,0 @@ -// Hide empty tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) --> -// v0.0.1 -// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020. - -document.addEventListener('DOMContentLoaded', function() { - const codeList = document.getElementsByClassName("sourceCode"); - for (var i = 0; i < codeList.length; i++) { - var linkList = codeList[i].getElementsByTagName('a'); - for (var j = 0; j < linkList.length; j++) { - if (linkList[j].innerHTML === "") { - linkList[j].setAttribute('aria-hidden', 'true'); - } - } - } -}); diff --git a/docs/articles/many-automap-examples_files/figure-html/examples-1.png b/docs/articles/many-automap-examples_files/figure-html/examples-1.png deleted file mode 100644 index 18e930a..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples1-1.png b/docs/articles/many-automap-examples_files/figure-html/examples1-1.png deleted file mode 100644 index c491ee3..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples1-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples14-1.png b/docs/articles/many-automap-examples_files/figure-html/examples14-1.png deleted file mode 100644 index 53bb1d4..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples14-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples15-1.png b/docs/articles/many-automap-examples_files/figure-html/examples15-1.png deleted file mode 100644 index 1edd0d2..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples15-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples16-1.png b/docs/articles/many-automap-examples_files/figure-html/examples16-1.png deleted file mode 100644 index 0b789dc..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples16-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples17-1.png b/docs/articles/many-automap-examples_files/figure-html/examples17-1.png deleted file mode 100644 index 0b789dc..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples17-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples18-1.png b/docs/articles/many-automap-examples_files/figure-html/examples18-1.png deleted file mode 100644 index c2a9fb5..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples18-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples19-1.png b/docs/articles/many-automap-examples_files/figure-html/examples19-1.png deleted file mode 100644 index 48c53c7..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples19-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples2-1.png b/docs/articles/many-automap-examples_files/figure-html/examples2-1.png deleted file mode 100644 index 9d28e9f..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples2-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples20-1.png b/docs/articles/many-automap-examples_files/figure-html/examples20-1.png deleted file mode 100644 index 9a7cbca..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples20-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples21-1.png b/docs/articles/many-automap-examples_files/figure-html/examples21-1.png deleted file mode 100644 index a1b7bf5..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples21-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples22-1.png b/docs/articles/many-automap-examples_files/figure-html/examples22-1.png deleted file mode 100644 index e1dc569..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples22-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples23-1.png b/docs/articles/many-automap-examples_files/figure-html/examples23-1.png deleted file mode 100644 index 9adff6e..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples23-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples24-1.png b/docs/articles/many-automap-examples_files/figure-html/examples24-1.png deleted file mode 100644 index 94e1a00..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples24-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples25-1.png b/docs/articles/many-automap-examples_files/figure-html/examples25-1.png deleted file mode 100644 index fa08c0a..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples25-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples26-1.png b/docs/articles/many-automap-examples_files/figure-html/examples26-1.png deleted file mode 100644 index acc412f..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples26-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples3-1.png b/docs/articles/many-automap-examples_files/figure-html/examples3-1.png deleted file mode 100644 index 9d28e9f..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples3-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples4-1.png b/docs/articles/many-automap-examples_files/figure-html/examples4-1.png deleted file mode 100644 index 9d28e9f..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples4-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples5-1.png b/docs/articles/many-automap-examples_files/figure-html/examples5-1.png deleted file mode 100644 index e64a892..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples5-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples6-1.png b/docs/articles/many-automap-examples_files/figure-html/examples6-1.png deleted file mode 100644 index a9fb207..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples6-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples7-1.png b/docs/articles/many-automap-examples_files/figure-html/examples7-1.png deleted file mode 100644 index 72705b5..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples7-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/figure-html/examples8-1.png b/docs/articles/many-automap-examples_files/figure-html/examples8-1.png deleted file mode 100644 index cddff32..0000000 Binary files a/docs/articles/many-automap-examples_files/figure-html/examples8-1.png and /dev/null differ diff --git a/docs/articles/many-automap-examples_files/header-attrs-2.1/header-attrs.js b/docs/articles/many-automap-examples_files/header-attrs-2.1/header-attrs.js deleted file mode 100644 index dd57d92..0000000 --- a/docs/articles/many-automap-examples_files/header-attrs-2.1/header-attrs.js +++ /dev/null @@ -1,12 +0,0 @@ -// Pandoc 2.9 adds attributes on both header and div. We remove the former (to -// be compatible with the behavior of Pandoc < 2.8). -document.addEventListener('DOMContentLoaded', function(e) { - var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); - var i, h, a; - for (i = 0; i < hs.length; i++) { - h = hs[i]; - if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 - a = h.attributes; - while (a.length > 0) h.removeAttribute(a[0].name); - } -}); diff --git a/docs/authors.html b/docs/authors.html deleted file mode 100644 index 00a30b4..0000000 --- a/docs/authors.html +++ /dev/null @@ -1,116 +0,0 @@ - -Authors and Citation • SOmap - - -
-
- - - -
-
-
- - - -
  • -

    Dale Maschette. Author, maintainer. -

    -
  • -
  • -

    Michael Sumner. Author. -

    -
  • -
  • -

    Ben Raymond. Author. -

    -
  • -
-
-
-

Citation

- Source: inst/CITATION -
-
- - -

Maschette, D., Sumner, M., Raymond, B. (2019). SOmap: Southern Ocean maps. Version 0.5.0 https://github.com/AustralianAntarcticDivision/SOmap

-
@Manual{,
-  title = {SOmap: Southern Ocean maps},
-  author = {Dale Maschette and Michael Sumner and Ben Raymond},
-  year = {2019},
-  url = {https://github.com/AustralianAntarcticDivision/SOmap},
-  version = {R package version 0.6.2},
-}
- -
- -
- - - -
- - - - - - - - diff --git a/docs/bootstrap-toc.css b/docs/bootstrap-toc.css deleted file mode 100644 index 5a85941..0000000 --- a/docs/bootstrap-toc.css +++ /dev/null @@ -1,60 +0,0 @@ -/*! - * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) - * Copyright 2015 Aidan Feldman - * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ - -/* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ - -/* All levels of nav */ -nav[data-toggle='toc'] .nav > li > a { - display: block; - padding: 4px 20px; - font-size: 13px; - font-weight: 500; - color: #767676; -} -nav[data-toggle='toc'] .nav > li > a:hover, -nav[data-toggle='toc'] .nav > li > a:focus { - padding-left: 19px; - color: #563d7c; - text-decoration: none; - background-color: transparent; - border-left: 1px solid #563d7c; -} -nav[data-toggle='toc'] .nav > .active > a, -nav[data-toggle='toc'] .nav > .active:hover > a, -nav[data-toggle='toc'] .nav > .active:focus > a { - padding-left: 18px; - font-weight: bold; - color: #563d7c; - background-color: transparent; - border-left: 2px solid #563d7c; -} - -/* Nav: second level (shown on .active) */ -nav[data-toggle='toc'] .nav .nav { - display: none; /* Hide by default, but at >768px, show it */ - padding-bottom: 10px; -} -nav[data-toggle='toc'] .nav .nav > li > a { - padding-top: 1px; - padding-bottom: 1px; - padding-left: 30px; - font-size: 12px; - font-weight: normal; -} -nav[data-toggle='toc'] .nav .nav > li > a:hover, -nav[data-toggle='toc'] .nav .nav > li > a:focus { - padding-left: 29px; -} -nav[data-toggle='toc'] .nav .nav > .active > a, -nav[data-toggle='toc'] .nav .nav > .active:hover > a, -nav[data-toggle='toc'] .nav .nav > .active:focus > a { - padding-left: 28px; - font-weight: 500; -} - -/* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ -nav[data-toggle='toc'] .nav > .active > ul { - display: block; -} diff --git a/docs/bootstrap-toc.js b/docs/bootstrap-toc.js deleted file mode 100644 index 1cdd573..0000000 --- a/docs/bootstrap-toc.js +++ /dev/null @@ -1,159 +0,0 @@ -/*! - * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) - * Copyright 2015 Aidan Feldman - * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ -(function() { - 'use strict'; - - window.Toc = { - helpers: { - // return all matching elements in the set, or their descendants - findOrFilter: function($el, selector) { - // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/ - // http://stackoverflow.com/a/12731439/358804 - var $descendants = $el.find(selector); - return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])'); - }, - - generateUniqueIdBase: function(el) { - var text = $(el).text(); - var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-'); - return anchor || el.tagName.toLowerCase(); - }, - - generateUniqueId: function(el) { - var anchorBase = this.generateUniqueIdBase(el); - for (var i = 0; ; i++) { - var anchor = anchorBase; - if (i > 0) { - // add suffix - anchor += '-' + i; - } - // check if ID already exists - if (!document.getElementById(anchor)) { - return anchor; - } - } - }, - - generateAnchor: function(el) { - if (el.id) { - return el.id; - } else { - var anchor = this.generateUniqueId(el); - el.id = anchor; - return anchor; - } - }, - - createNavList: function() { - return $(''); - }, - - createChildNavList: function($parent) { - var $childList = this.createNavList(); - $parent.append($childList); - return $childList; - }, - - generateNavEl: function(anchor, text) { - var $a = $(''); - $a.attr('href', '#' + anchor); - $a.text(text); - var $li = $('
  • '); - $li.append($a); - return $li; - }, - - generateNavItem: function(headingEl) { - var anchor = this.generateAnchor(headingEl); - var $heading = $(headingEl); - var text = $heading.data('toc-text') || $heading.text(); - return this.generateNavEl(anchor, text); - }, - - // Find the first heading level (`

    `, then `

    `, etc.) that has more than one element. Defaults to 1 (for `

    `). - getTopLevel: function($scope) { - for (var i = 1; i <= 6; i++) { - var $headings = this.findOrFilter($scope, 'h' + i); - if ($headings.length > 1) { - return i; - } - } - - return 1; - }, - - // returns the elements for the top level, and the next below it - getHeadings: function($scope, topLevel) { - var topSelector = 'h' + topLevel; - - var secondaryLevel = topLevel + 1; - var secondarySelector = 'h' + secondaryLevel; - - return this.findOrFilter($scope, topSelector + ',' + secondarySelector); - }, - - getNavLevel: function(el) { - return parseInt(el.tagName.charAt(1), 10); - }, - - populateNav: function($topContext, topLevel, $headings) { - var $context = $topContext; - var $prevNav; - - var helpers = this; - $headings.each(function(i, el) { - var $newNav = helpers.generateNavItem(el); - var navLevel = helpers.getNavLevel(el); - - // determine the proper $context - if (navLevel === topLevel) { - // use top level - $context = $topContext; - } else if ($prevNav && $context === $topContext) { - // create a new level of the tree and switch to it - $context = helpers.createChildNavList($prevNav); - } // else use the current $context - - $context.append($newNav); - - $prevNav = $newNav; - }); - }, - - parseOps: function(arg) { - var opts; - if (arg.jquery) { - opts = { - $nav: arg - }; - } else { - opts = arg; - } - opts.$scope = opts.$scope || $(document.body); - return opts; - } - }, - - // accepts a jQuery object, or an options object - init: function(opts) { - opts = this.helpers.parseOps(opts); - - // ensure that the data attribute is in place for styling - opts.$nav.attr('data-toggle', 'toc'); - - var $topContext = this.helpers.createChildNavList(opts.$nav); - var topLevel = this.helpers.getTopLevel(opts.$scope); - var $headings = this.helpers.getHeadings(opts.$scope, topLevel); - this.helpers.populateNav($topContext, topLevel, $headings); - } - }; - - $(function() { - $('nav[data-toggle="toc"]').each(function(i, el) { - var $nav = $(el); - Toc.init($nav); - }); - }); -})(); diff --git a/docs/docsearch.css b/docs/docsearch.css deleted file mode 100644 index e5f1fe1..0000000 --- a/docs/docsearch.css +++ /dev/null @@ -1,148 +0,0 @@ -/* Docsearch -------------------------------------------------------------- */ -/* - Source: https://github.com/algolia/docsearch/ - License: MIT -*/ - -.algolia-autocomplete { - display: block; - -webkit-box-flex: 1; - -ms-flex: 1; - flex: 1 -} - -.algolia-autocomplete .ds-dropdown-menu { - width: 100%; - min-width: none; - max-width: none; - padding: .75rem 0; - background-color: #fff; - background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, .1); - box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175); -} - -@media (min-width:768px) { - .algolia-autocomplete .ds-dropdown-menu { - width: 175% - } -} - -.algolia-autocomplete .ds-dropdown-menu::before { - display: none -} - -.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] { - padding: 0; - background-color: rgb(255,255,255); - border: 0; - max-height: 80vh; -} - -.algolia-autocomplete .ds-dropdown-menu .ds-suggestions { - margin-top: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion { - padding: 0; - overflow: visible -} - -.algolia-autocomplete .algolia-docsearch-suggestion--category-header { - padding: .125rem 1rem; - margin-top: 0; - font-size: 1.3em; - font-weight: 500; - color: #00008B; - border-bottom: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--wrapper { - float: none; - padding-top: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column { - float: none; - width: auto; - padding: 0; - text-align: left -} - -.algolia-autocomplete .algolia-docsearch-suggestion--content { - float: none; - width: auto; - padding: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--content::before { - display: none -} - -.algolia-autocomplete .ds-suggestion:not(:first-child) .algolia-docsearch-suggestion--category-header { - padding-top: .75rem; - margin-top: .75rem; - border-top: 1px solid rgba(0, 0, 0, .1) -} - -.algolia-autocomplete .ds-suggestion .algolia-docsearch-suggestion--subcategory-column { - display: block; - padding: .1rem 1rem; - margin-bottom: 0.1; - font-size: 1.0em; - font-weight: 400 - /* display: none */ -} - -.algolia-autocomplete .algolia-docsearch-suggestion--title { - display: block; - padding: .25rem 1rem; - margin-bottom: 0; - font-size: 0.9em; - font-weight: 400 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--text { - padding: 0 1rem .5rem; - margin-top: -.25rem; - font-size: 0.8em; - font-weight: 400; - line-height: 1.25 -} - -.algolia-autocomplete .algolia-docsearch-footer { - width: 110px; - height: 20px; - z-index: 3; - margin-top: 10.66667px; - float: right; - font-size: 0; - line-height: 0; -} - -.algolia-autocomplete .algolia-docsearch-footer--logo { - background-image: url("data:image/svg+xml;utf8,"); - background-repeat: no-repeat; - background-position: 50%; - background-size: 100%; - overflow: hidden; - text-indent: -9000px; - width: 100%; - height: 100%; - display: block; - transform: translate(-8px); -} - -.algolia-autocomplete .algolia-docsearch-suggestion--highlight { - color: #FF8C00; - background: rgba(232, 189, 54, 0.1) -} - - -.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight { - box-shadow: inset 0 -2px 0 0 rgba(105, 105, 105, .5) -} - -.algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content { - background-color: rgba(192, 192, 192, .15) -} diff --git a/docs/docsearch.js b/docs/docsearch.js deleted file mode 100644 index b35504c..0000000 --- a/docs/docsearch.js +++ /dev/null @@ -1,85 +0,0 @@ -$(function() { - - // register a handler to move the focus to the search bar - // upon pressing shift + "/" (i.e. "?") - $(document).on('keydown', function(e) { - if (e.shiftKey && e.keyCode == 191) { - e.preventDefault(); - $("#search-input").focus(); - } - }); - - $(document).ready(function() { - // do keyword highlighting - /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ - var mark = function() { - - var referrer = document.URL ; - var paramKey = "q" ; - - if (referrer.indexOf("?") !== -1) { - var qs = referrer.substr(referrer.indexOf('?') + 1); - var qs_noanchor = qs.split('#')[0]; - var qsa = qs_noanchor.split('&'); - var keyword = ""; - - for (var i = 0; i < qsa.length; i++) { - var currentParam = qsa[i].split('='); - - if (currentParam.length !== 2) { - continue; - } - - if (currentParam[0] == paramKey) { - keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); - } - } - - if (keyword !== "") { - $(".contents").unmark({ - done: function() { - $(".contents").mark(keyword); - } - }); - } - } - }; - - mark(); - }); -}); - -/* Search term highlighting ------------------------------*/ - -function matchedWords(hit) { - var words = []; - - var hierarchy = hit._highlightResult.hierarchy; - // loop to fetch from lvl0, lvl1, etc. - for (var idx in hierarchy) { - words = words.concat(hierarchy[idx].matchedWords); - } - - var content = hit._highlightResult.content; - if (content) { - words = words.concat(content.matchedWords); - } - - // return unique words - var words_uniq = [...new Set(words)]; - return words_uniq; -} - -function updateHitURL(hit) { - - var words = matchedWords(hit); - var url = ""; - - if (hit.anchor) { - url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; - } else { - url = hit.url + '?q=' + escape(words.join(" ")); - } - - return url; -} diff --git a/docs/favicon-16x16.png b/docs/favicon-16x16.png deleted file mode 100644 index fe5e76a..0000000 Binary files a/docs/favicon-16x16.png and /dev/null differ diff --git a/docs/favicon-32x32.png b/docs/favicon-32x32.png deleted file mode 100644 index c39b8eb..0000000 Binary files a/docs/favicon-32x32.png and /dev/null differ diff --git a/docs/favicon.ico b/docs/favicon.ico deleted file mode 100644 index 3ace5b5..0000000 Binary files a/docs/favicon.ico and /dev/null differ diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 0d04523..0000000 --- a/docs/index.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - - -Southern Ocean maps • SOmap - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    -
    - - - -
    - -

    The goal of SOmap is to make publication quality round Southern Ocean maps in polar projections with little effort. This package is still very much a work in progress contact me with any questions or suggestions.

    -
    -

    Installation -

    -

    The development version from GitHub with:

    -
    -install.packages("SOmap", repos = c(SCAR = "https://scar.r-universe.dev",
    -                                    CRAN = "https://cloud.r-project.org"))
    -
    -## or
    -
    -## install.packages("remotes") ## if needed
    -remotes::install_github("AustralianAntarcticDivision/SOmap")
    -
    -
    -

    Example -

    -

    To make a simple map you can use the following function; use ? SOmap to see all the options for modifying layers.

    - -

    -

    There is also SOmanagement() which provides management layers for the Southern Ocean and SOleg() which gives custom rounded legends for added map layers.

    -
    -## custom colours
    -spiritedMedium <- colorRampPalette(c("#4D4140", "#596F7E", "#168B98",
    -                                     "#ED5B67", "#E27766", "#DAAD50", "#EAC3A6"))
    -spirited <- spiritedMedium(80)
    -
    -SOmap(trim = -40)
    -## add an example sea ice raster, which is bundled with SOmap
    -plot(ice, col = spirited, add = TRUE, legend = FALSE, alpha = 0.95)
    -SOleg(ice, position = "topright", col = spirited, ticks = 6,
    -      tlabs = c("0", "20", "40", "60", "80", "100"),
    -      trim = -40, label = "Sea Ice", type = "continuous")
    -
    -## add the exclusive economic zones management layer
    -SOmanagement(eez = TRUE)
    -

    -

    Curved legends can be either continuous (as above) or discrete.

    -
    -spirited8 <- spiritedMedium(8)
    -
    -SOmap()
    -plot(centroids, col=spirited8, add=TRUE, pch=19)
    -SOleg(centroids,position = "topright", col = spirited8, ticks = 8,
    -      tlabs =1:8, label = "Centroids", type = "discrete")
    -

    -

    An automatic plot function SOmap_auto() will take any data in the form of longitude and latitude vectors and create a guess at a map.

    -
    -ellie <- SOmap_data$mirounga_leonina
    -
    -## construct and plot the map
    -SOmap_auto(ellie$lon, ellie$lat)
    -

    -

    The SOmap_auto(), SOmap(), and SOmap2() functions return the data used to make the map so that further customization can be made. Plotting or printing the returned object will cause the map to be displayed in the graphics device.

    -
    -data("albatross", package = "adehabitatLT")
    -## convert the albatross data to a single matrix of lon, lat points
    -albatrack <- do.call(rbind, lapply(albatross, function(z) rgdal::project(rbind(as.matrix(z[, c("x", "y")]), NA), "+proj=utm +zone=42 +south +datum=WGS84", inv = TRUE)))
    -
    -## construct the map and return it, but don't plot it
    -alb_map <- SOmap_auto(albatrack[, 1], albatrack[, 2])
    -

    Modifying this map object is currently a rather experimental process (proceed at your own risk!) but, for example, if we wished to change the points to be blue rather than red:

    -
    -alb_map$pcol <- "blue"
    -## plot it
    -alb_map
    -

    -

    We could also decide we want a reversed bathymetry color and cyan lines between the dots.

    -
    -# change the line color 
    -alb_map$lcol <- "cyan"
    -# reverse the bathymetry
    -alb_map$bathy_palette<-rev(alb_map$bathy_palette)
    -
    -## plot it
    -alb_map
    -

    -

    Objects from sf, sp, or raster can also be used, but note that they will be used for their extents only and will not automatically be plotted. But we can plot them easily with SOplot:

    -
    -## use the bundled fronts data as an example
    -mydata <- SOmap_data$fronts_orsi
    -SOmap_auto(mydata, target = "laea", centre_lon = 147)
    -SOplot(mydata, col = 2)
    -

    -
    -
    -

    Easy projections -

    -

    SOmap goes with the philosophy “we actually rather like ourselves, and care about our experience” and so there are some easy ways to work with projections, and just map it!.

    -
    -set.seed(1)
    -amap <- SOmap_auto(input_points = FALSE, input_lines = FALSE)
    -amap
    -

    -

    To add data to this plot we can just do so.

    -
    -amap
    -SOplot(SOmap_data$seaice_oct, lwd = 3, col = "blue", lty = 2)
    -

    -

    SOplot() will add data by default, and can take spatial objects or even raw longitude and latitude values (we like you). When a plot is set up the coordinate reference system used is recorded so that we can use it again. The projection currently in use is always available by running SOcrs().

    -
    -SOcrs()
    -#> [1] "+proj=stere +lon_0=-36.8427233395983 +lat_0=-76.5139986273002 +lat_ts=71 +datum=WGS84"
    -

    Many objects can be reprojected with SOproj(), including the map objects themselves.

    -
    -
    -prj <- "+proj=laea +lat_0=-90 +lon_0=147 +datum=WGS84"
    -## reproject a raster
    -SOproj(ice, target = prj)
    -#> class      : RasterLayer 
    -#> dimensions : 342, 326, 111492  (nrow, ncol, ncell)
    -#> resolution : 32837.52, 31606.02  (x, y)
    -#> extent     : -5430639, 5274392, -5534313, 5274946  (xmin, xmax, ymin, ymax)
    -#> crs        : +proj=laea +lat_0=-90 +lon_0=147 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs 
    -#> source     : memory
    -#> names      : nt_20181015_f18_nrt_s.bin 
    -#> values     : 2.059468, 100  (min, max)
    -
    -## reproject a SOmap
    -SOproj(amap, target = prj)
    -

    -

    Note that we must assume raw input is “longitude/latitude”, and the function will issue a warning.

    -
    -

    Please note that the SOmap project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

    -
    -
    - -
    - - -
    - - -
    - -
    -

    -

    Site built with pkgdown 2.0.6.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/link.svg b/docs/link.svg deleted file mode 100644 index 88ad827..0000000 --- a/docs/link.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/docs/logo.png b/docs/logo.png deleted file mode 100644 index ae8f2a7..0000000 Binary files a/docs/logo.png and /dev/null differ diff --git a/docs/news/index.html b/docs/news/index.html deleted file mode 100644 index 2cdd8be..0000000 --- a/docs/news/index.html +++ /dev/null @@ -1,110 +0,0 @@ - -Changelog • SOmap - - -
    -
    - - - -
    -
    - - -
    - -
    -

    BREAKING

    -
    -
    -

    CHANGES

    -
    • Arguments mask and trim_background now removed from SOmap_auto().

    • -
    • Argument buffer removed from SOmap_auto(), changed expand to numeric fraction (expand = 0 equivalent to old expand = FALSE).

    • -
    • Argument sample_type to SOmap_auto() moved to internal function automap_nothing().

    • -
    • New internal functions to become the engine behind SOmap_auto(), automap_maker() to create a background extent from disparate inputs, and automap_nothing() to create a background by random data.

    • -
    • New auto extent logic for SOmap_auto() to address #30.

    • -
    • New reproj::reproj methods for SOmap_auto and SOmap classes.

    • -
    -
    -
    - -
    • Added control to SOauto_map to draw sp lines as lines, points as points correctly.

    • -
    • Added a NEWS.md file to track changes to the package.

    • -
    -
    - - - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/pkgdown.css b/docs/pkgdown.css deleted file mode 100644 index 80ea5b8..0000000 --- a/docs/pkgdown.css +++ /dev/null @@ -1,384 +0,0 @@ -/* Sticky footer */ - -/** - * Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ - * Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css - * - * .Site -> body > .container - * .Site-content -> body > .container .row - * .footer -> footer - * - * Key idea seems to be to ensure that .container and __all its parents__ - * have height set to 100% - * - */ - -html, body { - height: 100%; -} - -body { - position: relative; -} - -body > .container { - display: flex; - height: 100%; - flex-direction: column; -} - -body > .container .row { - flex: 1 0 auto; -} - -footer { - margin-top: 45px; - padding: 35px 0 36px; - border-top: 1px solid #e5e5e5; - color: #666; - display: flex; - flex-shrink: 0; -} -footer p { - margin-bottom: 0; -} -footer div { - flex: 1; -} -footer .pkgdown { - text-align: right; -} -footer p { - margin-bottom: 0; -} - -img.icon { - float: right; -} - -/* Ensure in-page images don't run outside their container */ -.contents img { - max-width: 100%; - height: auto; -} - -/* Fix bug in bootstrap (only seen in firefox) */ -summary { - display: list-item; -} - -/* Typographic tweaking ---------------------------------*/ - -.contents .page-header { - margin-top: calc(-60px + 1em); -} - -dd { - margin-left: 3em; -} - -/* Section anchors ---------------------------------*/ - -a.anchor { - display: none; - margin-left: 5px; - width: 20px; - height: 20px; - - background-image: url(./link.svg); - background-repeat: no-repeat; - background-size: 20px 20px; - background-position: center center; -} - -h1:hover .anchor, -h2:hover .anchor, -h3:hover .anchor, -h4:hover .anchor, -h5:hover .anchor, -h6:hover .anchor { - display: inline-block; -} - -/* Fixes for fixed navbar --------------------------*/ - -.contents h1, .contents h2, .contents h3, .contents h4 { - padding-top: 60px; - margin-top: -40px; -} - -/* Navbar submenu --------------------------*/ - -.dropdown-submenu { - position: relative; -} - -.dropdown-submenu>.dropdown-menu { - top: 0; - left: 100%; - margin-top: -6px; - margin-left: -1px; - border-radius: 0 6px 6px 6px; -} - -.dropdown-submenu:hover>.dropdown-menu { - display: block; -} - -.dropdown-submenu>a:after { - display: block; - content: " "; - float: right; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; - border-width: 5px 0 5px 5px; - border-left-color: #cccccc; - margin-top: 5px; - margin-right: -10px; -} - -.dropdown-submenu:hover>a:after { - border-left-color: #ffffff; -} - -.dropdown-submenu.pull-left { - float: none; -} - -.dropdown-submenu.pull-left>.dropdown-menu { - left: -100%; - margin-left: 10px; - border-radius: 6px 0 6px 6px; -} - -/* Sidebar --------------------------*/ - -#pkgdown-sidebar { - margin-top: 30px; - position: -webkit-sticky; - position: sticky; - top: 70px; -} - -#pkgdown-sidebar h2 { - font-size: 1.5em; - margin-top: 1em; -} - -#pkgdown-sidebar h2:first-child { - margin-top: 0; -} - -#pkgdown-sidebar .list-unstyled li { - margin-bottom: 0.5em; -} - -/* bootstrap-toc tweaks ------------------------------------------------------*/ - -/* All levels of nav */ - -nav[data-toggle='toc'] .nav > li > a { - padding: 4px 20px 4px 6px; - font-size: 1.5rem; - font-weight: 400; - color: inherit; -} - -nav[data-toggle='toc'] .nav > li > a:hover, -nav[data-toggle='toc'] .nav > li > a:focus { - padding-left: 5px; - color: inherit; - border-left: 1px solid #878787; -} - -nav[data-toggle='toc'] .nav > .active > a, -nav[data-toggle='toc'] .nav > .active:hover > a, -nav[data-toggle='toc'] .nav > .active:focus > a { - padding-left: 5px; - font-size: 1.5rem; - font-weight: 400; - color: inherit; - border-left: 2px solid #878787; -} - -/* Nav: second level (shown on .active) */ - -nav[data-toggle='toc'] .nav .nav { - display: none; /* Hide by default, but at >768px, show it */ - padding-bottom: 10px; -} - -nav[data-toggle='toc'] .nav .nav > li > a { - padding-left: 16px; - font-size: 1.35rem; -} - -nav[data-toggle='toc'] .nav .nav > li > a:hover, -nav[data-toggle='toc'] .nav .nav > li > a:focus { - padding-left: 15px; -} - -nav[data-toggle='toc'] .nav .nav > .active > a, -nav[data-toggle='toc'] .nav .nav > .active:hover > a, -nav[data-toggle='toc'] .nav .nav > .active:focus > a { - padding-left: 15px; - font-weight: 500; - font-size: 1.35rem; -} - -/* orcid ------------------------------------------------------------------- */ - -.orcid { - font-size: 16px; - color: #A6CE39; - /* margins are required by official ORCID trademark and display guidelines */ - margin-left:4px; - margin-right:4px; - vertical-align: middle; -} - -/* Reference index & topics ----------------------------------------------- */ - -.ref-index th {font-weight: normal;} - -.ref-index td {vertical-align: top; min-width: 100px} -.ref-index .icon {width: 40px;} -.ref-index .alias {width: 40%;} -.ref-index-icons .alias {width: calc(40% - 40px);} -.ref-index .title {width: 60%;} - -.ref-arguments th {text-align: right; padding-right: 10px;} -.ref-arguments th, .ref-arguments td {vertical-align: top; min-width: 100px} -.ref-arguments .name {width: 20%;} -.ref-arguments .desc {width: 80%;} - -/* Nice scrolling for wide elements --------------------------------------- */ - -table { - display: block; - overflow: auto; -} - -/* Syntax highlighting ---------------------------------------------------- */ - -pre, code, pre code { - background-color: #f8f8f8; - color: #333; -} -pre, pre code { - white-space: pre-wrap; - word-break: break-all; - overflow-wrap: break-word; -} - -pre { - border: 1px solid #eee; -} - -pre .img, pre .r-plt { - margin: 5px 0; -} - -pre .img img, pre .r-plt img { - background-color: #fff; -} - -code a, pre a { - color: #375f84; -} - -a.sourceLine:hover { - text-decoration: none; -} - -.fl {color: #1514b5;} -.fu {color: #000000;} /* function */ -.ch,.st {color: #036a07;} /* string */ -.kw {color: #264D66;} /* keyword */ -.co {color: #888888;} /* comment */ - -.error {font-weight: bolder;} -.warning {font-weight: bolder;} - -/* Clipboard --------------------------*/ - -.hasCopyButton { - position: relative; -} - -.btn-copy-ex { - position: absolute; - right: 0; - top: 0; - visibility: hidden; -} - -.hasCopyButton:hover button.btn-copy-ex { - visibility: visible; -} - -/* headroom.js ------------------------ */ - -.headroom { - will-change: transform; - transition: transform 200ms linear; -} -.headroom--pinned { - transform: translateY(0%); -} -.headroom--unpinned { - transform: translateY(-100%); -} - -/* mark.js ----------------------------*/ - -mark { - background-color: rgba(255, 255, 51, 0.5); - border-bottom: 2px solid rgba(255, 153, 51, 0.3); - padding: 1px; -} - -/* vertical spacing after htmlwidgets */ -.html-widget { - margin-bottom: 10px; -} - -/* fontawesome ------------------------ */ - -.fab { - font-family: "Font Awesome 5 Brands" !important; -} - -/* don't display links in code chunks when printing */ -/* source: https://stackoverflow.com/a/10781533 */ -@media print { - code a:link:after, code a:visited:after { - content: ""; - } -} - -/* Section anchors --------------------------------- - Added in pandoc 2.11: https://github.com/jgm/pandoc-templates/commit/9904bf71 -*/ - -div.csl-bib-body { } -div.csl-entry { - clear: both; -} -.hanging-indent div.csl-entry { - margin-left:2em; - text-indent:-2em; -} -div.csl-left-margin { - min-width:2em; - float:left; -} -div.csl-right-inline { - margin-left:2em; - padding-left:1em; -} -div.csl-indent { - margin-left: 2em; -} diff --git a/docs/pkgdown.js b/docs/pkgdown.js deleted file mode 100644 index 6f0eee4..0000000 --- a/docs/pkgdown.js +++ /dev/null @@ -1,108 +0,0 @@ -/* http://gregfranko.com/blog/jquery-best-practices/ */ -(function($) { - $(function() { - - $('.navbar-fixed-top').headroom(); - - $('body').css('padding-top', $('.navbar').height() + 10); - $(window).resize(function(){ - $('body').css('padding-top', $('.navbar').height() + 10); - }); - - $('[data-toggle="tooltip"]').tooltip(); - - var cur_path = paths(location.pathname); - var links = $("#navbar ul li a"); - var max_length = -1; - var pos = -1; - for (var i = 0; i < links.length; i++) { - if (links[i].getAttribute("href") === "#") - continue; - // Ignore external links - if (links[i].host !== location.host) - continue; - - var nav_path = paths(links[i].pathname); - - var length = prefix_length(nav_path, cur_path); - if (length > max_length) { - max_length = length; - pos = i; - } - } - - // Add class to parent
  • , and enclosing
  • if in dropdown - if (pos >= 0) { - var menu_anchor = $(links[pos]); - menu_anchor.parent().addClass("active"); - menu_anchor.closest("li.dropdown").addClass("active"); - } - }); - - function paths(pathname) { - var pieces = pathname.split("/"); - pieces.shift(); // always starts with / - - var end = pieces[pieces.length - 1]; - if (end === "index.html" || end === "") - pieces.pop(); - return(pieces); - } - - // Returns -1 if not found - function prefix_length(needle, haystack) { - if (needle.length > haystack.length) - return(-1); - - // Special case for length-0 haystack, since for loop won't run - if (haystack.length === 0) { - return(needle.length === 0 ? 0 : -1); - } - - for (var i = 0; i < haystack.length; i++) { - if (needle[i] != haystack[i]) - return(i); - } - - return(haystack.length); - } - - /* Clipboard --------------------------*/ - - function changeTooltipMessage(element, msg) { - var tooltipOriginalTitle=element.getAttribute('data-original-title'); - element.setAttribute('data-original-title', msg); - $(element).tooltip('show'); - element.setAttribute('data-original-title', tooltipOriginalTitle); - } - - if(ClipboardJS.isSupported()) { - $(document).ready(function() { - var copyButton = ""; - - $("div.sourceCode").addClass("hasCopyButton"); - - // Insert copy buttons: - $(copyButton).prependTo(".hasCopyButton"); - - // Initialize tooltips: - $('.btn-copy-ex').tooltip({container: 'body'}); - - // Initialize clipboard: - var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { - text: function(trigger) { - return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, ""); - } - }); - - clipboardBtnCopies.on('success', function(e) { - changeTooltipMessage(e.trigger, 'Copied!'); - e.clearSelection(); - }); - - clipboardBtnCopies.on('error', function() { - changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); - }); - }); - } -})(window.jQuery || window.$) diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml deleted file mode 100644 index 6940fab..0000000 --- a/docs/pkgdown.yml +++ /dev/null @@ -1,8 +0,0 @@ -pandoc: 2.17.1.1 -pkgdown: 2.0.6 -pkgdown_sha: ~ -articles: - SOmap-introduction: SOmap-introduction.html - many-automap-examples: many-automap-examples.html -last_built: 2022-09-01T06:39Z - diff --git a/docs/reference/Bathy.html b/docs/reference/Bathy.html deleted file mode 100644 index 0d79190..0000000 --- a/docs/reference/Bathy.html +++ /dev/null @@ -1,108 +0,0 @@ - -Bathymetric data for maps — Bathy • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    Bathymetric data reprocessed from the GEBCO_2014 Grid data set.

    -
    - -
    -
    data(Bathy)
    -
    - -
    -

    Format

    -

    An object of class "RasterLayer"

    -
    -
    -

    Source

    -

    GEBCO

    -
    -
    -

    References

    -

    The GEBCO_2014 Grid, version 20150318

    -
    - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png deleted file mode 100644 index 17a3580..0000000 Binary files a/docs/reference/Rplot001.png and /dev/null differ diff --git a/docs/reference/SO_plotter.html b/docs/reference/SO_plotter.html deleted file mode 100644 index f53f693..0000000 --- a/docs/reference/SO_plotter.html +++ /dev/null @@ -1,134 +0,0 @@ - -Construct a SO_plotter object — SO_plotter • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    SOmap and similar objects contain all of the data and code required to draw a map. This information is embedded in SO_plotter objects within the SOmap object.

    -
    - -
    -
    SO_plotter(plotfun, plotargs = NULL, name = NULL)
    -
    - -
    -

    Arguments

    -
    plotfun
    -

    function or string: either the name of a function to use, or the function itself

    - - -
    plotargs
    -

    list: arguments to pass to the function

    - - -
    name
    -

    string: optional name for this element

    - -
    -
    -

    Value

    - - -

    An object of class SO_plotter

    -
    -
    -

    See also

    -

    SOmap

    -
    - -
    -

    Examples

    -
    if (FALSE) {
    -  p <- SOmap()
    -  ## replace the `box` element with different plotting code
    -  p$box <- SO_plotter(plotfun = "graphics::box", plotargs = list(col = "red"))
    -
    -  ## you can also specify multiple plotting instructions for a single graphical element
    -  ##  of a map
    -  p$box <- c(SO_plotter(plotfun = "graphics::box", plotargs = list(col = "red")),
    -             SO_plotter(plotfun = "graphics::box", plotargs = list(lwd = 2)))
    -}
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/SOauto_crop.html b/docs/reference/SOauto_crop.html deleted file mode 100644 index 6e148a3..0000000 --- a/docs/reference/SOauto_crop.html +++ /dev/null @@ -1,132 +0,0 @@ - -Reproject and crop Spatial and sf objects to SOmap objects — SOauto_crop • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    Reproject and crop Spatial and sf objects to SOmap objects

    -
    - -
    -
    SOauto_crop(layer, x, sp = TRUE)
    -
    - -
    -

    Arguments

    -
    layer
    -

    : an sf or Spatial (SpatialPolygonsDataFrame, SpatialLinesDataFrame, SpatialPointsDataFrame etc) object to reproject and crop

    - - -
    x
    -

    : a SOmap or SOauto_map object

    - - -
    sp
    -

    logical: if TRUE, return the cropped object in Spatial form, otherwise sf

    - -
    -
    -

    Value

    - - -

    If successful, a reprojected and cropped version of layer. If the reprojection or cropping operations fail, the returned object will be of class try-error. If the cropping operations return an empty object (i.e. no parts of layer lie within the bounds of x) then the returned object will either be NULL (if sp = TRUE) or an sf object with no features if sp = FALSE.

    -
    - -
    -

    Examples

    -
    if (FALSE) {
    -  a <- SOmap_auto(c(0, 50), c(-70, -50))
    -  x <- SOauto_crop(SOmap_data$fronts_orsi, a)
    -  plot(a)
    -  plot(x, add = TRUE)
    -
    -  a <- SOmap(trim = -60)
    -  x <- SOauto_crop(SOmap_data$EEZ, a)
    -  plot(a)
    -  plot(x, add = TRUE)
    -}
    -
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/SObin-1.png b/docs/reference/SObin-1.png deleted file mode 100644 index 495ee26..0000000 Binary files a/docs/reference/SObin-1.png and /dev/null differ diff --git a/docs/reference/SObin.html b/docs/reference/SObin.html deleted file mode 100644 index 1e98158..0000000 --- a/docs/reference/SObin.html +++ /dev/null @@ -1,163 +0,0 @@ - -Bin longitude latitude points by count in a SOmap context — SObin • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    Creates a raster density layer from a set of points.

    -
    - -
    -
    SObin(
    -  x,
    -  y = NULL,
    -  baselayer = NULL,
    -  ...,
    -  col = hcl.colors(26, "Viridis"),
    -  dim = c(512, 512),
    -  add = TRUE,
    -  target = NULL,
    -  source = NULL,
    -  data.frame = FALSE
    -)
    -
    - -
    -

    Arguments

    -
    x
    -

    longitudes

    - - -
    y
    -

    latitudes

    - - -
    baselayer
    -

    optional spatial layer to get extent from

    - - -
    ...
    -

    passed to plot if add = TRUE

    - - -
    col
    -

    colours to use if add = TRUE

    - - -
    dim
    -

    dimensions of raster to bin to

    - - -
    add
    -

    if TRUE, the raster is added to the current plot. An error is thrown if there is no existing plot

    - - -
    target
    -

    target projection passed to SOproj

    - - -
    source
    -

    source projection of data projection passed to SOproj

    - - -
    data.frame
    -

    if true return a data frame instead of a raster.

    - -
    -
    -

    Value

    - - -

    A raster. If add = TRUE, it is returned invisibly.

    -
    - -
    -

    Examples

    -
    SOmap_auto()
    -pts <- geosphere::randomCoordinates(1e6)
    -bin <- SObin(pts[, 1], pts[, 2], add = TRUE)
    -
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/SOcode.html b/docs/reference/SOcode.html deleted file mode 100644 index 2e4bed2..0000000 --- a/docs/reference/SOcode.html +++ /dev/null @@ -1,142 +0,0 @@ - -Extract plotting code from a SOmap — SOcode • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    This is thoroughly experimental!

    -
    - -
    -
    SOcode(x, data_object_name = "SOmap_data")
    -
    - -
    -

    Arguments

    -
    x
    -

    : a map object as returned by SOmap, SOmanagement, SOleg, or SOgg

    - - -
    data_object_name
    -

    string: the name to use for the object that will hold the map data. See Examples, below

    - -
    -
    -

    Value

    - - -

    A list with two elements: code contains R code that will draw the map, and SOmap_data (or whatever was passed as the data_object_name argument) contains any data required by that code

    -
    -
    -

    See also

    - -
    - -
    -

    Examples

    -
    if (FALSE) {
    -  p <- SOmap()
    -  mapcode <- SOcode(p, data_object_name = "SOmap_data")
    -
    -  ## write this code to a file
    -  my_R_file <- tempfile(fileext = ".R")
    -  writeLines(mapcode$code, con = my_R_file)
    -
    -  ## you can edit the code in that file if desired
    -
    -  ## save the data
    -  my_data_file <- tempfile(fileext = ".rds")
    -  saveRDS(mapcode$SOmap_data, my_data_file)
    -
    -  ## later on, we can re-load the data and execute the code
    -  SOmap_data <- readRDS(my_data_file)
    -  source(my_R_file)
    -
    -  ## or just to show that this works, evaluate the returned code directly against its data
    -  with(mapcode, for (codeline in code) eval(parse(text = codeline)))
    -}
    -
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/SOcrs.html b/docs/reference/SOcrs.html deleted file mode 100644 index 01c6a28..0000000 --- a/docs/reference/SOcrs.html +++ /dev/null @@ -1,114 +0,0 @@ - -SOmap coordinate system — SOcrs • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    Set or return the coordinate system currently in use.

    -
    - -
    -
    SOcrs(crs = NULL)
    -
    - -
    -

    Arguments

    -
    crs
    -

    provide PROJ string to set the value

    - -
    -
    -

    Details

    -

    If argument crs is NULL, the function returns the current value (which may be NULL).

    -
    - -
    -

    Examples

    -
    if (FALSE) {
    -SOmap()
    -SOcrs()
    -}
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/SOgg.html b/docs/reference/SOgg.html deleted file mode 100644 index 438a9ca..0000000 --- a/docs/reference/SOgg.html +++ /dev/null @@ -1,146 +0,0 @@ - -Generate a ggplot2 representation of an SOmap object — SOgg • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    Note: this function is still experimental! Use at your own risk.

    -
    - -
    -
    SOgg(...)
    -
    - -
    -

    Arguments

    -
    ...
    -

    : one or more objects as returned by SOmap, SOmap2, SOmanagement, or SOmap_auto

    - -
    -
    -

    Value

    - - -

    An object of class "SOmap_gg", "SOmanagement_gg", or "SOmap_auto_gg". Printing or plotting this object will cause it to generate a ggplot2 object, which will be returned to the user. If this object is printed or plotted (e.g. to the console) then it will be displayed in the current graphics device as is usual for ggplot2 objects.

    -
    - -
    -

    Examples

    -
    if (FALSE) {
    -  ## generate a SOmap object
    -  p <- SOmap2(trim = -45, iwc = TRUE, iwc_labels = TRUE, graticules = TRUE, fronts = TRUE,
    -              mpa = TRUE, mpa_labels = TRUE)
    -
    -  ## convert this to a ggplot2-based representation
    -  pg <- SOgg(p)
    -
    -  ## display it
    -  pg
    -
    -  ## we can see that this object has a bunch of ggplot code embedded inside of it
    -  str(pg)
    -
    -  ## and that code can be modified if desired
    -  ## e.g. change the bathymetry colours
    -  pg$scale_fill[[1]]$plotargs$colours <- topo.colors(21)
    -  ## plot it
    -  pg
    -
    -  ## If we want to change the legend breaks we can add breaks to the plotting arguments.
    -  pg$scale_fill[[1]]$plotargs$breaks <- c(0,500,1000,4000)
    -
    -
    -  ## when the print or plot method is called on pg, it creates an actual ggplot2
    -  ##  object, which we can capture and modify
    -  pg_gg <- plot(pg)
    -  class(pg_gg)
    -
    -  ## modifying this is done in the same way any other ggplot object is modified
    -  ## e.g. add a new scale_fill_gradientn to override the existing one
    -  pg_gg + ggplot2::scale_fill_gradientn(colours = heat.colors(21))
    -}
    -
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/SOgg_cex.html b/docs/reference/SOgg_cex.html deleted file mode 100644 index 3fd9638..0000000 --- a/docs/reference/SOgg_cex.html +++ /dev/null @@ -1,108 +0,0 @@ - -Convert cex to ggplot size — SOgg_cex • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    Text size in base graphics is generally specified via cex values, which are multipliers applied to the device pointsize. SOgg_cex is a convenience function that converts a cex value into a size value as used by ggplot2 geometries.

    -
    - -
    -
    SOgg_cex(cex)
    -
    - -
    -

    Arguments

    -
    cex
    -

    numeric: character expansion, see par

    - -
    -
    -

    Value

    - - -

    The corresponding 'size' value to use in ggplot calls

    -
    - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/SOleg.html b/docs/reference/SOleg.html deleted file mode 100644 index 0609f4d..0000000 --- a/docs/reference/SOleg.html +++ /dev/null @@ -1,201 +0,0 @@ - -Rounded legends for SOmap — SOleg • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    Rounded legends for SOmap

    -
    - -
    -
    SOleg(
    -  x = NULL,
    -  position = "topright",
    -  col = NULL,
    -  ticks = NULL,
    -  tlabs = NULL,
    -  breaks = NULL,
    -  trim = -45,
    -  type = "discrete",
    -  label = "",
    -  ladj = 0.5,
    -  lsrt = 0,
    -  lcex = 0.75,
    -  tadj = 0.5,
    -  tcex = 1,
    -  rnd = NULL,
    -  border_width = 2
    -)
    -
    - -
    -

    Arguments

    -
    x
    -

    numeric: object to obtain min and max values from for type = "continuous".

    - - -
    position
    -

    string: where you want the legend ("topleft", "topright", "bottomleft", or "bottomright").

    - - -
    col
    -

    character: colours to use.

    - - -
    ticks
    -

    numeric: number of ticks to include on the legend. Only used with type = "continuous".

    - - -
    tlabs
    -

    character: tick labels. Required for type = "discrete", optional for type = "continuous" if x is given.

    - - -
    breaks
    -

    numeric: vector of tick positions for type = "continuous" when x is given.

    - - -
    trim
    -

    numeric: trim value that was used to create the SOmap object (see SOmap).

    - - -
    type
    -

    string: type of legend ("discrete" or "continuous").

    - - -
    label
    -

    string: legend label.

    - - -
    ladj
    -

    numeric: distance to adjust the tick labels from the ticks.

    - - -
    lsrt
    -

    numeric: angle of the tick labels.

    - - -
    lcex
    -

    numeric: size of the tick labels.

    - - -
    tadj
    -

    numeric: distance to adjust the title from the ticks.

    - - -
    tcex
    -

    numeric: size of the title text.

    - - -
    rnd
    -

    numeric: optional rounding factor for continuous legends using the link{round} function.

    - - -
    border_width
    -

    numeric: thickness (in degrees of latitude) of the border.

    - -
    -
    -

    Value

    - - -

    An object of class "SOmap_legend". Printing or plotting this object will cause it to be added to the SOmap in the current graphics device.

    -
    - -
    -

    Examples

    -
    if (FALSE) {
    -  SOmap()
    -
    -  ## Discrete Legend
    -  SOleg(position = "topleft", col = hcl.colors(5, "Viridis"),
    -        tlabs = c("a", "b", "c", "d", "e"), trim = -45, label = "Species")
    -
    -  ## Continuous Legend
    -  SOleg(x = runif(100), position = "topright", col = hcl.colors(80, "Viridis"),
    -        breaks = c(0.1, 0.2, 0.5, 0.9), trim = -45, label = "Species",
    -        rnd = 1, type = "continuous")
    -}
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/SOmanagement.html b/docs/reference/SOmanagement.html deleted file mode 100644 index 1afc36f..0000000 --- a/docs/reference/SOmanagement.html +++ /dev/null @@ -1,267 +0,0 @@ - -Southern Ocean management map layers — SOmanagement • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    Function for adding management layers to SOmap

    -
    - -
    -
    SOmanagement(
    -  ccamlr = FALSE,
    -  ccamlr_labels = FALSE,
    -  ssru = FALSE,
    -  ssru_labels = FALSE,
    -  ssmu = FALSE,
    -  ssmu_labels = FALSE,
    -  rb = FALSE,
    -  rb_labels = FALSE,
    -  sprfmorb = FALSE,
    -  trim = -45,
    -  eez = FALSE,
    -  eez_labels = FALSE,
    -  mpa = FALSE,
    -  mpa_labels = FALSE,
    -  iwc = FALSE,
    -  iwc_labels = FALSE,
    -  domains = FALSE,
    -  domains_labels = FALSE,
    -  rb_col = "green",
    -  sprfmo_col = "grey50",
    -  ccamlr_col = "red",
    -  ssru_col = "grey50",
    -  ssmu_col = "grey70",
    -  eez_col = "maroon",
    -  mpa_col = "yellow",
    -  iwc_col = "blue",
    -  domains_col = "magenta",
    -  basemap
    -)
    -
    - -
    -

    Arguments

    -
    ccamlr
    -

    logical: if TRUE, insert the CCAMLR area boundaries.

    - - -
    ccamlr_labels
    -

    logical: if TRUE, add labels for the CCAMLR areas.

    - - -
    ssru
    -

    logical: if TRUE, insert the CCAMLR small scale research unit boundaries.

    - - -
    ssru_labels
    -

    logical: if TRUE, add labels for the CCAMLR small scale research units.

    - - -
    ssmu
    -

    logical: if TRUE, insert the CCAMLR small scale management unit boundaries.

    - - -
    ssmu_labels
    -

    logical: if TRUE, add labels for the CCAMLR small scale management units.

    - - -
    rb
    -

    logical: if TRUE, insert the CCAMLR research block boundaries.

    - - -
    rb_labels
    -

    logical: if TRUE, add labels for the CCAMLR research blocks.

    - - -
    sprfmorb
    -

    logical: if TRUE, insert the SPRFMO toothfish research block boundaries.

    - - -
    trim
    -

    numeric: latitude to trim the map to. Set this to -10 for effectively no trim.

    - - -
    eez
    -

    logical: if TRUE, insert Exclusive Economic Zones.

    - - -
    eez_labels
    -

    logical: if TRUE, add labels for the Exclusive Economic Zones.

    - - -
    mpa
    -

    logical: if TRUE, insert CCAMLR Marine Protected Areas.

    - - -
    mpa_labels
    -

    logical: if TRUE, add labels for the CCAMLR Marine Protected Areas.

    - - -
    iwc
    -

    logical: if TRUE, insert International Whaling Commission boundaries.

    - - -
    iwc_labels
    -

    logical: if TRUE, add labels for the International Whaling Commission areas.

    - - -
    domains
    -

    logical: if TRUE, insert CCAMLR Marine Protected Areas planning domains.

    - - -
    domains_labels
    -

    logical: if TRUE, add labels for the CCAMLR Marine Protected Area planning domains.

    - - -
    rb_col
    -

    character: colour for CCAMLR research blocks.

    - - -
    sprfmo_col
    -

    character: colour for SPRFMO toothfish research blocks

    - - -
    ccamlr_col
    -

    character: colour for CCAMLR boundaries

    - - -
    ssru_col
    -

    character: colour for CCAMLR small scale research units.

    - - -
    ssmu_col
    -

    character: colour for CCAMLR small scale management units.

    - - -
    eez_col
    -

    character: colour for Exclusive Economic Zone boundaries.

    - - -
    mpa_col
    -

    character: colour for CCAMLR Marine Protected Areas.

    - - -
    iwc_col
    -

    character: colour for IWC boundaries.

    - - -
    domains_col
    -

    character: colour for the CCAMLR planning domains boundaries.

    - - -
    basemap
    -

    SOmap or SOmap_auto: optional map object to extract extent, projection, and other information from.

    - -
    -
    -

    Value

    - - -

    An object of class "SOmap_management" containing the requested management layers. Printing or plotting this object will display those layers on the current map (note that an SOmap object needs to have been plotted first)

    -
    - -
    -

    Examples

    -
    if (FALSE) {
    -  tfile <- tempfile("SOmap", fileext = ".png")
    -  png(tfile, width=22, height=20, units='cm', res=600)
    -  SOmap(trim = -45)
    -  SOmanagement(ccamlr = TRUE, ccamlr_labels = TRUE, trim=-45)
    -  dev.off()
    -  unlink(tfile)
    -
    -  ## map with non-default latitudinal extent
    -  SOmap(trim = -55)
    -  ## either provide the same extent via 'trim'
    -  SOmanagement(ccamlr = TRUE, ccamlr_labels = TRUE, trim = -55)
    -
    -  ## or equivalently, pass the basemap to SOmanagement
    -  x <- SOmap(trim = -55)
    -  plot(x)
    -  SOmanagement(ccamlr = TRUE, ccamlr_labels = TRUE, basemap = x)
    -}
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/SOmap-defunct.html b/docs/reference/SOmap-defunct.html deleted file mode 100644 index 17c6c85..0000000 --- a/docs/reference/SOmap-defunct.html +++ /dev/null @@ -1,104 +0,0 @@ - -Defunct function — SOmap-defunct • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    Removed from SOmap

    -
    - -
    -
    default_somap(...)
    -
    -SOauto_map(...)
    -
    - -
    -

    Arguments

    -
    ...
    -

    all arguments passed to new function

    - -
    - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/SOmap-package.html b/docs/reference/SOmap-package.html deleted file mode 100644 index 55112fa..0000000 --- a/docs/reference/SOmap-package.html +++ /dev/null @@ -1,93 +0,0 @@ - -SOmap — SOmap-package • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    Create publication-quality Southern Ocean maps in a simple manner with multiple management layer options.

    -
    - - - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/SOmap.html b/docs/reference/SOmap.html deleted file mode 100644 index 4b54c1b..0000000 --- a/docs/reference/SOmap.html +++ /dev/null @@ -1,187 +0,0 @@ - -Southern Ocean Map — SOmap • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    Function for creating round Southern Ocean maps.

    -
    - -
    -
    SOmap(
    -  bathy_legend = TRUE,
    -  border = TRUE,
    -  trim = -45,
    -  graticules = FALSE,
    -  straight = FALSE,
    -  land = TRUE,
    -  land_col = "black",
    -  ice = TRUE,
    -  ice_col = "black",
    -  fronts = FALSE,
    -  fronts_col = c("hotpink", "orchid", "plum"),
    -  border_col = c("white", "black"),
    -  border_width = 2,
    -  graticules_col = "grey70"
    -)
    -
    - -
    -

    Arguments

    -
    bathy_legend
    -

    logical: if TRUE, insert the bathymetry legend. If bathy_legend = NULL or bathy_legend = "space", then space will be left for the legend but no legend will actually be plotted. Use this if you plan to add a legend later.

    - - -
    border
    -

    logical: if TRUE, insert longitude border.

    - - -
    trim
    -

    numeric: latitude to trim the map to. Set this to -10 for effectively no trim.

    - - -
    graticules
    -

    logical: if TRUE, insert graticule grid.

    - - -
    straight
    -

    logical: if TRUE, leave a blank space on the side for a straight legend.

    - - -
    land
    -

    logical: if TRUE, plot coastline.

    - - -
    land_col
    -

    character: colour to use for coastline.

    - - -
    ice
    -

    logical: if TRUE, plot ice features (ice shelves, glacier tongues, and similar).

    - - -
    ice_col
    -

    character: colour to use for ice features.

    - - -
    fronts
    -

    logical or string: if TRUE or "Orsi", plot Orsi et al., (1995) ocean fronts: Subantarctic Front, Polar Front, Southern Antarctic Circumpolar Current Front. If "Park" plot the Park & Durand (2019) fronts; Northern boundary, Subantarctic Front, Polar Front, Southern Antarctic Circumpolar Current Front and Southern Boundary.

    - - -
    fronts_col
    -

    character: colours for fronts.

    - - -
    border_col
    -

    character: colours for longitude border.

    - - -
    border_width
    -

    numeric: thickness (in degrees of latitude) of the border.

    - - -
    graticules_col
    -

    string: colour for graticule grid.

    - -
    -
    -

    Value

    - - -

    An object of class "SOmap", which represents a polar-stereographic map of the southern hemisphere. Printing or plotting this object will cause it to be displayed in the current graphics device.

    -
    - -
    -

    Examples

    -
    if (FALSE) {
    -  tfile <- tempfile("SOmap", fileext = ".png")
    -  png(tfile, width = 22, height = 20, units = "cm", res = 600)
    -  SOmap(trim = -45, graticules = TRUE)
    -  dev.off()
    -  unlink(tfile)
    -  SOmap(trim = -45, graticules = TRUE)
    -}
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/SOmap2.html b/docs/reference/SOmap2.html deleted file mode 100644 index 99c184b..0000000 --- a/docs/reference/SOmap2.html +++ /dev/null @@ -1,307 +0,0 @@ - -Southern Ocean Map 2 — SOmap2 • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    Function for creating round Southern Ocean maps with inbuild base layers.

    -
    - -
    -
    SOmap2(
    -  bathy_legend = TRUE,
    -  land = TRUE,
    -  ice = TRUE,
    -  ccamlr = FALSE,
    -  ccamlr_labels = FALSE,
    -  ssru = FALSE,
    -  ssru_labels = FALSE,
    -  ssmu = FALSE,
    -  ssmu_labels = FALSE,
    -  rb = FALSE,
    -  rb_labels = FALSE,
    -  sprfmorb = FALSE,
    -  border = TRUE,
    -  trim = -45,
    -  graticules = FALSE,
    -  eez = FALSE,
    -  eez_labels = FALSE,
    -  mpa = FALSE,
    -  mpa_labels = FALSE,
    -  domains = FALSE,
    -  domains_labels = FALSE,
    -  iwc = FALSE,
    -  iwc_labels = FALSE,
    -  straight = FALSE,
    -  fronts = FALSE,
    -  fronts_col = c("hotpink", "orchid", "plum"),
    -  land_col = "black",
    -  ice_col = "black",
    -  rb_col = 3,
    -  sprfmo_col = "grey50",
    -  ccamlr_col = 2,
    -  ssru_col = "grey50",
    -  ssmu_col = "grey70",
    -  eez_col = "maroon",
    -  mpa_col = "yellow",
    -  border_col = c("white", "black"),
    -  graticules_col = "grey70",
    -  iwc_col = "blue",
    -  domains_col = "magenta"
    -)
    -
    - -
    -

    Arguments

    -
    bathy_legend
    -

    logical: if TRUE, insert the bathymetry legend.

    - - -
    land
    -

    logical: if TRUE, plot the coastline.

    - - -
    ice
    -

    logical: if TRUE, plot ice features (ice shelves, glacier tongues, and similar).

    - - -
    ccamlr
    -

    logical: if TRUE, insert the CCAMLR area boundaries.

    - - -
    ccamlr_labels
    -

    logical: if TRUE, add labels for the CCAMLR areas.

    - - -
    ssru
    -

    logical: if TRUE, insert the CCAMLR small scale research unit boundaries.

    - - -
    ssru_labels
    -

    logical: if TRUE, add labels for the CCAMLR small scale research units.

    - - -
    ssmu
    -

    logical: if TRUE, insert the CCAMLR small scale management unit boundaries.

    - - -
    ssmu_labels
    -

    logical: if TRUE, add labels for the CCAMLR small scale management units.

    - - -
    rb
    -

    logical: if TRUE, insert the CCAMLR research block boundaries.

    - - -
    rb_labels
    -

    logical: if TRUE, add labels for the CCAMLR research blocks.

    - - -
    sprfmorb
    -

    logical: if TRUE, insert the SPRFMO toothfish research block boundaries.

    - - -
    border
    -

    logical: if TRUE, insert longitude border.

    - - -
    trim
    -

    numeric: latitude to trim the map to. Set this to -10 for effectively no trim.

    - - -
    graticules
    -

    logical: if TRUE, insert a graticule grid.

    - - -
    eez
    -

    logical: if TRUE, insert Exclusive Economic Zones.

    - - -
    eez_labels
    -

    logical: if TRUE, add labels for the Exclusive Economic Zones.

    - - -
    mpa
    -

    logical: if TRUE, insert CCAMLR Marine Protected Areas.

    - - -
    mpa_labels
    -

    logical: if TRUE, add labels for the CCAMLR Marine Protected Areas.

    - - -
    domains
    -

    logical: if TRUE, insert CCAMLR Marine Protected Areas planning domains.

    - - -
    domains_labels
    -

    logical: if TRUE, add labels for the CCAMLR Marine Protected Area planning domains.

    - - -
    iwc
    -

    logical: if TRUE, insert International Whaling Commission boundaries.

    - - -
    iwc_labels
    -

    logical: if TRUE, add labels for the International Whaling Commission areas.

    - - -
    straight
    -

    logical: if TRUE, leave a blank space on the side for a straight legend.

    - - -
    fronts
    -

    logical or string: if TRUE or "Orsi", plot Orsi et al., (1995) ocean fronts: Subantarctic Front, Polar Front, Southern Antarctic Circumpolar Current Front. If "Park" plot the Park & Durand (2019) fronts; Northern boundary, Subantarctic Front, Polar Front, Southern Antarctic Circumpolar Current Front and Southern Boundary.

    - - -
    fronts_col
    -

    character: colours to use for fronts.

    - - -
    land_col
    -

    character: colour to use for coastline.

    - - -
    ice_col
    -

    character: colour to use for ice features.

    - - -
    rb_col
    -

    character: colour for CCAMLR research blocks.

    - - -
    sprfmo_col
    -

    character: colour for SPRFMO toothfish research blocks

    - - -
    ccamlr_col
    -

    character: colour for CCAMLR boundaries

    - - -
    ssru_col
    -

    character: colour for CCAMLR small scale research units.

    - - -
    ssmu_col
    -

    character: colour for CCAMLR small scale management units.

    - - -
    eez_col
    -

    character: colour for Exclusive Economic Zone boundaries.

    - - -
    mpa_col
    -

    character: colour for CCAMLR Marine Protected Areas.

    - - -
    border_col
    -

    character: colours for longitude border.

    - - -
    graticules_col
    -

    character: colour for graticule grid.

    - - -
    iwc_col
    -

    character: colour for IWC boundaries.

    - - -
    domains_col
    -

    character: colour for the CCAMLR planning domains boundaries.

    - -
    -
    -

    Value

    - - -

    An object of class "SOmap", which represents a polar-stereographic map of the southern hemisphere, with the chosen management layers added. Printing or plotting this object will cause it to be displayed in the current graphics device.

    -
    - -
    -

    Examples

    -
    if (FALSE) {
    -  SOmap2(ccamlr = TRUE, mpa = TRUE, trim = -45)
    -}
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/SOmap_auto.html b/docs/reference/SOmap_auto.html deleted file mode 100644 index 75a5839..0000000 --- a/docs/reference/SOmap_auto.html +++ /dev/null @@ -1,266 +0,0 @@ - -Custom Southern Ocean map — SOmap_auto • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    Given some minimal input information, SOmap_auto will attempt to guess an appropriate extent and projection to use. For demonstration purposes, run the function without any inputs at all and it will use random location data.

    -
    - -
    -
    SOmap_auto(
    -  x,
    -  y,
    -  centre_lon = NULL,
    -  centre_lat = NULL,
    -  target = "stere",
    -  dimXY = c(512, 512),
    -  bathy = TRUE,
    -  land = TRUE,
    -  land_col = "black",
    -  ice = TRUE,
    -  ice_col = "black",
    -  input_points = TRUE,
    -  input_lines = TRUE,
    -  graticule = TRUE,
    -  expand = 0.05,
    -  contours = FALSE,
    -  levels = c(-500, -1000, -2000),
    -  ppch = 19,
    -  pcol = 2,
    -  pcex = 1,
    -  bathyleg = FALSE,
    -  llty = 1,
    -  llwd = 1,
    -  lcol = 1,
    -  gratlon = NULL,
    -  gratlat = NULL,
    -  gratpos = "all",
    -  ...
    -)
    -
    - -
    -

    Arguments

    -
    x
    -

    optional input data longitudes. x can also be a Raster or Spatial object, in which case the extent of x will be used for the map, but note that the contents of x will not be plotted automatically (use SOplot to do so)

    - - -
    y
    -

    optional input data latitudes

    - - -
    centre_lon
    -

    optional centre longitude (of the map projection, also used to for plot range if expand = TRUE)

    - - -
    centre_lat
    -

    as per centre_lon

    - - -
    target
    -

    optional projection family (default is stereographic), or full PROJ string (see Details)

    - - -
    dimXY
    -

    dimensions of background bathmetry (if used), a default is provided

    - - -
    bathy
    -

    logical: if TRUE, plot bathymetry. Alternatively, provide the bathymetry data to use as a Raster object

    - - -
    land
    -

    logical: if TRUE, plot coastline. Alternatively, provide the coastline data to use as a Spatial object

    - - -
    land_col
    -

    character: colour to use for plotting the coastline

    - - -
    ice
    -

    logical: if TRUE, plot ice features (ice shelves, glacier tongues, and similar)

    - - -
    ice_col
    -

    character: colour to use for ice features

    - - -
    input_points
    -

    add points to plot (of x, y)

    - - -
    input_lines
    -

    add lines to plot (of x, y)

    - - -
    graticule
    -

    flag to add a basic graticule

    - - -
    expand
    -

    fraction to expand plot range (default is 0.05, set to zero for no buffer, may be negative)

    - - -
    contours
    -

    logical: add contours?

    - - -
    levels
    -

    numeric: contour levels to use if contours is TRUE

    - - -
    ppch
    -

    set point character (default=19)

    - - -
    pcol
    -

    set point color (default=19)

    - - -
    pcex
    -

    set point cex (default=1)

    - - -
    bathyleg
    -

    optional bathymetry legend (default=FALSE)

    - - -
    llty
    -

    set line type

    - - -
    llwd
    -

    set line width

    - - -
    lcol
    -

    set line color

    - - -
    gratlon
    -

    longitude values for graticule meridians

    - - -
    gratlat
    -

    latitude values for graticule parallels

    - - -
    gratpos
    -

    positions (sides) of graticule labels

    - - -
    ...
    -

    reserved, checked for defunct and deprecated usage

    - -
    -
    -

    Value

    - - -

    An object of class SOmap_auto, containing the data and other details required to generate the map. Printing or plotting the object will cause it to be plotted.

    -
    -
    -

    Details

    -

    To input your data, use input locations as x (longitude) and y (latitude) values. There must be at least two locations. The x input object can also be provided as a Raster or Spatial object, in which case the extent of x will be used for the map, but note that the contents of x will not be plotted automatically (use SOplot to do so).

    -

    Try target families such as 'lcc', 'laea', 'gnom', 'merc', 'aea' if feeling adventurous.

    -
    - -
    -

    Examples

    -
    if (FALSE) {
    -  SOmap_auto(c(0, 50), c(-70, -50))
    -  SOmap_auto(runif(10, 130, 200), runif(10, -80, -10))
    -  SOplot(c(147, 180), c(-42, -60), pch = 19, cex = 2,col = "firebrick")
    -  SOmap_auto(runif(10, 130, 200), runif(10, -85, -60))
    -
    -  ## save the result to explore later!
    -  protomap <- SOmap_auto(runif(10, 60, 160), runif(10, -73, -50))
    -
    -  SOmap_auto(runif(50, 40, 180), runif(50, -73, -10), family = "laea", centre_lat = -15,
    -                input_lines = FALSE)
    -}
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/SOmap_data.html b/docs/reference/SOmap_data.html deleted file mode 100644 index 38c049b..0000000 --- a/docs/reference/SOmap_data.html +++ /dev/null @@ -1,184 +0,0 @@ - -Contextual data for Southern Ocean maps — SOmap_data • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    Various spatial datasets that are commonly used on Southern Ocean maps.

    -
    - -
    -
    data(SOmap_data)
    -
    - -
    -

    Format

    -

    A list containing the following elements:

    • CCAMLR_MPA

      • Description: current marine protected areas

      • -
      • Source: CCAMLR

      • -
      • URL: https://data.ccamlr.org/dataset/marine-protected-areas

      • -
      • License: not specified

      • -
    • -
    • CCAMLR_research_blocks

      • Description: A defined spatial area in which research fishing on toothfish is conducted under a research plan agreed by the Commission

      • -
      • Source: CCAMLR

      • -
      • URL: https://data.ccamlr.org/dataset/research-blocks

      • -
      • License: Not specified

      • -
    • -
    • CCAMLR_SSMU

      • Description: Small-scale management units (SSMUs) are designed to be used as a basis for subdividing the precautionary catch limit for krill in Subareas 48.1, 48.2, 48.3 and 48.4, and in developing management procedures for the krill fishery that can adequately account for localised effects on krill predators (SC-CAMLR-XXI, paragraphs 3.16 to 3.18). The boundaries of the SSMUs are based on predator foraging ranges (refer SC-CAMLR-XXI, Annex 4 and Trathan et al, 2008).

      • -
      • Source: CCAMLR

      • -
      • URL: https://data.ccamlr.org/dataset/small-scale-management-units

      • -
      • License: Not specified

      • -
    • -
    • CCAMLR_SSRU

      • Description: Small-scale research units (SSRUs) are designed to be used as a basis for subdividing the precautionary catch limit for toothfish in exploratory fisheries, and in condcuting research fishing and developing stock assessments. The boundaries of the SSRUs are defined in Conservation Measure 41-01 (2013). CCAMLR Secretariat (2013).

      • -
      • Source: CCAMLR

      • -
      • URL: https://data.ccamlr.org/dataset/small-scale-research-units

      • -
      • License: Not specified

      • -
    • -
    • CCAMLR_statistical_areas

      • Description: Statistical areas, subareas and divisions are used globally for the purpose of reporting fishery statistics. CCAMLR's Convention Area in the Southern Ocean is divided, for statistical purposes, into Area 48 (Atlantic Antarctic) between 70W and 30E, Area 58 (Indian Ocean Antarctic) between 30 and 150E, and Area 88 (Pacific Antarctic) between 150E and 70W. These areas, which are further subdivided into subareas and divisions, are managed by CCAMLR.

      • -
      • Source: CCAMLR

      • -
      • URL: https://data.ccamlr.org/dataset/statistical-areas-subareas-and-divisions

      • -
      • License: Public domain

      • -
    • -
    • CCAMLR_VME_polygons

      • Description: Defined areas of registered vulnerable marine ecosystems as defined under CM 22-09.

      • -
      • Source: CCAMLR

      • -
      • URL: https://gis.ccamlr.org/geoserver/ows?service=wfs&version=1.0.0&request=GetCapabilities

      • -
      • License: Not specified

      • -
    • -
    • CCAMLR_VME_fsr

      • Description: Vulnerable marine ecosystem fine-scale rectangles identified under CM 22-07.

      • -
      • Source: CCAMLR

      • -
      • URL: https://gis.ccamlr.org/geoserver/ows?service=wfs&version=1.0.0&request=GetCapabilities

      • -
      • License: Not specified

      • -
    • -
    • CCAMLR_VME_risk_areas

      • Description: Vulnerable marine ecosystem risk areas declared under CM 22-07.

      • -
      • Source: CCAMLR

      • -
      • URL: https://gis.ccamlr.org/geoserver/ows?service=wfs&version=1.0.0&request=GetCapabilities

      • -
      • License: Not specified

      • -
    • -
    • CCAMLR_planning_domains

      • Description: Nine planning domains were defined during the 2011 CCAMLR workshop on marine protected areas (SC-CAMLR-XXX, Annex 6). These planning domains provide comprehensive coverage of bioregions in the Southern Ocean and may be used as reporting and auditing units for work related to the development of MPAs and as a means to organise future activities related to this effort.

      • -
      • Source: CCAMLR

      • -
      • URL: https://gis.ccamlr.org/geoserver/ows?service=wfs&version=1.0.0&request=GetCapabilities

      • -
      • License: Not specified

      • -
    • -
    • continent

      • Description: Coastline, details TBA

      • -
      • Source: TBA

      • -
      • URL: TBA

      • -
      • License: TBA

      • -
    • -
    • EEZ

      • Description: An exclusive economic zone (EEZ) is a sea zone prescribed by the United Nations Convention on the Law of the Sea over which a state has special rights regarding the exploration and use of marine resources.

      • -
      • Source: Flanders Marine Institute (2020). Union of the ESRI Country shapefile and the Exclusive Economic Zones (version 3). https://doi.org/10.14284/403

      • -
      • URL: https://www.marineregions.org/

      • -
      • License: CC-BY

      • -
    • -
    • fronts_orsi

      • Description: Southern Ocean fronts as defined by Orsi et al. 1995

      • -
      • Source: orsifronts

      • -
      • URL: https://github.com/AustralianAntarcticDivision/orsifronts

      • -
      • License: see orsifronts

      • -
    • -
    • seaice_feb and seaice_oct

      • Description: median October and February sea ice extent

      • -
      • Source: Fetterer, F., K. Knowles, W. Meier, M. Savoie, and A. K. Windnagel. 2017, updated daily. Sea Ice Index, Version 3. Boulder, Colorado USA. NSIDC: National Snow and Ice Data Center

      • -
      • URL: https://doi.org/10.7265/N5K072F8

      • -
      • License: Please cite

      • -
    • -
    • mirounga_leonina

      • Description: Example elephant seal Argos tracking data

      • -
      • Source: Data were sourced from the Integrated Marine Observing System (IMOS) - IMOS is supported by the Australian Government through the National Collaborative Research Infrastructure Strategy and the Super Science Initiative

      • -
      • URL: https://github.com/ianjonsen/bsam

      • -
      • License: Please cite

      • -
    • -
    • ADD_coastline_med

      • Description: Medium-resolution coastline data from the SCAR Antarctic Digital Database. This coastline only covers continental Antarctica: see the GSHHS_i_L1 data for the remainder of the southern hemisphere

      • -
      • Source: SCAR

      • -
      • URL: https://add.data.bas.ac.uk/repository/entry/show?entryid=f477219b-9121-44d6-afa6-d8552762dc45

      • -
      • License: CC-BY. Citation: SCAR Antarctic Digital Database (2018)

      • -
    • -
    • GSHHS_i_L1

      • Description: Coastline data (excluding Antarctica) from the Global Self-consistent, Hierarchical, High-resolution Geography Database. Only southern hemisphere, level 1 (boundary between land and ocean, except Antarctica), intermediate resolution data are included here

      • -
      • Source: Wessel P, Smith WHF (1996) A Global Self-consistent, Hierarchical, High-resolution Shoreline Database. J. Geophys. Res. 101:8741-8743

      • -
      • URL: http://www.soest.hawaii.edu/wessel/gshhg/

      • -
      • License: LGPL

      • -
    • -
    • fronts_park

      • Description: Altimetry-derived Antarctic Circumpolar Current fronts

      • -
      • Source: Park Young-Hyang, Durand Isabelle (2019). Altimetry-drived Antarctic Circumpolar Current fronts. SEANOE.

      • -
      • URL: https://doi.org/10.17882/59800

      • -
      • License: CC-BY-4.0, please cite in full as at DOI

      • -
    • -
    - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/SOmap_text.html b/docs/reference/SOmap_text.html deleted file mode 100644 index ea9c488..0000000 --- a/docs/reference/SOmap_text.html +++ /dev/null @@ -1,127 +0,0 @@ - -Helper function for labels -This is basically a thin wrapper around text, that passes x[[labelcol]] to text as the labels parameter — SOmap_text • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    Helper function for labels -This is basically a thin wrapper around text, that passes x[[labelcol]] to text as the labels parameter

    -
    - -
    -
    SOmap_text(x, labelcol, ...)
    -
    - -
    -

    Arguments

    -
    x
    -

    data.frame, Spatial data.frame, or sfc: data to pass to text

    - - -
    labelcol
    -

    string: name of the column in x to use for text labels

    - - -
    ...
    -

    other plot arguements

    - -
    -
    -

    Value

    - - -

    as for text

    - - -
    -
    -

    See also

    - -
    - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/SOmerge.html b/docs/reference/SOmerge.html deleted file mode 100644 index 491af42..0000000 --- a/docs/reference/SOmerge.html +++ /dev/null @@ -1,162 +0,0 @@ - -Merge multiple SOmap or related objects — SOmerge • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    The inputs must contain exactly one object of class SOmap.

    -
    - -
    -
    SOmerge(..., reproject = TRUE)
    -
    - -
    -

    Arguments

    -
    ...
    -

    : one or more objects of class SOmap, SOmap_management, or SOmap_legend, or a list of such objects

    - - -
    reproject
    -

    logical: if TRUE (the default), and any of the input objects are in a different projection to the input SOmap object, an attempt will be made to reproject them. If you run into problems with SOmerge, try setting this to FALSE

    - -
    -
    -

    Value

    - - -

    A single object of class SOmap.

    -
    -
    -

    Details

    -

    Note that objects of class SOmap_auto are not yet supported.

    -
    -
    -

    See also

    - -
    - -
    -

    Examples

    -
    if (FALSE) {
    -  mymap <- SOmap(bathy_legend = "space")
    -  mylegend <- SOleg(x = runif(100), position = "topright", col = hcl.colors(80, "Viridis"),
    -                    breaks = c(0.1, 0.2, 0.5, 0.9), trim = -45, label = "Thing",
    -                    rnd = 1, type = "continuous")
    -  mymgmt <- SOmanagement(eez = TRUE, basemap = mymap)
    -  merged <- SOmerge(mymap, mymgmt, mylegend)
    -  plot(merged)
    -
    -  ## note that you need to take some care in constructing the component objects
    -  ##  to ensure their visual consistency
    -
    -  ## e.g. this will work, but the EEZ layers will extend beyond the map bounds
    -  mymap <- SOmap(trim = -55)
    -  mymgmt <- SOmanagement(eez = TRUE, trim = -45) ## note different trim
    -  plot(SOmerge(mymap, mymgmt))
    -
    -  ## better to do
    -  mymap <- SOmap(trim = -55)
    -  mymgmt <- SOmanagement(eez = TRUE, basemap = mymap)
    -  plot(SOmerge(mymap, mymgmt))
    -
    -  ## SOmerge will reproject objects on the fly if needed
    -
    -  sw_atlantic <- SOmap_auto(c(-70, -20), c(-65, -45), input_points = FALSE, input_lines = FALSE)
    -  mymap_auto$projection
    -  ## the EEZs within this region
    -  sw_atlantic_mgmt <- SOmanagement(eez = TRUE, basemap = sw_atlantic)
    -
    -  mymap <- SOmap()
    -  mymap$projection
    -
    -  ## sw_atlantic_mgmt lies within the bounds of mymap, so we might want to combine them
    -  ##  even though their projections are different
    -  merged <- SOmerge(mymap, sw_atlantic_mgmt)
    -  plot(merged)
    -}
    -
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/SOplot.html b/docs/reference/SOplot.html deleted file mode 100644 index 4aba8cf..0000000 --- a/docs/reference/SOplot.html +++ /dev/null @@ -1,136 +0,0 @@ - -Add items to an existing SOmap — SOplot • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    Reproject and add an object to an existing SOmap or SOmap_auto.

    -
    - -
    -
    SOplot(x, y = NULL, target = NULL, ..., source = NULL, add = TRUE)
    -
    - -
    -

    Arguments

    -
    x
    -

    : longitude vector, or an object with coordinates

    - - -
    y
    -

    : latitude vector, or missing if x is an object

    - - -
    target
    -

    : target projection. If not provided, it will default to the projection of the current map, and if that is not set it will use the default SOmap polar stereographic projection

    - - -
    ...
    -

    : other parameters passed to the plot function

    - - -
    source
    -

    : if x is not an object with a projection already set, specify its projection here (default = longlat)

    - - -
    add
    -

    logical: if TRUE, add this object to an existing plot

    - -
    - -
    -

    Examples

    -
    if (FALSE) {
    -  x <-c (-70, -60,-50, -90)
    -  y <-c (-50, -75, -45, -60)
    -  map <- SOmap_auto(x, y, input_lines = FALSE)
    -
    -  ## plot the map, with the x, y points already added
    -  map
    -  ## re-plot the points in a different colour and marker
    -  SOplot(x = x, y = y, pch = 0, cex = 2, col = 6)
    -}
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/SOproj.html b/docs/reference/SOproj.html deleted file mode 100644 index f3fa0b5..0000000 --- a/docs/reference/SOproj.html +++ /dev/null @@ -1,139 +0,0 @@ - -Southern projection — SOproj • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    Function for reprojecting data.

    -
    - -
    -
    SOproj(x, y = NULL, target = NULL, data, ..., source = NULL)
    -
    - -
    -

    Arguments

    -
    x
    -

    longitude vector, or object with coordinates

    - - -
    y
    -

    latitude vector

    - - -
    target
    -

    target projection (default = stereo)

    - - -
    data
    -

    optional data to be included

    - - -
    ...
    -

    arguments passed to reproj::reproj() function

    - - -
    source
    -

    starting projection (default = longlat)

    - -
    -
    -

    Value

    - - -

    Reprojects the given data object to polar projection. Works with Points, spatial, raster, SOmap, sf and sfc objects.

    -
    - -
    -

    Examples

    -
    if (FALSE) {
    - lat <- c(-70, -60,-50, -90)
    - lon <- c(-50, -75, -45, -60)
    - pnts <- SOproj(x = lon, y = lat)
    - SOmap2(CCAMLR = TRUE)
    - plot(pnts, pch = 19, col = 3, add = TRUE)
    -}
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/figures/README-SOleg-1.png b/docs/reference/figures/README-SOleg-1.png deleted file mode 100644 index e8f8f16..0000000 Binary files a/docs/reference/figures/README-SOleg-1.png and /dev/null differ diff --git a/docs/reference/figures/README-add-it-1.png b/docs/reference/figures/README-add-it-1.png deleted file mode 100644 index 96f203d..0000000 Binary files a/docs/reference/figures/README-add-it-1.png and /dev/null differ diff --git a/docs/reference/figures/README-auto-setup-1.png b/docs/reference/figures/README-auto-setup-1.png deleted file mode 100644 index c32718a..0000000 Binary files a/docs/reference/figures/README-auto-setup-1.png and /dev/null differ diff --git a/docs/reference/figures/README-automap-1.png b/docs/reference/figures/README-automap-1.png deleted file mode 100644 index 912c959..0000000 Binary files a/docs/reference/figures/README-automap-1.png and /dev/null differ diff --git a/docs/reference/figures/README-automap-spatial-1.png b/docs/reference/figures/README-automap-spatial-1.png deleted file mode 100644 index 783bbd3..0000000 Binary files a/docs/reference/figures/README-automap-spatial-1.png and /dev/null differ diff --git a/docs/reference/figures/README-automap3-1.png b/docs/reference/figures/README-automap3-1.png deleted file mode 100644 index e25b44e..0000000 Binary files a/docs/reference/figures/README-automap3-1.png and /dev/null differ diff --git a/docs/reference/figures/README-automap4-1.png b/docs/reference/figures/README-automap4-1.png deleted file mode 100644 index e25b44e..0000000 Binary files a/docs/reference/figures/README-automap4-1.png and /dev/null differ diff --git a/docs/reference/figures/README-examplemap-1.png b/docs/reference/figures/README-examplemap-1.png deleted file mode 100644 index 633af74..0000000 Binary files a/docs/reference/figures/README-examplemap-1.png and /dev/null differ diff --git a/docs/reference/figures/README-just-map-it-1.png b/docs/reference/figures/README-just-map-it-1.png deleted file mode 100644 index 07173c8..0000000 Binary files a/docs/reference/figures/README-just-map-it-1.png and /dev/null differ diff --git a/docs/reference/figures/README-management-1.png b/docs/reference/figures/README-management-1.png deleted file mode 100644 index bbd43d3..0000000 Binary files a/docs/reference/figures/README-management-1.png and /dev/null differ diff --git a/docs/reference/figures/README-raster-1.png b/docs/reference/figures/README-raster-1.png deleted file mode 100644 index b852fa3..0000000 Binary files a/docs/reference/figures/README-raster-1.png and /dev/null differ diff --git a/docs/reference/figures/logo.png b/docs/reference/figures/logo.png deleted file mode 100644 index ae8f2a7..0000000 Binary files a/docs/reference/figures/logo.png and /dev/null differ diff --git a/docs/reference/ice.html b/docs/reference/ice.html deleted file mode 100644 index 7d0d8d9..0000000 --- a/docs/reference/ice.html +++ /dev/null @@ -1,105 +0,0 @@ - -Sea ice — ice • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    Example sea ice concentration data from the Southern Ocean (2018-10-15). -(See "data-raw/ice.R").

    -
    - - - -
    -

    Examples

    -
    if (FALSE) {
    -  ll <- "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
    -  xy <- coordinates(spTransform(as(SOmap_data$fronts_orsi, "SpatialPoints"), ll))
    -  ## just because you can doesn't mean you should ...
    -  SOmap_auto(xy[,1], xy[,2], bathy = ice, input_points = FALSE, levels = c(15, 30, 60, 90))
    -}
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/index.html b/docs/reference/index.html deleted file mode 100644 index b11573e..0000000 --- a/docs/reference/index.html +++ /dev/null @@ -1,187 +0,0 @@ - -Function reference • SOmap - - -
    -
    - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    All functions

    -

    -
    -

    Bathy

    -

    Bathymetric data for maps

    -

    SO_plotter()

    -

    Construct a SO_plotter object

    -

    SOauto_crop()

    -

    Reproject and crop Spatial and sf objects to SOmap objects

    -

    SObin()

    -

    Bin longitude latitude points by count in a SOmap context

    -

    SOcode()

    -

    Extract plotting code from a SOmap

    -

    SOcrs()

    -

    SOmap coordinate system

    -

    SOgg()

    -

    Generate a ggplot2 representation of an SOmap object

    -

    SOgg_cex()

    -

    Convert cex to ggplot size

    -

    SOleg()

    -

    Rounded legends for SOmap

    -

    SOmanagement()

    -

    Southern Ocean management map layers

    -

    default_somap() SOauto_map()

    -

    Defunct function

    -

    SOmap-package

    -

    SOmap

    -

    SOmap()

    -

    Southern Ocean Map

    -

    SOmap2()

    -

    Southern Ocean Map 2

    -

    SOmap_auto()

    -

    Custom Southern Ocean map

    -

    SOmap_data

    -

    Contextual data for Southern Ocean maps

    -

    SOmap_text()

    -

    Helper function for labels -This is basically a thin wrapper around text, that passes x[[labelcol]] to text as the labels parameter

    -

    SOmerge()

    -

    Merge multiple SOmap or related objects

    -

    SOplot()

    -

    Add items to an existing SOmap

    -

    SOproj()

    -

    Southern projection

    -

    ice

    -

    Sea ice

    -

    is.discrete()

    -

    used in SOleg to test color palettes

    -

    latmask()

    -

    Latitude mask for polar rasters.

    -

    reproj(<SOmap>) reproj(<SOmap_auto>) reproj(<SOmap_management>) reproj(<SOmap_legend>) reproj(<BasicRaster>) reproj(<Spatial>) reproj(<sf>) reproj(<sfc>)

    -

    Reproject SOmap

    - - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/is.discrete.html b/docs/reference/is.discrete.html deleted file mode 100644 index 561ded7..0000000 --- a/docs/reference/is.discrete.html +++ /dev/null @@ -1,108 +0,0 @@ - -used in SOleg to test color palettes — is.discrete • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    used in SOleg to test color palettes

    -
    - -
    -
    is.discrete(x)
    -
    - -
    -

    Arguments

    -
    x
    -

    Object to test for is it discrete

    - -
    -
    -

    Value

    - - -

    returns true false

    -
    - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/latmask.html b/docs/reference/latmask.html deleted file mode 100644 index 90f391d..0000000 --- a/docs/reference/latmask.html +++ /dev/null @@ -1,118 +0,0 @@ - -Latitude mask for polar rasters. — latmask • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    Latitude mask for polar projections; written by M.D. Sumner and part of the spex package.

    -
    - -
    -
    latmask(x, latitude = 0, southern = TRUE)
    -
    - -
    -

    Arguments

    -
    x
    -

    A raster layer.

    - - -
    latitude
    -

    maximum latitude (effectively a minimum latitude if southern = FALSE)

    - - -
    southern
    -

    flag for whether south-polar context is used, default is TRUE

    - -
    - -
    -

    Examples

    -
    if (FALSE) {
    -## assumes that you have already defined a raster object called 'ice'
    -plot(latmask(ice, -60))
    -}
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/reproj.html b/docs/reference/reproj.html deleted file mode 100644 index 4c64402..0000000 --- a/docs/reference/reproj.html +++ /dev/null @@ -1,169 +0,0 @@ - -Reproject SOmap — reproj • SOmap - - -
    -
    - - - -
    -
    - - -
    -

    Reproject a SOmap object by specifying a 'target' projection string (PROJ4)

    -
    - -
    -
    # S3 method for SOmap
    -reproj(x, target, ..., source = NULL)
    -
    -# S3 method for SOmap_auto
    -reproj(x, target, ..., source = NULL)
    -
    -# S3 method for SOmap_management
    -reproj(x, target, ..., source = NULL)
    -
    -# S3 method for SOmap_legend
    -reproj(x, target, ..., source = NULL)
    -
    -# S3 method for BasicRaster
    -reproj(x, target, ..., source = NULL)
    -
    -# S3 method for Spatial
    -reproj(x, target, ..., source = NULL)
    -
    -# S3 method for sf
    -reproj(x, target, ..., source = NULL)
    -
    -# S3 method for sfc
    -reproj(x, target, ..., source = NULL)
    -
    - -
    -

    Arguments

    -
    x
    -

    coordinates

    - - -
    target
    -

    target specification (PROJ.4 string or epsg code)

    - - -
    ...
    -

    arguments passed to the underlying projection engine, see reproj::reproj()

    - - -
    source
    -

    source specification (PROJ.4 string or epsg code)

    - -
    -
    -

    Details

    -

    See reproj::reproj() for details.

    -
    -
    -

    Warning

    - - -

    So many ...

    -
    -
    -

    See also

    - -
    - -
    -

    Examples

    -
    if (FALSE) {
    -  set.seed(27)
    -  amap <- SOmap_auto()
    -  reproj(amap, "+proj=moll")
    -  reproj(amap, "+proj=laea +lat_0=-55 +lon_0=154 +datum=WGS84")
    -
    -  bmap <- SOmap(trim = -35)
    -
    -  ## works great!
    -  reproj(bmap, "+proj=stere +lat_0=-90 +lon_0=147 +lat_ts=-71 +datum=WGS84")
    -
    -  ## these aren't exactly ideal
    -  reproj(bmap, "+proj=ortho +lat_0=-70")
    -  reproj(bmap, "+proj=laea +lat_0=-55 +lon_0=154 +datum=WGS84")
    -}
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.0.6.

    -
    - -
    - - - - - - - - diff --git a/docs/sitemap.xml b/docs/sitemap.xml deleted file mode 100644 index d4ae010..0000000 --- a/docs/sitemap.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - /404.html - - - /CODE_OF_CONDUCT.html - - - /articles/SOmap-introduction.html - - - /articles/index.html - - - /articles/many-automap-examples.html - - - /authors.html - - - /index.html - - - /news/index.html - - - /reference/Bathy.html - - - /reference/SO_plotter.html - - - /reference/SOauto_crop.html - - - /reference/SObin.html - - - /reference/SOcode.html - - - /reference/SOcrs.html - - - /reference/SOgg.html - - - /reference/SOgg_cex.html - - - /reference/SOleg.html - - - /reference/SOmanagement.html - - - /reference/SOmap-defunct.html - - - /reference/SOmap-package.html - - - /reference/SOmap.html - - - /reference/SOmap2.html - - - /reference/SOmap_auto.html - - - /reference/SOmap_data.html - - - /reference/SOmap_text.html - - - /reference/SOmerge.html - - - /reference/SOplot.html - - - /reference/SOproj.html - - - /reference/ice.html - - - /reference/index.html - - - /reference/is.discrete.html - - - /reference/latmask.html - - - /reference/reproj.html - -