Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Jan 5, 2024
1 parent 4b33b3a commit ee4293a
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 79 deletions.
41 changes: 23 additions & 18 deletions R/gisco_get_nuts.R
Original file line number Diff line number Diff line change
@@ -1,38 +1,43 @@
#' Get GISCO NUTS `sf` polygons, points and lines
#' Get GISCO NUTS \CRANpkg{sf} polygons, points and lines
#'
#' @description
#' Returns
#' [NUTS regions](https://en.wikipedia.org/wiki/Nomenclature_of_Territorial_Units_for_Statistics)
#' [NUTS
#' regions](https://en.wikipedia.org/wiki/Nomenclature_of_Territorial_Units_for_Statistics)

Check notice on line 6 in R/gisco_get_nuts.R

View check run for this annotation

codefactor.io / CodeFactor

R/gisco_get_nuts.R#L6

Lines should not be more than 80 characters. This line is 91 characters. (line_length_linter)

Check notice

Code scanning / lintr

Lines should not be more than 80 characters. This line is 91 characters. Note

Lines should not be more than 80 characters. This line is 91 characters.
#' polygons, lines and points at a specified scale, as provided by GISCO.
#'
#' NUTS are provided at three different levels:
#' * **"0"**: Country level
#' * **"1"**: Groups of states/regions
#' * **"2"**: States/regions
#' * **"3"**: Counties/provinces/districts
#' * `"0"`: Country level
#' * `"1"`: Groups of states/regions
#' * `"2"`: States/regions
#' * `"3"`: Counties/provinces/districts
#'
#' Note that NUTS-level definition may vary across countries. See also
#' <https://ec.europa.eu/eurostat/web/nuts/background>.
#'
#' @concept political
#' @family political
#'
#' @return A `sf` object specified by `spatialtype`. The resulting `sf` object
#' would present an additional column `geo` (equal to `NUTS_ID`) for
#' improving compatibility with \CRANpkg{eurostat} package. See
#' [eurostat::get_eurostat_geospatial()]). See also [gisco_nuts] to
#' understand the columns and values provided.
#' @return A \CRANpkg{sf} object specified by `spatialtype`. The resulting
#' \CRANpkg{sf} object would present an additional column `geo` (equal to
#' `NUTS_ID`) for improving compatibility with \CRANpkg{eurostat} package. See
#' [eurostat::get_eurostat_geospatial()]).
#'
#' @param year Release year of the file. One of "2003", "2006,
#' "2010", "2013", "2016" or "2021".
#' See also [gisco_nuts] to understand the columns and values provided.
#'
#' @param year Release year of the file. One of `"2003"`, `"2006"`, `"2010"`,
#' `"2013"`, `"2016"` or `"2021"`.
#'
#' @param spatialtype Type of geometry to be returned:
#' * **"BN"**: Boundaries - `LINESTRING` object.
#' * **"LB"**: Labels - `POINT` object.
#' * **"RG"**: Regions - `MULTIPOLYGON/POLYGON` object.
#' * `"BN"`: Boundaries - `LINESTRING` object.
#' * `"LB"`: Labels - `POINT` object.
#' * `"RG"`: Regions - `MULTIPOLYGON/POLYGON` object.
#'
#' **Note that** parameters `country`, `nuts_level` and `nuts_id` would be only
#' applied when `spatialtype` is `"BN"` or `"RG"`.
#'
#' @param nuts_level NUTS level. One of "0", "1", "2" or "3".
#' See Description.
#' @param nuts_level NUTS level. One of `"0"`, `"1"`, `"2"` or `"3"`.
#' See **Description**.
#'
#' @param nuts_id Optional. A character vector of NUTS IDs.
#'
Expand Down
4 changes: 2 additions & 2 deletions R/gisco_get_postalcodes.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
#'
#' Get postal codes points of the EU, EFTA and candidate countries.
#'
#' @param year Year of reference. Currently only "2020" is available.
#' @param year Year of reference. Currently only `"2020"` is available.
#'
#' @inheritParams gisco_get_airports
#' @inheritSection gisco_get_countries About caching
#'
#' @family political
#'
#' @return A `POINT` object on EPSG:4326.
#' @return A `POINT` \CRANpkg{sf} object on EPSG:4326.
#'
#' @export
#'
Expand Down
22 changes: 11 additions & 11 deletions R/gisco_get_units.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@
#' @family political
#'
#' @return
#' A `sf` object on `mode = "sf"` or a dataframe on `mode = "df"`.
#' A \CRANpkg{sf} object on `mode = "sf"` or a data frame on `mode = "df"`.
#'
#' @param id_giscoR Select the `unit` type to be downloaded.
#' Accepted values are "nuts", "countries" or "urban_audit".
#' @param id_giscoR Select the `unit` type to be downloaded. Accepted values are
#' `"nuts"`, `"countries"` or `"urban_audit"`.
#'
#' @param unit Unit ID to be downloaded. See Details.
#' @param unit Unit ID to be downloaded. See **Details**.
#'
#' @param mode Controls the output of the function. Possible values are "sf"
#' or "df". See Value and Details.
#' @param mode Controls the output of the function. Possible values are `"sf"`
#' or `"df"`. See **Value** and **Details**.
#'
#' @param spatialtype Type of geometry to be returned: "RG", for `POLYGON` and
#' "LB" for `POINT`.
#' @param spatialtype Type of geometry to be returned: `"RG"`, for `POLYGON` and
#' `"LB"` for `POINT`.
#'
#' @inheritParams gisco_get_countries
#'
#' @inheritSection gisco_get_countries About caching
#'
#' @details
#' The function can return a dataframe on `mode = "df"` or a `sf` object
#' on `mode = "sf"`.
#' The function can return a data frame on `mode = "df"` or a \CRANpkg{sf}
#' object on `mode = "sf"`.
#'
#' In order to see the available `unit` ids with the required
#' combination of `spatialtype, year`, first run the function on "df"
#' combination of `spatialtype, year`, first run the function on `"df"`
#' mode. Once that you get the data frame you can select the required ids
#' on the `unit` parameter.
#'
Expand Down
17 changes: 9 additions & 8 deletions R/gisco_get_urban_audit.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#' Get GISCO greater cities and metropolitan areas `sf` polygons and points
#' Get GISCO greater cities and metropolitan areas \CRANpkg{sf} polygons and
#' points
#'
#' @description
#' Returns polygons and points corresponding to cities, greater cities and
Expand All @@ -9,17 +10,17 @@
#' @concept political
#' @family political
#'
#' @return A `sf` object specified by `spatialtype`.
#' @return A \CRANpkg{sf} object specified by `spatialtype`.
#'
#' @param year Release year of the file. One of "2001", "2004",
#' "2014", "2018" or "2020".
#' @param year Release year of the file. One of `"2001"`, `"2004"`, `"2014"`,
#' `"2018"` or `"2020"`.
#'
#' @param spatialtype Type of geometry to be returned:
#' * **"LB"**: Labels - `POINT` object.
#' * **"RG"**: Regions - `MULTIPOLYGON/POLYGON` object.
#' * `"LB"`: Labels - `POINT` object.
#' * `"RG"`: Regions - `MULTIPOLYGON/POLYGON` object.
#'
#' @param level Level of Urban Audit. Possible values are "CITIES", "FUA",
#' "GREATER_CITIES" or `NULL`, that would download the full dataset.
#' @param level Level of Urban Audit. Possible values are `"CITIES"`, `"FUA"`,
#' `"GREATER_CITIES"` or `NULL`, that would download the full dataset.
#'
#' @inheritParams gisco_get_countries
#'
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
"applicationCategory": "cartography",
"isPartOf": "http://ropengov.org/",
"keywords": ["ropengov", "r", "spatial", "api-wrapper", "rstats", "r-package", "eurostat", "gisco", "thematic-maps", "eurostat-data", "cran", "ggplot2", "gis"],
"fileSize": "1424.345KB",
"fileSize": "1423.946KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down
40 changes: 22 additions & 18 deletions man/gisco_get_nuts.Rd

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

4 changes: 2 additions & 2 deletions man/gisco_get_postalcodes.Rd

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

22 changes: 11 additions & 11 deletions man/gisco_get_units.Rd

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

17 changes: 9 additions & 8 deletions man/gisco_get_urban_audit.Rd

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

0 comments on commit ee4293a

Please sign in to comment.