Skip to content

Commit

Permalink
Merge pull request #782 from olivroy/data-raw
Browse files Browse the repository at this point in the history
Spell check + move build to data-raw
  • Loading branch information
mtennekes committed Sep 20, 2023
2 parents 2ab6b65 + c1b8314 commit e2eaf4c
Show file tree
Hide file tree
Showing 42 changed files with 266 additions and 243 deletions.
2 changes: 1 addition & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ local
LICENSE
README
.Rprofile
build/
gdal-2.1.0
gdal-2.1.0.tar.gz
ubuntu_16_installation.sh
Expand All @@ -23,3 +22,4 @@ ubuntu_17_installation.sh
^docs$
^pkgdown$
^\.github$
^data-raw$
176 changes: 88 additions & 88 deletions NEWS.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions R/pkg.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#'
#' Thematic maps are geographical maps in which spatial data distributions are visualized. This package offers a flexible, layer-based, and easy to use approach to create thematic maps, such as choropleths and bubble maps. It is based on the grammar of graphics, and resembles the syntax of ggplot2.
#'
#' This page provides a brief overview of all package functions. See `vignette("tmap_sneek_peek")` for a short introduction with examples.
#' This page provides a brief overview of all package functions. See `vignette("tmap_sneak_peek")` for a short introduction with examples.
#'
#' @section Quick plotting method:
#' \tabular{ll}{
Expand Down Expand Up @@ -113,6 +113,6 @@
#' @concept statistical maps
#' @concept choropleth
#' @concept bubble map
#' @seealso `vignette("tmap_sneek_peek")`, <https://r-tmap.github.io/tmap/>
#' @seealso `vignette("tmap_sneak_peek")`, <https://r-tmap.github.io/tmap/>
#' @references Tennekes, M., 2018, {tmap}: Thematic Maps in {R}, Journal of Statistical Software, 84(6), 1-39, \doi{10.18637/jss.v084.i06}
"_PACKAGE"
14 changes: 7 additions & 7 deletions R/qtm.R
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
#' Quick thematic map plot
#'
#' Draw a thematic map quickly. This function is a convenient wrapper of the main plotting method of stacking [tmap-element()]s. Without arguments or with a search term, this functions draws an interactive map.
#' Draw a thematic map quickly. This function is a convenient wrapper of the main plotting method of stacking [`tmap-element`]s. Without arguments or with a search term, this functions draws an interactive map.
#'
#' The first argument is a shape object (normally specified by [tm_shape()]). The next arguments, from `fill` to `raster`, are the aesthetics from the main layers. The remaining arguments are related to the map layout. Any argument from any main layer function, such as [tm_polygons()], can be specified (see `...`). It is also possible to stack [tmap-element()]s on a `qtm` plot. See examples.
#' The first argument is a shape object (normally specified by [tm_shape()]). The next arguments, from `fill` to `raster`, are the aesthetics from the main layers. The remaining arguments are related to the map layout. Any argument from any main layer function, such as [tm_polygons()], can be specified (see `...`). It is also possible to stack [`tmap-element`]s on a `qtm` plot. See examples.
#'
#' By default, a scale bar is shown. This option can be set with [tmap_options()] (argument `qtm.scalebar`). A minimap is shown by default when `qtm` is called without arguments of with a search term. This option can be set with [tmap_options()] (argument `qtm.minimap`).
#'
#' @param shp One of
#' \itemize{
#' \item shape object, which is an object from a class defined by the [`sf`][`sf::sf`] or [`stars`][stars::st_as_stars()] package. Objects from the packages `sp` and `raster` are also supported, but discouraged.
#' \item Not specified, i.e. `qtm()` is executed. In this case a plain interactive map is shown.
#' \item A OSM search string, e.g. `qtm("Amsterdam")`. In this case a plain interactive map is shown positioned according to the results of the search query (from OpenStreetMap nominatim)
#' \item An OpenStreetMap search string, e.g. `qtm("Amsterdam")`. In this case a plain interactive map is shown positioned according to the results of the search query (from OpenStreetMap nominatim)
#' }
#' @param fill,col,size,shape,lwd,lty,fill_alpha,col_alpha Visual variables.
#' @param by data variable name by which the data is split, or a vector of two variable names to split the data by two variables (where the first is used for the rows and the second for the columns). See also [tm_facets()]
#' @param scale numeric value that serves as the global scale parameter. All font sizes, symbol sizes, border widths, and line widths are controlled by this value. The parameters `symbols.size`, `text.size`, and `lines.lwd` can be scaled seperately with respectively `symbols.scale`, `text.scale`, and `lines.scale`. See also `...`.
#' @param scale numeric value that serves as the global scale parameter. All font sizes, symbol sizes, border widths, and line widths are controlled by this value. The parameters `symbols.size`, `text.size`, and `lines.lwd` can be scaled separately with respectively `symbols.scale`, `text.scale`, and `lines.scale`. See also `...`.
#' @param title main title. For legend titles, use `X.style`, where X is the layer name (see `...`).
#' @param crs Either a [`crs`][sf::st_crs()] object or a character value (`PROJ.4` character string). By default, the projection is used that is defined in the `shp` object itself.
#' @param bbox bounding box. Arugment passed on to [tm_shape()]
#' @param bbox bounding box. Argument passed on to [tm_shape()]
#' @param basemaps name(s) of the provider or an URL of a tiled basemap. It is a shortcut to [tm_basemap()]. Set to `NULL` to disable basemaps. By default, it is set to the tmap option `basemaps`.
#' @param overlays name(s) of the provider or an URL of a tiled overlay map. It is a shortcut to [tm_tiles()].
#' @param zindex zindex
Expand All @@ -26,9 +26,9 @@
#' @param style Layout options (see [tm_layout()]) that define the style. See [tmap_style()] for details.
#' @param format Layout options (see [tm_layout()]) that define the format. See [tmap_format()] for details.
#' @param ... arguments passed on to the `tm_*` functions. The prefix of these arguments should be with the layer function name without `"tm_"` and a period. For instance, the palette for polygon fill color is called `fill.palette`. The following prefixes are supported: `shape.`, `fill.`, `borders.`, `polygons.`, `symbols.`, `dots.`, `lines.`, `raster.`, `text.`, `layout.`, `grid.`, `facets.`, and `view.`. Arguments that have a unique name, i.e. that does not exist in any other layer function, e.g. `convert2density`, can also be called without prefix.
#' @return [tmap-element()]
#' @return A [`tmap-element`]
#' @example ./examples/qtm.R
#' @seealso `vignette("tmap_sneek_peek")`
#' @seealso `vignette("tmap_sneak_peek")`
#' @references Tennekes, M., 2018, {tmap}: Thematic Maps in {R}, Journal of Statistical Software, 84(6), 1-39, \doi{10.18637/jss.v084.i06}
#' @export
qtm <- function(shp,
Expand Down
6 changes: 3 additions & 3 deletions R/shapeTM.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#'
#' Internal tmap function to create a tmap shape
#'
#' @param shp shp
#' @param tmapID tmapID
#' @param bbox bbox
#' @param shp Shape file
#' @param tmapID tmap Identifier
#' @param bbox bounding box
#' @export
#' @keywords internal
shapeTM = function(shp, tmapID = NULL, bbox = NULL, ...) {
Expand Down
4 changes: 2 additions & 2 deletions R/tm_facets.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#' @param textNA Text used for facets of missing values.
#' @param scale.factor Number that determines how the elements (e.g. font sizes, symbol sizes, line widths) of the small multiples are scaled in relation to the scaling factor of the shapes. The elements are scaled to the `scale.factor`th root of the scaling factor of the shapes. So, for `scale.factor=1`, they are scaled proportional to the scaling of the shapes. Since elements, especially text, are often too small to read, a higher value is recommended. By default, `scale.factor=2`.
#' @param type `"grid"`, `"wrap"` or `"stack"`
#' @param along deceprated Please use `tm_facets_page()`
#' @param along deprecated Please use `tm_facets_page()`
#' @export
#' @rdname tm_facets
#' @name tm_facets
Expand Down Expand Up @@ -104,7 +104,7 @@ tm_facets_grid = function(rows = NULL,

#' @export
#' @rdname tm_facets
#' @param ... paseed on to `tm_facets()`
#' @param ... passed on to `tm_facets()`
#' @name tm_facets_wrap
tm_facets_wrap = function(by = "VARS__",
nrows = NA,
Expand Down
2 changes: 1 addition & 1 deletion R/tm_layers_aux.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ tm_graticules = function(x = NA,

#' Coordinate grid / graticule lines
#'
#' Creates a [`tmap-element`] that draws coordinate grid lines. It serves as a layer that can be drawn anywhere between other layers. By default, `tm_grid()` draws horizontal and vertical lines acording to the coordinate system of the (master) shape object. Latitude and longitude graticules are drawn with `tm_graticules()`.
#' Creates a [`tmap-element`] that draws coordinate grid lines. It serves as a layer that can be drawn anywhere between other layers. By default, `tm_grid()` draws horizontal and vertical lines according to the coordinate system of the (master) shape object. Latitude and longitude graticules are drawn with `tm_graticules()`.
#'
#' @param x X coordinates for vertical grid lines. If `NA`, it is specified with a pretty scale and `n.x`.
#' @param y Y coordinates for horizontal grid lines. If `NA`, it is specified with a pretty scale and `n.y`.
Expand Down
2 changes: 1 addition & 1 deletion R/tm_layers_cartogram.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' @param size,size.scale,size.legend,size.free Transformation variable that determines the size of the polygons.
#' @param plot.order Specification in which order the spatial features are drawn. See [tm_plot_order()] for details.
#' @param trans.args lists that are passed on to internal transformation function
#' @param ... passd on to [tm_polygons()]
#' @inheritDotParams tm_polygons
#' @export
tm_cartogram = function(size = 1,
size.scale = tm_scale(),
Expand Down
2 changes: 1 addition & 1 deletion R/tm_layout.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ tm_layout = function(
#' @param control.bases base layers
#' @param control.overlays overlay layers
#' @param set.bounds logical that determines whether maximum bounds are set, or a bounding box. Not applicable in plot mode. In view mode, this is passed on to [setMaxBounds()][leaflet::setMaxBounds()]
#' @param set.view numeric vector that determines the view. Either a vector of three: lng, lat, and zoom, or a single value: zoom. See [setView()][leaflet::setView()]. Only applicable if `bbox` is not specified
#' @param set.view numeric vector that determines the view. Either a vector of three: `lng`, `lat`, and `zoom`, or a single value: `zoom`. See [setView()][leaflet::setView()]. Only applicable if `bbox` is not specified
#' @param set.zoom.limits numeric vector of two that set the minimum and maximum zoom levels (see [tileOptions()][leaflet::tileOptions()]).
#' @param leaflet.options options passed on to [leafletOptions()][leaflet::leafletOptions()]
#' @export
Expand Down
Loading

0 comments on commit e2eaf4c

Please sign in to comment.