diff --git a/.RData b/.RData deleted file mode 100644 index 6c4d769..0000000 Binary files a/.RData and /dev/null differ diff --git a/.Rbuildignore b/.Rbuildignore index 13e458c..9269c5a 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,2 +1,5 @@ -^.*\.Rproj$ -^\.Rproj\.user$ +^.*\.Rproj$ +^\.Rproj\.user$ +^README\.Rmd$ +^\.github$ +^codecov\.yml$ diff --git a/.Rhistory b/.Rhistory deleted file mode 100644 index 101db31..0000000 --- a/.Rhistory +++ /dev/null @@ -1,512 +0,0 @@ -# Parse orderBy -if (!is.null(orderBy)) { -orderBy <- parse_param(orderBy) -} -# Build URL -api <- "structural-resources" -path <- "variablefamilies" -params <- paste0("?limit=", limit, "&offset=", offset, "&query=", query, "&orderBy=", orderBy) -path <- paste0(path, params) -url <- get_url(api, path) -# Get content -content <- fromJSON(url) -return(content) -} -#' @title Get variable families (id) -#' @description This function returns data from /v1.0/variablefamilies/{id} -#' @param id (string) Variable family identificator. -#' @examples -#' get_variable_families_id("VRF_DEMOGRAFICAS") -#' @export -get_variable_families_id <- function(id) { -# Build URL -api <- "structural-resources" -path <- "variablefamilies" -resource <- id -url <- get_url(api, path, resource) -# Get content -content <- fromJSON(url) -return(content) -} -#' @title Get variable families (id) variables -#' @description This function returns data from /v1.0/variablefamilies/{id}/variables -#' @param id (string) Variable family identificator. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_variable_families_id_variables("VRF_DEMOGRAFICAS") -#' @export -get_variable_families_id_variables <- function(id, limit = 25, offset = 0, query = NULL, orderBy = NULL) { -# Parse query -if (!is.null(query)) { -query <- parse_param(query) -} -# Parse orderBy -if (!is.null(orderBy)) { -orderBy <- parse_param(orderBy) -} -# Build URL -api <- "structural-resources" -path <- "variablefamilies" -resource <- paste0(id, "/variables") -params <- paste0("?limit=", limit, "&offset=", offset, "&query=", query, "&orderBy=", orderBy) -resource <- paste0(resource, params) -url <- get_url(api, path, resource) -# Get content -content <- fromJSON(url) -return(content) -} -#' @title Get variables -#' @description This function returns data from /v1.0/variables -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_variables() -#' @export -get_variables <- function(limit = 25, offset = 0, query = NULL, orderBy = NULL) { -# Parse query -if (!is.null(query)) { -query <- parse_param(query) -} -# Parse orderBy -if (!is.null(orderBy)) { -orderBy <- parse_param(orderBy) -} -# Build URL -api <- "structural-resources" -path <- "variables" -url <- get_url(api, path) -# Get content -content <- fromJSON(url) -return(content) -} -#' @title Get variables (id) -#' @description This function returns data from /v1.0/variables/{id} -#' @param id (string) Variable identificator. -#' @examples -#' get_variables_id("VR_SEXO") -#' @export -get_variables_id <- function(id) { -# Build URL -api <- "structural-resources" -path <- "variables" -resource <- id -url <- get_url(api, path, resource) -# Get content -content <- fromJSON(url) -return(content) -} -#' @title Get variableelements -#' @description This function returns data from /v1.0/variables/{variableID}/variableelements -#' @param variableID (string) Variable identificator. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_variableelements("VR_SEXO") -#' @export -get_variableelements <- function(variableID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { -# Parse query -if (!is.null(query)) { -query <- parse_param(query) -} -# Parse orderBy -if (!is.null(orderBy)) { -orderBy <- parse_param(orderBy) -} -# Build URL -api <- "structural-resources" -path <- "variables" -resource <- paste0(variableID, "/variableelements") -params <- paste0("?limit=", limit, "&offset=", offset, "&query=", query, "&orderBy=", orderBy) -resource <- paste0(resource, params) -url <- get_url(api, path, resource) -# Get content -content <- fromJSON(url) -return(content) -} -#' @title Get variableelements resource -#' @description This function returns data from /v1.0/variables/{variableID}/variableelements/{resourceID} -#' @param resourceID (string) Resource identificator. -#' @param variableID (string) Variable identificator. -#' @examples -#' get_variableelements_resource("VR_SEXO", "FEMALE") -#' get_variableelements_resource("VR_TERRITORIO", "CCAA_CANARIAS") -#' @export -get_variableelements_resource <- function(variableID, resourceID) { -# Build URL -api <- "structural-resources" -path <- "variables" -resource <- paste0(variableID, "/variableelements/", resourceID) -url <- get_url(api, path, resource) -# Get content -content <- fromJSON(url) -return(content) -} -#' @title Get geoinfo -#' @description This function returns data from /v1.0/variables/{variableID}/variableelements/{resourceID}/geoinfo -#' @param variableID (string) Variable identificator. -#' @param resourceID (string) Resource identificator. -#' @param fields (string) Additional fields that you want to show in the answer. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_geoinfo("VR_TERRITORIO", "CCAA_CANARIAS") -#' @export -get_geoinfo <- function(variableID, resourceID, fields = NULL, limit = 25, offset = 0, query = NULL, orderBy = NULL) { -# Parse fields -if (!is.null(fields)) { -fields <- parse_param(fields) -} -# Parse query -if (!is.null(query)) { -query <- parse_param(query) -} -# Parse orderBy -if (!is.null(orderBy)) { -orderBy <- parse_param(orderBy) -} -# Build URL -api <- "structural-resources" -path <- "variables" -resource <- paste0(variableID, "/variableelements/", resourceID, "/geoinfo") -params <- paste0("?fields=", fields, "&limit=", limit, "&offset=", offset, "&query=", query, "&orderBy=", orderBy) -resource <- paste0(resource, params) -url <- get_url(api, path, resource) -# Get content -content <- fromJSON(url) -return(content) -} -library(istacr) -library(istacr) -library(istacr) -geoinfo <- istacr::get_geoinfo("VR_TERRITORIO", "CCAA_CANARIAS") -library(istacr) -geoinfo <- get_geoinfo("VR_TERRITORIO", "CCAA_CANARIAS") -View(geoinfo) -print(geoinfo) -library(istacr) -library(istacr) -geoinfo <- get_geoinfo("VR_TERRITORIO", "CCAA_CANARIAS") -print(geoinfo) -help(istacR) -?istacr -remove.packages("istacr", lib="~/R/R-3.5.1/library") -# Instituto Canario de Estadística (ISTAC) -#' @title Get indicators -#' @description This function returns a list of indicators published in the -#' ISTAC-indicators database. An indicator is a measure used to know the -#' intensity of a phenomenon in spacetime. This measure can refer to -#' different spatial or temporal granularities. -#' @param q (string) Metadata query on which the searches can be built using: -#' \code{id}, \code{subjectCode} or \code{geographicValue}. -#' @param order (string) Order. Possible values are: \code{update} and -#' \code{id} and order criteria are \code{ASC} and \code{DESC}. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param fields (string) Use of the answer by adding new fields. -#' Possible values are: \code{+metadata}, \code{+data} and \code{+observationsMetadata}. -#' @param representation (string) Allows filtering the observations by their value. -#' Its use only makes sense when \code{+data} and/or \code{+observationsMetadata} has been included. -#' @examples -#' get_indicators() -#' get_indicators(q = 'subjectCode EQ 051') -#' get_indicators(q = 'id EQ "PARO_REGISTRADO"') -#' get_indicators(q = 'id IN ("AFILIACIONES", "EMPLEO_REGISTRADO_AGRICULTURA")') -#' get_indicators(q = 'id IN ("AFILIACIONES", "EMPLEO_REGISTRADO_AGRICULTURA")', -#' order = "id ASC") -#' get_indicators(q = 'id IN ("AFILIACIONES", "EMPLEO_REGISTRADO_AGRICULTURA")', -#' order = "id ASC", fields = "+metadata") -#' get_indicators(q = 'id IN ("AFILIACIONES", "EMPLEO_REGISTRADO_AGRICULTURA")', -#' order = "id ASC", fields = "+data", representation = -#' "GEOGRAPHICAL[35003|35005],MEASURE[ABSOLUTE]") -#' @export -get_indicators <- function(q = NULL, order = NULL, limit = 25, offset = 0, fields = NULL, representation = NULL) { -# URL params -api <- "indicators" -path <- "indicators" -# Parse order -if (!is.null(order)) { -order <- parse_param(order) -} -# Parse fields -if (!is.null(fields)) { -fields <- parse_param(fields) -} -# Parse representation -if (!is.null(representation)) { -representation <- parse_param(representation) -} -# Get indicators using query (q) parameter -if (!is.null(q)) { -q <- parse_param(q) -params <- paste0("&order=", order, "&limit=", limit, "&offset=", offset, "&fields=", fields, "&representation=", representation) -path <- paste0(path, "?q=", q, params) -} else { -params <- paste0("?order=", order, "&limit=", limit, "&offset=", offset, "&fields=", fields, "&representation=", representation) -path <- paste0(path, params) -} -url <- get_url(api, path) -content <- fromJSON(url) -return(content) -} -#' @title Get indicators code -#' @description This function returns the metadata that describe the characteristics -#' of a specific indicator, allowing the compression of the measured fact; -#' also through the data request the complete data (for all spacetime) of the -#' indicator is provided. -#' @param indicatorCode (string) an indicator code -#' @examples -#' get_indicators_code("AFILIACIONES") -#' get_indicators_code("PARO_REGISTRADO") -#' @export -get_indicators_code <- function(indicatorCode) { -# URL params -api <- "indicators" -path <- "indicators" -url <- get_url(api, path, resource = indicatorCode) -content <- fromJSON(url) -return(content) -} -#' @title Get indicators code data -#' @description This function returns complete data (for all spacetime) of the indicator. -#' On the other hand, metadata describing the characteristics of a specific -#' indicator are offered through the metadata request, allowing the compression -#' of the measured fact. -#' @param indicatorCode (string) an indicator code -#' @param representation (string) Allows filtering the observations by their value. -#' @param granularity (string) Allows to filter the observations through the granularities of the same. -#' @param fields (string) Allows you to customize the response by excluding fields. -#' The possible values are: \code{-observationsMetadata}. -#' @examples -#' get_indicators_code_data("AFILIACIONES") -#' get_indicators_code_data("AFILIACIONES", representation = -#' "GEOGRAPHICAL[35003|35005],MEASURE[ABSOLUTE]") -#' get_indicators_code_data("AFILIACIONES", granularity = -#' "GEOGRAPHICAL[MUNICIPALITIES]") -#' get_indicators_code_data("AFILIACIONES", granularity = -#' "GEOGRAPHICAL[MUNICIPALITIES]", fields = "-observationsMetadata") -#' @export -get_indicators_code_data <- function(indicatorCode, representation = NULL, granularity = NULL, fields = NULL) { -# Parse representation -if (!is.null(representation)) { -representation <- parse_param(representation) -} -# Parse granularity -if (!is.null(granularity)) { -granularity <- parse_param(granularity) -} -# Parse fields -if (!is.null(fields)) { -fields <- parse_param(fields) -} -# Build URL -api <- "indicators" -path <- "indicators" -resource <- paste0(indicatorCode, "/data", "?representation=", representation, "&granularity=", granularity, "&fields=", fields) -url <- get_url(api, path, resource = resource) -# Get content -content <- fromJSON(url) -return(content) -} -install.packages("ps") -R.Version() -library(istacr) -?istacr::get_indicators -install.packages("styler") -install.packages("lintr") -library(istacr) -library(istacr) -?Sys.sleep -geoinfo <- get_structuralresources_geoinfo("VR_TERRITORIO", "MUN_ICOD_VINOS") -library(istacr) -geoinfo <- get_structuralresources_geoinfo("VR_TERRITORIO", "MUN_ICOD_VINOS") -get_indicators(q = 'id IN ("AFILIACIONES", "EMPLEO_REGISTRADO_AGRICULTURA")', order = "id ASC", fields = "+data", representation ="GEOGRAPHICAL[35003|35005],MEASURE[ABSOLUTE]") -get_indicators() -get_indicators(q = 'id IN ("AFILIACIONES", "EMPLEO_REGISTRADO_AGRICULTURA")', order = "id ASC", fields = "+data", representation ="GEOGRAPHICAL[35003|35005],MEASURE[ABSOLUTE]") -library(istacr) -library(INEbaseR) -library(istacr) -library(istacr) -View(get_datasets()) -View(get_datasets()$dataset) -View((get_datasets()$dataset)[[5]][[1]]) -View((get_datasets()$dataset)[[5]][[2]]) -ds <- get_datasets()$dataset -ds[[1]]$name -View(ds$name) -View(ds$name[[1]]) -View(ds$name$text[[1]]) -library(istacr) -get_datasets() -get_datasets() -library(istacr) -get_datasets() -View(get_datasets()) -View(get_datasets()$dataset) -View(get_datasets_agency(agencyID = "ISTAC")) -View(get_datasets_agency(agencyID = "ISTAC")$dataset) -library(istacr) -tmp <- get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000") -tmp2 <- get_datasets() -library(istacr) -tmp <- get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000") -tmp <- get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000") -library(istacr) -library(istacr) -tmp <- get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000") -tmp <- get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000") -library(istacr) -tmp <- get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000") -tmp2 <- get_datasets() -View(tmp) -get_datasets() -library(istacr) -get_datasets() -library(istacr) -get_datasets() -get_datasets_agency(agencyID = "ISTAC") -library(istacr) -get_datasets_agency(agencyID = "ISTAC") -library(istacr) -get_datasets_agency(agencyID = "ISTAC") -library(istacr) -get_datasets_agency(agencyID = "ISTAC") -library(istacr) -get_datasets_agency(agencyID = "ISTAC") -library(istacr) -Sphinx -??Sphinx -?Sphinx -??sphinx -install.packages("usethis") -install.packages("knitr") -install.packages("pkgdown") -devtools::install_github("r-lib/pkgdown") -pkgdown::build_site() -install.packages("crayon") -library(crayon) -cat(blue("Hello", "world!\n")) -print(yellow("Hey")) -cat(yellow("Hey")) -cat(green("Hey")) -cat(red("Hey")) -datasets <- get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000") -library(istacr) -datasets <- get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000") -benchmark <- TRUE -# Start the clock (data) -if (benchmark) { -rnorm(100000) -rep(NA, 100000) -ptm <- proc.time() -} -datasets <- get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000") -# Start the clock (polygons) -if (benchmark) { -rnorm(100000) -rep(NA, 100000) -ptm <- proc.time() -} -benchmark <- TRUE -# Start the clock (data) -rnorm(100000) -rep(NA, 100000) -ptm <- proc.time() -datasets <- get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000") -# Start the clock (polygons) -rnorm(100000) -rep(NA, 100000) -ptm <- proc.time() -print(ptm) -benchmark <- TRUE -# Start the clock (data) -if (benchmark) { -rnorm(100000) -rep(NA, 100000) -ptm <- proc.time() -} -datasets <- get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000") -# Start the clock (polygons) -if (benchmark) { -rnorm(100000) -rep(NA, 100000) -ptm <- proc.time() -} -print(ptm) -benchmark <- TRUE -# Start the clock (data) -if (benchmark) { -rnorm(100000) -rep(NA, 100000) -ptm <- proc.time() -} -datasets <- get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000") -# Start the clock (polygons) -if (benchmark) { -time <- (proc.time() - ptm)[[3]] -message(paste0("Time elapsed (polygons): ", time, " (s)")) -} -library(istacr) -tmp <- get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000", fields = "-data, -metadata") -library(istacr) -get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000", fields = "-data, -metadata") -tmp <- get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000", fields = "-data, -metadata") -tmp <- get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000", fields = "-data,-metadata") -get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000", fields = "-data,-metadata") -library(istacr) -library(istacr) -get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00016A_000001", version = "~latest") -tmp <- get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00016A_000001", version = "~latest") -View(tmp) -tmp$name -get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00016A_000001", version = "~latest") -View(tmp[["data"]][["observations"]]) -istacr::get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00016A_000001", version = "~latest") -library(istacr) -remove.packages("istacr", lib="~/R/win-library/3.6") -install.packages("istacr") -library(istacr) -tmp <- istacr::get_datasets_agency_resource_version(agencyID = "ISTAC", resourceID = "C00016A_000001", version = "~latest") -View(tmp) -library(askpass) -detach("package:askpass", unload = TRUE) -install.packages("roxygen2") -install.packages("jsonlite") -install.packages("curl") -library(knitr) -library(istacr) -library("istacr") -remove.packages("istacr", lib) -install.packages("C:/Proyectos/istacr_0.1.2.tar.gz", repos = NULL, type = "source", lib="C:/Program Files/R/R-3.6.3/library") -library(istacr) -get_datasets() -message('Caught an error!') -install.packages("C:/Proyectos/istacr_0.1.2.tar.gz", repos = NULL, type = "source", lib="C:/Program Files/R/R-3.6.3/library") -library(istacr) -get_indicators_geographic_granularities() -install.packages("C:/Proyectos/istacr_0.1.2.tar.gz", repos = NULL, type = "source", lib="C:/Program Files/R/R-3.6.3/library") -library(istacr) -get_datasets() -library(istacr) -?istacr::get_indicators -indicators <- get_indicators( -q = 'id IN ("AFILIACIONES", "EMPLEO_REGISTRADO_AGRICULTURA")', -order = "id ASC", fields = "+data", representation = -"GEOGRAPHICAL[35003|35005],MEASURE[ABSOLUTE]" -) -library(istacr) -indicators <- get_indicators( -q = 'id IN ("AFILIACIONES", "EMPLEO_REGISTRADO_AGRICULTURA")', -order = "id ASC", fields = "+data", representation = -"GEOGRAPHICAL[35003|35005],MEASURE[ABSOLUTE]" -) -indicators -library(istacr) diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 0000000..e7bad16 --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,84 @@ +# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag. +# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions +on: + push: + branches: + - main + - master + pull_request: + branches: + - main + - master + +name: R-CMD-check + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: windows-latest, r: 'release'} + - {os: macOS-latest, r: 'release'} + - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + - {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + + env: + R_REMOTES_NO_ERRORS_FROM_WARNINGS: true + RSPM: ${{ matrix.config.rspm }} + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + + steps: + - uses: actions/checkout@v2 + + - uses: r-lib/actions/setup-r@v1 + with: + r-version: ${{ matrix.config.r }} + + - uses: r-lib/actions/setup-pandoc@v1 + + - name: Query dependencies + run: | + install.packages('remotes') + saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) + writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") + shell: Rscript {0} + + - name: Cache R packages + if: runner.os != 'Windows' + uses: actions/cache@v2 + with: + path: ${{ env.R_LIBS_USER }} + key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} + restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- + + - name: Install system dependencies + if: runner.os == 'Linux' + run: | + while read -r cmd + do + eval sudo $cmd + done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') + + - name: Install dependencies + run: | + remotes::install_deps(dependencies = TRUE) + remotes::install_cran("rcmdcheck") + shell: Rscript {0} + + - name: Check + env: + _R_CHECK_CRAN_INCOMING_REMOTE_: false + run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") + shell: Rscript {0} + + - name: Upload check results + if: failure() + uses: actions/upload-artifact@main + with: + name: ${{ runner.os }}-r${{ matrix.config.r }}-results + path: check diff --git a/.gitignore b/.gitignore index ffa6d7a..f4f606b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -.Rproj.user -.Rhistory -.RData -.Ruserdata -.Rproj \ No newline at end of file +.Rproj.user +.Rhistory +.RData +.Ruserdata +*.Rproj diff --git a/DESCRIPTION b/DESCRIPTION index d2174c7..96b01b9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,17 +1,21 @@ -Package: istacr -Type: Package -Title: Obtaining Open Data from Instituto Canario De Estadistica (ISTAC) API -Version: 0.1.3 -Date: 2020-12-04 -Authors@R: c( - person("Alberto", "Gonzalez", email = "jgonyanp@gobiernodecanarias.org", role = c("aut", "cre")) - ) -Maintainer: Alberto Gonzalez -Description: You can access to open data published in Instituto Canario De Estadistica (ISTAC) APIs at . -License: GPL (>= 3) -Encoding: UTF-8 -LazyData: true -Imports: - jsonlite, - curl -RoxygenNote: 7.1.1 +Package: istacr +Type: Package +Title: Obtaining Open Data from Instituto Canario De Estadistica (ISTAC) API +Version: 0.1.3 +Date: 2020-12-04 +Authors@R: c( + person("Alberto", "Gonzalez", , "jgonyanp@gobiernodecanarias.org", c("aut", "cre")), + person("Andres", "Nacimiento", , "andresnacimiento@gmail.com", c("aut")), + person("Jorge", "Lopez Perez", , "jorge@loperez.com", c("ctb")) + ) +Description: You can access to open data published in Instituto Canario De Estadistica (ISTAC) APIs at . +License: GPL (>= 3) +Encoding: UTF-8 +LazyData: true +Imports: + jsonlite, + curl +RoxygenNote: 7.1.1 +Suggests: + testthat, + covr diff --git a/NAMESPACE b/NAMESPACE index df0e578..7139cc6 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,4 +1,4 @@ -# Generated by roxygen2: do not edit by hand +# Generated by roxygen2: do not edit by hand export(get_datasets) export(get_datasets_agency) diff --git a/R/resources.R b/R/resources.R index 4a44f80..d0dbcd9 100644 --- a/R/resources.R +++ b/R/resources.R @@ -1,59 +1,55 @@ -# Instituto Canario de Estadística (ISTAC) - -# Build API URL -get_url <- function(api, path, resource = NULL) { - - url_root <- paste0("https://datos.canarias.es/api/estadisticas/", api, "/v1.0/") - - if (is.null(resource)) { - url <- paste0(url_root, path) - } else { - url <- paste0(url_root, path, "/", resource) - } - - return(url) -} - -# Get content from URL -get_content <- function(url) { - - content <- NULL - - tryCatch( - # Try to get content JSON from ISTAC api - expr = { - content <- fromJSON(url) - }, - # Catch errors - error = function(e){ - message('Oops! An error occurred while accessing the ISTAC api') - content <- NULL - print(e) - }, - # Catch warnings - warning = function(w){ - message('Oops! Some warnings ocurred') - content <- NULL - print(w) - } - - ) - - return(content) - -} - -# Example: parse_param("GEOGRAPHICAL[MUNICIPALITIES]") -parse_param <- function(param) { - param <- trimws(param) # Remove white spaces - param <- gsub("[[]", "%5B", param) # Replace [ for %5B - param <- gsub("[]]", "%5D", param) # Replace ] for %5D - param <- gsub("[,]", "%2C", param) # Replace , for %2C - param <- gsub("[|]", "%7C", param) # Replace | for %7C - param <- gsub("[+]", "%2B", param) # Replace + for %2B - param <- gsub("\"", "%22", param) # Replace \" for %22 - param <- gsub(" ", "%20", param) # Replace space for %20 - param <- gsub("[:]", "%3A", param) # Replace : for %3A - - return(param) -} +# Instituto Canario de Estadística (ISTAC) + +# Build API URL +get_url <- function(api, path, resource = NULL) { + url_root <- paste0("https://datos.canarias.es/api/estadisticas/", api, "/v1.0/") + + if (is.null(resource)) { + url <- paste0(url_root, path) + } else { + url <- paste0(url_root, path, "/", resource) + } + + return(url) +} + +# Get content from URL +get_content <- function(url) { + content <- NULL + + tryCatch( + # Try to get content JSON from ISTAC api + expr = { + content <- fromJSON(url) + }, + # Catch errors + error = function(e) { + message("Oops! An error occurred while accessing the ISTAC api") + content <- NULL + print(e) + }, + # Catch warnings + warning = function(w) { + message("Oops! Some warnings ocurred") + content <- NULL + print(w) + } + ) + + return(content) +} + +# Example: parse_param("GEOGRAPHICAL[MUNICIPALITIES]") +parse_param <- function(param) { + param <- trimws(param) # Remove white spaces + param <- gsub("[[]", "%5B", param) # Replace [ for %5B + param <- gsub("[]]", "%5D", param) # Replace ] for %5D + param <- gsub("[,]", "%2C", param) # Replace , for %2C + param <- gsub("[|]", "%7C", param) # Replace | for %7C + param <- gsub("[+]", "%2B", param) # Replace + for %2B + param <- gsub("\"", "%22", param) # Replace \" for %22 + param <- gsub(" ", "%20", param) # Replace space for %20 + param <- gsub("[:]", "%3A", param) # Replace : for %3A + + return(param) +} diff --git a/R/statistical_resources_cubes.R b/R/statistical_resources_cubes.R index e52f510..7838084 100644 --- a/R/statistical_resources_cubes.R +++ b/R/statistical_resources_cubes.R @@ -1,160 +1,156 @@ -# Instituto Canario de Estadística (ISTAC) - -#' @title Get datasets -#' @description This function allows consulting all existing statistical data cubes. -#' @param lang (string) Language in which you want to get the answer. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param orderBy (string) Order. Possible values are \code{ID ASC} or \code{ID DESC}, -#' @param query (string) Metadata query on which the searches can be built. -#' @examples -#' get_datasets() -#' @export -get_datasets <- function(lang = "es", limit = 25, offset = 0, orderBy = NULL, query = NULL) { - - # URL params - api <- "statistical-resources" - path <- "datasets" - - # Parse order - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Build URL - params <- paste0("?lang=", lang, "&limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) - path <- paste0(path, params) - url <- get_url(api, path) - - # Get content - content <- get_content(url) - - return(content) - -} - -#' @title Get datasets (agencyID) -#' @description This function allows to consult all the data sets maintained by a certain organization. -#' @param agencyID (string) Identifier of the maintainer organization of the resource. A possible value is \code{ISTAC}. -#' @param lang (string) Language in which you want to get the answer. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param orderBy (string) Order. Possible values are \code{ID ASC} or \code{ID DESC}, -#' @param query (string) Metadata query on which the searches can be built. -#' @examples -#' get_datasets_agency(agencyID = "ISTAC") -#' @export -get_datasets_agency <- function(agencyID, lang = "es", limit = 25, offset = 0, orderBy = NULL, query = NULL) { - - # URL params - api <- "statistical-resources" - path <- "datasets" - - # Parse order - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Build URL - params <- paste0("?lang=", lang, "&limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) - resource <- paste0(agencyID, params) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) - -} - -#' @title Get datasets (agencyID / resourceID) -#' @description This function allows to obtain all the versions of a statistical cube with a certain identifier and that also maintains a certain organization. -#' @param agencyID (string) Identifier of the maintainer organization of the resource. A possible value is \code{ISTAC}. -#' @param resourceID (string) Resource identifier. A possible value is \code{C00010A_000002}. -#' @param lang (string) Language in which you want to get the answer. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param orderBy (string) Order. Possible values are \code{ID ASC} or \code{ID DESC}, -#' @param query (string) Metadata query on which the searches can be built. -#' @examples -#' get_datasets_agency_resource(agencyID = "ISTAC", resourceID = "C00010A_000002") -#' @export -get_datasets_agency_resource <- function(agencyID, resourceID, lang = "es", limit = 25, offset = 0, orderBy = NULL, query = NULL) { - - # URL params - api <- "statistical-resources" - path <- "datasets" - - # Parse order - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Build URL - params <- paste0("?lang=", lang, "&limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) - resource <- paste0(agencyID, "/", resourceID, params) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) - -} - -#' @title Get datasets (agencyID / resourceID / version) -#' @description This function allows to obtain all the versions of a statistical cube with a certain identifier and that also maintains a certain organization. -#' @param agencyID (string) Identifier of the maintainer organization of the resource. A possible value is \code{ISTAC}. -#' @param resourceID (string) Resource identifier. A possible value is \code{C00010A_000002}. -#' @param version (string) Resource version. A possible value is \code{001.000}. -#' @param dim (string) Allows filtering the data obtained in the response. A example is \code{TIME_PERIOD:2009|2010}. -#' @param fields (string) Allows you to customize the response by excluding fields from it. The possible values are \code{-metadata} and \code{-data}. -#' @param lang (string) Language in which you want to get the answer. -#' @examples -#' get_datasets_agency_resource_version( -#' agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000", -#' fields = "-data,-metadata" -#' ) -#' @export -get_datasets_agency_resource_version <- function(agencyID, resourceID, version, dim = NULL, fields = NULL, lang = "es") { - - # URL params - api <- "statistical-resources" - path <- "datasets" - - # Parse dim - if (!is.null(dim)) { - dim <- parse_param(dim) - } - - # Parse fields - if (!is.null(fields)) { - fields <- parse_param(fields) - } - - # Build URL - params <- paste0("?dim=", dim, "&fields=", fields, "&lang=", lang) - resource <- paste0(agencyID, "/", resourceID, "/", version, params) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) - -} +# Instituto Canario de Estadística (ISTAC) + +#' @title Get datasets +#' @description This function allows consulting all existing statistical data cubes. +#' @param lang (string) Language in which you want to get the answer. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param orderBy (string) Order. Possible values are \code{ID ASC} or \code{ID DESC}, +#' @param query (string) Metadata query on which the searches can be built. +#' @examples +#' get_datasets() +#' @export +get_datasets <- function(lang = "es", limit = 25, offset = 0, orderBy = NULL, query = NULL) { + + # URL params + api <- "statistical-resources" + path <- "datasets" + + # Parse order + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Build URL + params <- paste0("?lang=", lang, "&limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) + path <- paste0(path, params) + url <- get_url(api, path) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get datasets (agencyID) +#' @description This function allows to consult all the data sets maintained by a certain organization. +#' @param agencyID (string) Identifier of the maintainer organization of the resource. A possible value is \code{ISTAC}. +#' @param lang (string) Language in which you want to get the answer. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param orderBy (string) Order. Possible values are \code{ID ASC} or \code{ID DESC}, +#' @param query (string) Metadata query on which the searches can be built. +#' @examples +#' get_datasets_agency(agencyID = "ISTAC") +#' @export +get_datasets_agency <- function(agencyID, lang = "es", limit = 25, offset = 0, orderBy = NULL, query = NULL) { + + # URL params + api <- "statistical-resources" + path <- "datasets" + + # Parse order + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Build URL + params <- paste0("?lang=", lang, "&limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) + resource <- paste0(agencyID, params) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get datasets (agencyID / resourceID) +#' @description This function allows to obtain all the versions of a statistical cube with a certain identifier and that also maintains a certain organization. +#' @param agencyID (string) Identifier of the maintainer organization of the resource. A possible value is \code{ISTAC}. +#' @param resourceID (string) Resource identifier. A possible value is \code{C00010A_000002}. +#' @param lang (string) Language in which you want to get the answer. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param orderBy (string) Order. Possible values are \code{ID ASC} or \code{ID DESC}, +#' @param query (string) Metadata query on which the searches can be built. +#' @examples +#' get_datasets_agency_resource(agencyID = "ISTAC", resourceID = "C00010A_000002") +#' @export +get_datasets_agency_resource <- function(agencyID, resourceID, lang = "es", limit = 25, offset = 0, orderBy = NULL, query = NULL) { + + # URL params + api <- "statistical-resources" + path <- "datasets" + + # Parse order + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Build URL + params <- paste0("?lang=", lang, "&limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) + resource <- paste0(agencyID, "/", resourceID, params) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get datasets (agencyID / resourceID / version) +#' @description This function allows to obtain all the versions of a statistical cube with a certain identifier and that also maintains a certain organization. +#' @param agencyID (string) Identifier of the maintainer organization of the resource. A possible value is \code{ISTAC}. +#' @param resourceID (string) Resource identifier. A possible value is \code{C00010A_000002}. +#' @param version (string) Resource version. A possible value is \code{001.000}. +#' @param dim (string) Allows filtering the data obtained in the response. A example is \code{TIME_PERIOD:2009|2010}. +#' @param fields (string) Allows you to customize the response by excluding fields from it. The possible values are \code{-metadata} and \code{-data}. +#' @param lang (string) Language in which you want to get the answer. +#' @examples +#' get_datasets_agency_resource_version( +#' agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000", +#' fields = "-data,-metadata" +#' ) +#' @export +get_datasets_agency_resource_version <- function(agencyID, resourceID, version, dim = NULL, fields = NULL, lang = "es") { + + # URL params + api <- "statistical-resources" + path <- "datasets" + + # Parse dim + if (!is.null(dim)) { + dim <- parse_param(dim) + } + + # Parse fields + if (!is.null(fields)) { + fields <- parse_param(fields) + } + + # Build URL + params <- paste0("?dim=", dim, "&fields=", fields, "&lang=", lang) + resource <- paste0(agencyID, "/", resourceID, "/", version, params) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} diff --git a/R/structural_resources_category.R b/R/structural_resources_category.R index e9c8e17..d6b2431 100644 --- a/R/structural_resources_category.R +++ b/R/structural_resources_category.R @@ -1,329 +1,330 @@ -# Instituto Canario de Estadística (ISTAC) - -#' @title Get categorisations -#' @description This function returns the content from /v1.0/categorisations -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_categorisations() -#' get_structuralresources_categorisations(query = "ID EQ 2090", orderBy = "ID ASC") -#' @export -get_structuralresources_categorisations <- function(limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "categorisations" - params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) - path <- paste0(path, params) - url <- get_url(api, path) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get categorisations agency -#' @description This function returns the content from /v1.0/categorisations/{agencyID} -#' @param agencyID (string) Identifier of the agency that publishes. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_categorisations_agency("ISTAC") -#' @export -get_structuralresources_categorisations_agency <- function(agencyID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "categorisations" - resource <- agencyID - params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) - resource <- paste0(resource, params) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get categorisations agency resource -#' @description This function returns the content from /v1.0/categorisations/{agencyID}/{resourceID} -#' @param agencyID (string) Identifier of the agency that publishes. -#' @param resourceID (string) Resource identifier. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_categorisations_agency_resource("ISTAC", "cat2") -#' @export -get_structuralresources_categorisations_agency_resource <- function(agencyID, resourceID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "categorisations" - resource <- paste0(agencyID, "/", resourceID) - params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) - resource <- paste0(resource, params) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get categorisations agency resource version -#' @description This function returns the content from /v1.0/categorisations/{agencyID}/{resourceID}/{version} -#' @param agencyID (string) Identifier of the agency that publishes. -#' @param resourceID (string) Resource identifier. -#' @param version (string) Specific version of the resource. -#' @examples -#' get_structuralresources_categorisations_agency_resource_version("ISTAC", "cat2", "01.000") -#' @export -get_structuralresources_categorisations_agency_resource_version <- function(agencyID, resourceID, version) { - - # Build URL - api <- "structural-resources" - path <- "categorisations" - resource <- paste0(agencyID, "/", resourceID, "/", version) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get category schemes -#' @description This function returns the content from /v1.0/categoryschemes -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_category_schemes() -#' get_structuralresources_category_schemes(query = "ID EQ 2090", orderBy = "ID ASC") -#' @export -get_structuralresources_category_schemes <- function(limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "categoryschemes" - params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) - path <- paste0(path, params) - url <- get_url(api, path) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get category schemes agency -#' @description This function returns the content from /v1.0/categoryschemes/{agencyID} -#' @param agencyID (string) Identifier of the agency that publishes. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_category_schemes_agency("ISTAC", query = "ID EQ 2090", orderBy = "ID ASC") -#' @export -get_structuralresources_category_schemes_agency <- function(agencyID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "categoryschemes" - resource <- agencyID - params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) - resource <- paste0(resource, params) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get category schemes agency resource -#' @description This function returns the content from /v1.0/categoryschemes/{agencyID}/{resourceID} -#' @param agencyID (string) Identifier of the agency that publishes. -#' @param resourceID (string) Resource identifier. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_category_schemes_agency_resource("ISTAC", "TEMAS_CANARIAS") -#' @export -get_structuralresources_category_schemes_agency_resource <- function(agencyID, resourceID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "categoryschemes" - resource <- paste0(agencyID, "/", resourceID) - params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) - resource <- paste0(resource, params) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get category schemes agency resource version -#' @description This function returns the content from /v1.0/categoryschemes/{agencyID}/{resourceID}/{version} -#' @param agencyID (string) Identifier of the agency that publishes. -#' @param resourceID (string) Resource identifier. -#' @param version (string) Specific version of the resource. -#' @examples -#' get_structuralresources_category_schemes_agency_resource_version( -#' "ISTAC", "TEMAS_CANARIAS", "01.000" -#' ) -#' @export -get_structuralresources_category_schemes_agency_resource_version <- function(agencyID, resourceID, version) { - - # Build URL - api <- "structural-resources" - path <- "categoryschemes" - resource <- paste0(agencyID, "/", resourceID, "/", version) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get category schemes agency resource version categories -#' @description This function returns the content from /v1.0/categoryschemes/{agencyID}/{resourceID}/{version}/categories -#' @param agencyID (string) Identifier of the agency that publishes. -#' @param resourceID (string) Resource identifier. -#' @param version (string) Specific version of the resource. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_category_schemes_agency_resource_version_categories( -#' "ISTAC", "TEMAS_CANARIAS", "01.000", limit = 10 -#' ) -#' @export -get_structuralresources_category_schemes_agency_resource_version_categories <- function(agencyID, resourceID, version, limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "categoryschemes" - resource <- paste0(agencyID, "/", resourceID, "/", version, "/categories") - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get category schemes agency resource version categories (id) -#' @description This function returns the content from /v1.0/categoryschemes/{agencyID}/{resourceID}/{version}/categories/{categoryID} -#' @param agencyID (string) Identifier of the agency that publishes. -#' @param resourceID (string) Resource identifier. -#' @param version (string) Specific version of the resource. -#' @param categoryID (string) -#' @examples -#' get_structuralresources_category_schemes_agency_resource_version_categories_id( -#' "ISTAC", "TEMAS_CANARIAS", "01.000", "060" -#' ) -#' get_structuralresources_category_schemes_agency_resource_version_categories_id( -#' "ISTAC", "TEMAS_CANARIAS", "01.000", "060.060_010.060_010_010" -#' ) -#' @export -get_structuralresources_category_schemes_agency_resource_version_categories_id <- function(agencyID, resourceID, version, categoryID) { - - # Build URL - api <- "structural-resources" - path <- "categoryschemes" - resource <- paste0(agencyID, "/", resourceID, "/", version, "/categories/", categoryID) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) -} +# Instituto Canario de Estadística (ISTAC) + +#' @title Get categorisations +#' @description This function returns the content from /v1.0/categorisations +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_categorisations() +#' get_structuralresources_categorisations(query = "ID EQ 2090", orderBy = "ID ASC") +#' @export +get_structuralresources_categorisations <- function(limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "categorisations" + params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) + path <- paste0(path, params) + url <- get_url(api, path) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get categorisations agency +#' @description This function returns the content from /v1.0/categorisations/{agencyID} +#' @param agencyID (string) Identifier of the agency that publishes. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_categorisations_agency("ISTAC") +#' @export +get_structuralresources_categorisations_agency <- function(agencyID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "categorisations" + resource <- agencyID + params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) + resource <- paste0(resource, params) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get categorisations agency resource +#' @description This function returns the content from /v1.0/categorisations/{agencyID}/{resourceID} +#' @param agencyID (string) Identifier of the agency that publishes. +#' @param resourceID (string) Resource identifier. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_categorisations_agency_resource("ISTAC", "cat2") +#' @export +get_structuralresources_categorisations_agency_resource <- function(agencyID, resourceID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "categorisations" + resource <- paste0(agencyID, "/", resourceID) + params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) + resource <- paste0(resource, params) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get categorisations agency resource version +#' @description This function returns the content from /v1.0/categorisations/{agencyID}/{resourceID}/{version} +#' @param agencyID (string) Identifier of the agency that publishes. +#' @param resourceID (string) Resource identifier. +#' @param version (string) Specific version of the resource. +#' @examples +#' get_structuralresources_categorisations_agency_resource_version("ISTAC", "cat2", "01.000") +#' @export +get_structuralresources_categorisations_agency_resource_version <- function(agencyID, resourceID, version) { + + # Build URL + api <- "structural-resources" + path <- "categorisations" + resource <- paste0(agencyID, "/", resourceID, "/", version) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get category schemes +#' @description This function returns the content from /v1.0/categoryschemes +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_category_schemes() +#' get_structuralresources_category_schemes(query = "ID EQ 2090", orderBy = "ID ASC") +#' @export +get_structuralresources_category_schemes <- function(limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "categoryschemes" + params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) + path <- paste0(path, params) + url <- get_url(api, path) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get category schemes agency +#' @description This function returns the content from /v1.0/categoryschemes/{agencyID} +#' @param agencyID (string) Identifier of the agency that publishes. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_category_schemes_agency("ISTAC", query = "ID EQ 2090", orderBy = "ID ASC") +#' @export +get_structuralresources_category_schemes_agency <- function(agencyID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "categoryschemes" + resource <- agencyID + params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) + resource <- paste0(resource, params) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get category schemes agency resource +#' @description This function returns the content from /v1.0/categoryschemes/{agencyID}/{resourceID} +#' @param agencyID (string) Identifier of the agency that publishes. +#' @param resourceID (string) Resource identifier. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_category_schemes_agency_resource("ISTAC", "TEMAS_CANARIAS") +#' @export +get_structuralresources_category_schemes_agency_resource <- function(agencyID, resourceID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "categoryschemes" + resource <- paste0(agencyID, "/", resourceID) + params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) + resource <- paste0(resource, params) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get category schemes agency resource version +#' @description This function returns the content from /v1.0/categoryschemes/{agencyID}/{resourceID}/{version} +#' @param agencyID (string) Identifier of the agency that publishes. +#' @param resourceID (string) Resource identifier. +#' @param version (string) Specific version of the resource. +#' @examples +#' get_structuralresources_category_schemes_agency_resource_version( +#' "ISTAC", "TEMAS_CANARIAS", "01.000" +#' ) +#' @export +get_structuralresources_category_schemes_agency_resource_version <- function(agencyID, resourceID, version) { + + # Build URL + api <- "structural-resources" + path <- "categoryschemes" + resource <- paste0(agencyID, "/", resourceID, "/", version) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get category schemes agency resource version categories +#' @description This function returns the content from /v1.0/categoryschemes/{agencyID}/{resourceID}/{version}/categories +#' @param agencyID (string) Identifier of the agency that publishes. +#' @param resourceID (string) Resource identifier. +#' @param version (string) Specific version of the resource. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_category_schemes_agency_resource_version_categories( +#' "ISTAC", "TEMAS_CANARIAS", "01.000", +#' limit = 10 +#' ) +#' @export +get_structuralresources_category_schemes_agency_resource_version_categories <- function(agencyID, resourceID, version, limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "categoryschemes" + resource <- paste0(agencyID, "/", resourceID, "/", version, "/categories") + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get category schemes agency resource version categories (id) +#' @description This function returns the content from /v1.0/categoryschemes/{agencyID}/{resourceID}/{version}/categories/{categoryID} +#' @param agencyID (string) Identifier of the agency that publishes. +#' @param resourceID (string) Resource identifier. +#' @param version (string) Specific version of the resource. +#' @param categoryID (string) +#' @examples +#' get_structuralresources_category_schemes_agency_resource_version_categories_id( +#' "ISTAC", "TEMAS_CANARIAS", "01.000", "060" +#' ) +#' get_structuralresources_category_schemes_agency_resource_version_categories_id( +#' "ISTAC", "TEMAS_CANARIAS", "01.000", "060.060_010.060_010_010" +#' ) +#' @export +get_structuralresources_category_schemes_agency_resource_version_categories_id <- function(agencyID, resourceID, version, categoryID) { + + # Build URL + api <- "structural-resources" + path <- "categoryschemes" + resource <- paste0(agencyID, "/", resourceID, "/", version, "/categories/", categoryID) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} diff --git a/R/structural_resources_classifications.R b/R/structural_resources_classifications.R index 7c1f8ae..1b89704 100644 --- a/R/structural_resources_classifications.R +++ b/R/structural_resources_classifications.R @@ -1,262 +1,262 @@ -# Instituto Canario de Estadística (ISTAC) - -#' @title Get codelist families -#' @description This function returns the list of families of classifications -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param orderBy (string) Field by which to sort the results. -#' @param query (string) Query to filter the results. -#' @examples -#' get_structuralresources_codelist_families() -#' @export -get_structuralresources_codelist_families <- function(limit = 25, offset = 0, orderBy = NULL, query = NULL) { - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Build URL - api <- "structural-resources" - path <- "codelistfamilies" - params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) - path <- paste0(path, params) - url <- get_url(api, path) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get codelist families -#' @description This function allows to obtain a family of classifications in particular. -#' @param id (string) codelist family identificator -#' @examples -#' get_structuralresources_codelist_families_id() -#' @export -get_structuralresources_codelist_families_id <- function(id = NULL) { - - # Build URL - api <- "structural-resources" - path <- "codelistfamilies" - resource <- id - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get codelists -#' @description This function allows to obtain the list of classifications. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_codelists() -#' @export -get_structuralresources_codelists <- function(limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "codelists" - params <- paste0("?limit=", limit, "&offset=", offset, "&query=", query, "&orderBy=", orderBy) - path <- paste0(path, params) - url <- get_url(api, path) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get codelists agency -#' @description This function allows obtaining the list of all the classifications -#' maintained by a certain organization. -#' @param agencyID (string) Agency identificator. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_codelists_agency("ISTAC") -#' get_structuralresources_codelists_agency("ESTAT") -#' @export -get_structuralresources_codelists_agency <- function(agencyID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "codelists" - resource <- agencyID - params <- paste0("?limit=", limit, "&offset=", offset, "&query=", query, "&orderBy=", orderBy) - resource <- paste0(resource, params) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get codelists agency resource -#' @description This function allows to obtain all the versions of a -#' classification with a certain identifier and that is also kept by a -#' certain organization. -#' @param agencyID (string) Agency identificator. -#' @param resourceID (string) Resource identificator. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_codelists_agency_resource("ISTAC", "CL_AREA_ES") -#' @export -get_structuralresources_codelists_agency_resource <- function(agencyID, resourceID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "codelists" - resource <- paste0(agencyID, "/", resourceID) - params <- paste0("?limit=", limit, "&offset=", offset, "&query=", query, "&orderBy=", orderBy) - resource <- paste0(resource, params) - url <- get_url(api, path, resource) - - # Get Content - content <- get_content(url) - - return(content) -} - -#' @title Get codelists agency resource version -#' @description This function allows you to consult a particular version of a classification. -#' @param agencyID (string) Agency identificator. -#' @param resourceID (string) Resource identificator. -#' @param version (string) Specific resource version. -#' @examples -#' get_structuralresources_codelists_agency_resource_version("ISTAC", "CL_AREA_ES", "01.000") -#' @export -get_structuralresources_codelists_agency_resource_version <- function(agencyID, resourceID, version) { - - # Build URL - api <- "structural-resources" - path <- "codelists" - resource <- paste0(agencyID, "/", resourceID, "/", version) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get codelists agency resource version codes -#' @description This function allows to consult the codes of a version of a -#' classification. Note that if wildcards are used as \code{~all} or one of the -#' \code{limit}, \code{offset}, \code{query} or \code{orderBy} parameters, -#' the list will be automatically paginated. -#' @param agencyID (string) Agency identificator. -#' @param resourceID (string) Resource identificator. -#' @param version (string) Specific resource version. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @param openness (string) Opening established for viewing. -#' @param order (string) Order established for visualization. -#' @param fields (string) Additional fields that you want to show in the answer. -#' @examples -#' get_structuralresources_codelists_agency_resource_version_codes("ISTAC", "CL_AREA_ES", "01.000") -#' @export -get_structuralresources_codelists_agency_resource_version_codes <- function(agencyID, resourceID, version, limit = 25, offset = 0, query = NULL, orderBy = NULL, openness = NULL, order = NULL, fields = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Parse fields - if (!is.null(fields)) { - fields <- parse_param(fields) - } - - # Build URL - api <- "structural-resources" - path <- "codelists" - resource <- paste0(agencyID, "/", resourceID, "/", version, "/codes") - params <- paste0("?limit=", limit, "&offset=", offset, "&query=", query, "&orderBy=", orderBy, "&openness=", openness, "&order=", order, "&fields=", fields) - resource <- paste0(resource, params) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get codelists agency resource version codes (codeID) -#' @description This function allows to consult a specific code of a version of a classification. -#' @param agencyID (string) Agency identificator. -#' @param resourceID (string) Resource identificator. -#' @param version (string) Specific resource version. -#' @param codeID (string) Code identificator. -#' @examples -#' get_structuralresources_codelists_agency_resource_version_codes_codeid( -#' "ISTAC", "CL_AREA_ES", "01.000", "ES706A01" -#' ) -#' @export -get_structuralresources_codelists_agency_resource_version_codes_codeid <- function(agencyID, resourceID, version, codeID) { - - # Build URL - api <- "structural-resources" - path <- "codelists" - resource <- paste0(agencyID, "/", resourceID, "/", version, "/codes/", codeID) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) -} +# Instituto Canario de Estadística (ISTAC) + +#' @title Get codelist families +#' @description This function returns the list of families of classifications +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param orderBy (string) Field by which to sort the results. +#' @param query (string) Query to filter the results. +#' @examples +#' get_structuralresources_codelist_families() +#' @export +get_structuralresources_codelist_families <- function(limit = 25, offset = 0, orderBy = NULL, query = NULL) { + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Build URL + api <- "structural-resources" + path <- "codelistfamilies" + params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) + path <- paste0(path, params) + url <- get_url(api, path) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get codelist families +#' @description This function allows to obtain a family of classifications in particular. +#' @param id (string) codelist family identificator +#' @examples +#' get_structuralresources_codelist_families_id() +#' @export +get_structuralresources_codelist_families_id <- function(id = NULL) { + + # Build URL + api <- "structural-resources" + path <- "codelistfamilies" + resource <- id + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get codelists +#' @description This function allows to obtain the list of classifications. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_codelists() +#' @export +get_structuralresources_codelists <- function(limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "codelists" + params <- paste0("?limit=", limit, "&offset=", offset, "&query=", query, "&orderBy=", orderBy) + path <- paste0(path, params) + url <- get_url(api, path) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get codelists agency +#' @description This function allows obtaining the list of all the classifications +#' maintained by a certain organization. +#' @param agencyID (string) Agency identificator. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_codelists_agency("ISTAC") +#' get_structuralresources_codelists_agency("ESTAT") +#' @export +get_structuralresources_codelists_agency <- function(agencyID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "codelists" + resource <- agencyID + params <- paste0("?limit=", limit, "&offset=", offset, "&query=", query, "&orderBy=", orderBy) + resource <- paste0(resource, params) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get codelists agency resource +#' @description This function allows to obtain all the versions of a +#' classification with a certain identifier and that is also kept by a +#' certain organization. +#' @param agencyID (string) Agency identificator. +#' @param resourceID (string) Resource identificator. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_codelists_agency_resource("ISTAC", "CL_AREA_ES") +#' @export +get_structuralresources_codelists_agency_resource <- function(agencyID, resourceID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "codelists" + resource <- paste0(agencyID, "/", resourceID) + params <- paste0("?limit=", limit, "&offset=", offset, "&query=", query, "&orderBy=", orderBy) + resource <- paste0(resource, params) + url <- get_url(api, path, resource) + + # Get Content + content <- get_content(url) + + return(content) +} + +#' @title Get codelists agency resource version +#' @description This function allows you to consult a particular version of a classification. +#' @param agencyID (string) Agency identificator. +#' @param resourceID (string) Resource identificator. +#' @param version (string) Specific resource version. +#' @examples +#' get_structuralresources_codelists_agency_resource_version("ISTAC", "CL_AREA_ES", "01.000") +#' @export +get_structuralresources_codelists_agency_resource_version <- function(agencyID, resourceID, version) { + + # Build URL + api <- "structural-resources" + path <- "codelists" + resource <- paste0(agencyID, "/", resourceID, "/", version) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get codelists agency resource version codes +#' @description This function allows to consult the codes of a version of a +#' classification. Note that if wildcards are used as \code{~all} or one of the +#' \code{limit}, \code{offset}, \code{query} or \code{orderBy} parameters, +#' the list will be automatically paginated. +#' @param agencyID (string) Agency identificator. +#' @param resourceID (string) Resource identificator. +#' @param version (string) Specific resource version. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @param openness (string) Opening established for viewing. +#' @param order (string) Order established for visualization. +#' @param fields (string) Additional fields that you want to show in the answer. +#' @examples +#' get_structuralresources_codelists_agency_resource_version_codes("ISTAC", "CL_AREA_ES", "01.000") +#' @export +get_structuralresources_codelists_agency_resource_version_codes <- function(agencyID, resourceID, version, limit = 25, offset = 0, query = NULL, orderBy = NULL, openness = NULL, order = NULL, fields = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Parse fields + if (!is.null(fields)) { + fields <- parse_param(fields) + } + + # Build URL + api <- "structural-resources" + path <- "codelists" + resource <- paste0(agencyID, "/", resourceID, "/", version, "/codes") + params <- paste0("?limit=", limit, "&offset=", offset, "&query=", query, "&orderBy=", orderBy, "&openness=", openness, "&order=", order, "&fields=", fields) + resource <- paste0(resource, params) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get codelists agency resource version codes (codeID) +#' @description This function allows to consult a specific code of a version of a classification. +#' @param agencyID (string) Agency identificator. +#' @param resourceID (string) Resource identificator. +#' @param version (string) Specific resource version. +#' @param codeID (string) Code identificator. +#' @examples +#' get_structuralresources_codelists_agency_resource_version_codes_codeid( +#' "ISTAC", "CL_AREA_ES", "01.000", "ES706A01" +#' ) +#' @export +get_structuralresources_codelists_agency_resource_version_codes_codeid <- function(agencyID, resourceID, version, codeID) { + + # Build URL + api <- "structural-resources" + path <- "codelists" + resource <- paste0(agencyID, "/", resourceID, "/", version, "/codes/", codeID) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} diff --git a/R/structural_resources_concepts.R b/R/structural_resources_concepts.R index 9ab4216..8d3067f 100644 --- a/R/structural_resources_concepts.R +++ b/R/structural_resources_concepts.R @@ -1,220 +1,220 @@ -# Instituto Canario de Estadística (ISTAC) - -#' @title Get concept types -#' @description This function returns the content from /v1.0/conceptTypes -#' @examples -#' get_structuralresources_concept_types() -#' @export -get_structuralresources_concept_types <- function() { - - # Build URL - api <- "structural-resources" - path <- "conceptTypes" - url <- get_url(api, path) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get concept schemes -#' @description This function returns the content from /v1.0/conceptschemes -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_concept_schemes() -#' get_structuralresources_concept_schemes(query = "ID EQ 2090", orderBy = "ID ASC") -#' @export -get_structuralresources_concept_schemes <- function(limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "conceptschemes" - params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) - path <- paste0(path, params) - url <- get_url(api, path) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get concept schemes agency -#' @description This function returns the content from /v1.0/conceptschemes/{agencyID} -#' @param agencyID (string) Identifier of the agency that publishes. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_concept_schemes_agency("ISTAC") -#' get_structuralresources_concept_schemes_agency("ESTAT", query = "ID EQ 2090", orderBy = "ID ASC") -#' @export -get_structuralresources_concept_schemes_agency <- function(agencyID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - - # Build URL - api <- "structural-resources" - path <- "conceptschemes" - resource <- agencyID - params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) - resource <- paste0(resource, params) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get concept schemes agency resource -#' @description This function returns the content from /v1.0/conceptschemes/{agencyID}/{resourceID} -#' @param agencyID (string) Identifier of the agency that publishes. -#' @param resourceID (string) Resource identifier. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_concept_schemes_agency_resource( -#' agencyID = "ISTAC", resourceID = "CL_AREA_ES" -#' ) -#' @export -get_structuralresources_concept_schemes_agency_resource <- function(agencyID, resourceID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - - # Build URL - api <- "structural-resources" - path <- "conceptschemes" - resource <- paste0(agencyID, "/", resourceID) - params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) - resource <- paste0(resource, params) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get concept schemes agency resource version -#' @description This function returns the content from /v1.0/conceptschemes/{agencyID}/{resourceID}/{version} -#' @param agencyID (string) Identifier of the agency that publishes. -#' @param resourceID (string) Resource identifier. -#' @param version (string) Specific version of the resource. -#' @examples -#' get_structuralresources_concept_schemes_agency_resource_version( -#' agencyID = "ISTAC", resourceID = "CL_AREA", version = "01.000" -#' ) -#' @export -get_structuralresources_concept_schemes_agency_resource_version <- function(agencyID, resourceID, version) { - - - # Build URL - api <- "structural-resources" - path <- "conceptschemes" - resource <- paste0(agencyID, "/", resourceID, "/", version) - url <- get_url(api, path, resource) - - # Get content - # content <- get_content(url) - - return(url) -} - -#' @title Get concept schemes agency resource version concepts -#' @description This function returns the content from /v1.0/conceptschemes/{agencyID}/{resourceID}/{version}/concepts -#' @param agencyID (string) Identifier of the agency that publishes. -#' @param resourceID (string) Resource identifier. -#' @param version (string) Specific version of the resource. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_concept_schemes_agency_resource_version_concepts( -#' agencyID = "ISTAC", resourceID = "CL_AREA_ES", version = "01.000" -#' ) -#' @export -get_structuralresources_concept_schemes_agency_resource_version_concepts <- function(agencyID, resourceID, version, limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "conceptschemes" - resource <- paste0(agencyID, "/", resourceID, "/", version, "/concepts") - url <- get_url(api, path, resource) - - # Get content - # content <- get_content(url) - - return(url) -} - -#' @title Get concept schemes agency resource version concepts (id) -#' @description This function returns the content from /v1.0/conceptschemes/{agencyID}/{resourceID}/{version}/concepts/{conceptID} -#' @param agencyID (string) Identifier of the agency that publishes. -#' @param resourceID (string) Resource identifier. -#' @param version (string) Specific version of the resource. -#' @param conceptID (string) Concept identifier. -#' @examples -#' get_structuralresources_concept_schemes_agency_resource_version_concepts_id( -#' agencyID = "ISTAC", resourceID = "CL_AREA_ES", version = "01.000", conceptID = 0 -#' ) -#' @export -get_structuralresources_concept_schemes_agency_resource_version_concepts_id <- function(agencyID, resourceID, version, conceptID) { - - # Build URL - api <- "structural-resources" - path <- "conceptschemes" - resource <- paste0(agencyID, "/", resourceID, "/", version, "/concepts/", conceptID) - url <- get_url(api, path, resource) - - # Get content - # content <- get_content(url) - - return(url) -} +# Instituto Canario de Estadística (ISTAC) + +#' @title Get concept types +#' @description This function returns the content from /v1.0/conceptTypes +#' @examples +#' get_structuralresources_concept_types() +#' @export +get_structuralresources_concept_types <- function() { + + # Build URL + api <- "structural-resources" + path <- "conceptTypes" + url <- get_url(api, path) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get concept schemes +#' @description This function returns the content from /v1.0/conceptschemes +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_concept_schemes() +#' get_structuralresources_concept_schemes(query = "ID EQ 2090", orderBy = "ID ASC") +#' @export +get_structuralresources_concept_schemes <- function(limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "conceptschemes" + params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) + path <- paste0(path, params) + url <- get_url(api, path) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get concept schemes agency +#' @description This function returns the content from /v1.0/conceptschemes/{agencyID} +#' @param agencyID (string) Identifier of the agency that publishes. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_concept_schemes_agency("ISTAC") +#' get_structuralresources_concept_schemes_agency("ESTAT", query = "ID EQ 2090", orderBy = "ID ASC") +#' @export +get_structuralresources_concept_schemes_agency <- function(agencyID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + + # Build URL + api <- "structural-resources" + path <- "conceptschemes" + resource <- agencyID + params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) + resource <- paste0(resource, params) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get concept schemes agency resource +#' @description This function returns the content from /v1.0/conceptschemes/{agencyID}/{resourceID} +#' @param agencyID (string) Identifier of the agency that publishes. +#' @param resourceID (string) Resource identifier. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_concept_schemes_agency_resource( +#' agencyID = "ISTAC", resourceID = "CL_AREA_ES" +#' ) +#' @export +get_structuralresources_concept_schemes_agency_resource <- function(agencyID, resourceID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + + # Build URL + api <- "structural-resources" + path <- "conceptschemes" + resource <- paste0(agencyID, "/", resourceID) + params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) + resource <- paste0(resource, params) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get concept schemes agency resource version +#' @description This function returns the content from /v1.0/conceptschemes/{agencyID}/{resourceID}/{version} +#' @param agencyID (string) Identifier of the agency that publishes. +#' @param resourceID (string) Resource identifier. +#' @param version (string) Specific version of the resource. +#' @examples +#' get_structuralresources_concept_schemes_agency_resource_version( +#' agencyID = "ISTAC", resourceID = "CL_AREA", version = "01.000" +#' ) +#' @export +get_structuralresources_concept_schemes_agency_resource_version <- function(agencyID, resourceID, version) { + + + # Build URL + api <- "structural-resources" + path <- "conceptschemes" + resource <- paste0(agencyID, "/", resourceID, "/", version) + url <- get_url(api, path, resource) + + # Get content + # content <- get_content(url) + + return(url) +} + +#' @title Get concept schemes agency resource version concepts +#' @description This function returns the content from /v1.0/conceptschemes/{agencyID}/{resourceID}/{version}/concepts +#' @param agencyID (string) Identifier of the agency that publishes. +#' @param resourceID (string) Resource identifier. +#' @param version (string) Specific version of the resource. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_concept_schemes_agency_resource_version_concepts( +#' agencyID = "ISTAC", resourceID = "CL_AREA_ES", version = "01.000" +#' ) +#' @export +get_structuralresources_concept_schemes_agency_resource_version_concepts <- function(agencyID, resourceID, version, limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "conceptschemes" + resource <- paste0(agencyID, "/", resourceID, "/", version, "/concepts") + url <- get_url(api, path, resource) + + # Get content + # content <- get_content(url) + + return(url) +} + +#' @title Get concept schemes agency resource version concepts (id) +#' @description This function returns the content from /v1.0/conceptschemes/{agencyID}/{resourceID}/{version}/concepts/{conceptID} +#' @param agencyID (string) Identifier of the agency that publishes. +#' @param resourceID (string) Resource identifier. +#' @param version (string) Specific version of the resource. +#' @param conceptID (string) Concept identifier. +#' @examples +#' get_structuralresources_concept_schemes_agency_resource_version_concepts_id( +#' agencyID = "ISTAC", resourceID = "CL_AREA_ES", version = "01.000", conceptID = 0 +#' ) +#' @export +get_structuralresources_concept_schemes_agency_resource_version_concepts_id <- function(agencyID, resourceID, version, conceptID) { + + # Build URL + api <- "structural-resources" + path <- "conceptschemes" + resource <- paste0(agencyID, "/", resourceID, "/", version, "/concepts/", conceptID) + url <- get_url(api, path, resource) + + # Get content + # content <- get_content(url) + + return(url) +} diff --git a/R/structural_resources_datastructures.R b/R/structural_resources_datastructures.R index 3c3456b..239513b 100644 --- a/R/structural_resources_datastructures.R +++ b/R/structural_resources_datastructures.R @@ -1,289 +1,289 @@ -# Instituto Canario de Estadística (ISTAC) - -#' @title Get content constraints -#' @description This function returns the content from /v1.0/contentConstraints -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_content_constraints() -#' get_structuralresources_content_constraints(query = "ID EQ 2090", orderBy = "ID ASC") -#' @export -get_structuralresources_content_constraints <- function(limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "contentConstraints" - params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) - path <- paste0(path, params) - url <- get_url(api, path) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get content constraints agency -#' @description This function returns the content from /v1.0/contentConstraints/{agencyID} -#' @param agencyID (string) Identifier of the agency that publishes. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_content_constraints_agency("ISTAC") -#' @export -get_structuralresources_content_constraints_agency <- function(agencyID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "contentConstraints" - resource <- agencyID - params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) - resource <- paste0(resource, params) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get content constraints agency resource -#' @description This function returns the content from /v1.0/contentConstraints/{agencyID}/{resourceID} -#' @param agencyID (string) Identifier of the agency that publishes. -#' @param resourceID (string) Resource identifier. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_content_constraints_agency_resource("ISTAC", "CL_AREA") -#' @export -get_structuralresources_content_constraints_agency_resource <- function(agencyID, resourceID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "contentConstraints" - resource <- paste0(agencyID, "/", resourceID) - params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) - resource <- paste0(resource, params) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get content constraints agency resource version -#' @description This function returns the content from /v1.0/contentConstraints/{agencyID}/{resourceID}/{version} -#' @param agencyID (string) Identifier of the agency that publishes. -#' @param resourceID (string) Resource identifier. -#' @param version (string) Specific version of the resource. -#' @examples -#' get_structuralresources_content_constraints_agency_resource_version("ISTAC", "CL_AREA", "01.000") -#' @export -get_structuralresources_content_constraints_agency_resource_version <- function(agencyID, resourceID, version) { - - - # Build URL - api <- "structural-resources" - path <- "contentConstraints" - resource <- paste0(agencyID, "/", resourceID, "/", version) - url <- get_url(api, path, resource) - - # Get content - # content <- get_content(url) - - return(url) -} - -#' @title Get content constraints agency resource version regions -#' @description This function returns the content from /v1.0/contentConstraints/{agencyID}/{resourceID}/{version}/regions/{regionCode} -#' @param regionCode (string) Region code. -#' @param agencyID (string) Identifier of the agency that publishes. -#' @param resourceID (string) Resource identifier. -#' @param version (string) Specific version of the resource. -#' @examples -#' get_structuralresources_content_constraints_agency_resource_version_regions( -#' "0001", "ISTAC", "CL_AREA", "01.000" -#' ) -#' @export -get_structuralresources_content_constraints_agency_resource_version_regions <- function(regionCode, agencyID, resourceID, version) { - - - # Build URL - api <- "structural-resources" - path <- "contentConstraints" - resource <- paste0(agencyID, "/", resourceID, "/", version, "/regions/", regionCode) - url <- get_url(api, path, resource) - - # Get content - # content <- get_content(url) - - return(url) -} - -#' @title Get data structures -#' @description This function returns the content from /v1.0/datastructures -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_data_structures() -#' get_structuralresources_data_structures(query = "ID EQ 2090", orderBy = "ID ASC") -#' @export -get_structuralresources_data_structures <- function(limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "datastructures" - params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) - path <- paste0(path, params) - url <- get_url(api, path) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get data structures agency -#' @description This function returns the content from /v1.0/datastructures/{agencyID} -#' @param agencyID (string) Identifier of the agency that publishes. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_data_structures_agency("ISTAC") -#' @export -get_structuralresources_data_structures_agency <- function(agencyID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "datastructures" - resource <- agencyID - params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) - resource <- paste0(resource, params) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) -} - - -#' @title Get data structures agency resource -#' @description This function returns the content from /v1.0/datastructures/{agencyID}/{resourceID} -#' @param agencyID (string) Identifier of the agency that publishes. -#' @param resourceID (string) Resource identifier. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_data_structures_agency_resource("ISTAC", "CL_AREA") -#' @export -get_structuralresources_data_structures_agency_resource <- function(agencyID, resourceID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "datastructures" - resource <- paste0(agencyID, "/", resourceID) - params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) - resource <- paste0(resource, params) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) -} - -#' @title Get data structures agency resource version -#' @description This function returns the content from /v1.0/datastructures/{agencyID}/{resourceID}/{version} -#' @param agencyID (string) Identifier of the agency that publishes. -#' @param resourceID (string) Resource identifier. -#' @param version (string) Specific version of the resource. -#' @examples -#' get_structuralresources_data_structures_agency_resource_version("ISTAC", "CL_AREA", "01.000") -#' @export -get_structuralresources_data_structures_agency_resource_version <- function(agencyID, resourceID, version) { - - # Build URL - api <- "structural-resources" - path <- "datastructures" - resource <- paste0(agencyID, "/", resourceID, "/", version) - url <- get_url(api, path, resource) - - # Get content - # content <- get_content(url) - - return(url) -} +# Instituto Canario de Estadística (ISTAC) + +#' @title Get content constraints +#' @description This function returns the content from /v1.0/contentConstraints +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_content_constraints() +#' get_structuralresources_content_constraints(query = "ID EQ 2090", orderBy = "ID ASC") +#' @export +get_structuralresources_content_constraints <- function(limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "contentConstraints" + params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) + path <- paste0(path, params) + url <- get_url(api, path) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get content constraints agency +#' @description This function returns the content from /v1.0/contentConstraints/{agencyID} +#' @param agencyID (string) Identifier of the agency that publishes. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_content_constraints_agency("ISTAC") +#' @export +get_structuralresources_content_constraints_agency <- function(agencyID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "contentConstraints" + resource <- agencyID + params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) + resource <- paste0(resource, params) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get content constraints agency resource +#' @description This function returns the content from /v1.0/contentConstraints/{agencyID}/{resourceID} +#' @param agencyID (string) Identifier of the agency that publishes. +#' @param resourceID (string) Resource identifier. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_content_constraints_agency_resource("ISTAC", "CL_AREA") +#' @export +get_structuralresources_content_constraints_agency_resource <- function(agencyID, resourceID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "contentConstraints" + resource <- paste0(agencyID, "/", resourceID) + params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) + resource <- paste0(resource, params) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get content constraints agency resource version +#' @description This function returns the content from /v1.0/contentConstraints/{agencyID}/{resourceID}/{version} +#' @param agencyID (string) Identifier of the agency that publishes. +#' @param resourceID (string) Resource identifier. +#' @param version (string) Specific version of the resource. +#' @examples +#' get_structuralresources_content_constraints_agency_resource_version("ISTAC", "CL_AREA", "01.000") +#' @export +get_structuralresources_content_constraints_agency_resource_version <- function(agencyID, resourceID, version) { + + + # Build URL + api <- "structural-resources" + path <- "contentConstraints" + resource <- paste0(agencyID, "/", resourceID, "/", version) + url <- get_url(api, path, resource) + + # Get content + # content <- get_content(url) + + return(url) +} + +#' @title Get content constraints agency resource version regions +#' @description This function returns the content from /v1.0/contentConstraints/{agencyID}/{resourceID}/{version}/regions/{regionCode} +#' @param regionCode (string) Region code. +#' @param agencyID (string) Identifier of the agency that publishes. +#' @param resourceID (string) Resource identifier. +#' @param version (string) Specific version of the resource. +#' @examples +#' get_structuralresources_content_constraints_agency_resource_version_regions( +#' "0001", "ISTAC", "CL_AREA", "01.000" +#' ) +#' @export +get_structuralresources_content_constraints_agency_resource_version_regions <- function(regionCode, agencyID, resourceID, version) { + + + # Build URL + api <- "structural-resources" + path <- "contentConstraints" + resource <- paste0(agencyID, "/", resourceID, "/", version, "/regions/", regionCode) + url <- get_url(api, path, resource) + + # Get content + # content <- get_content(url) + + return(url) +} + +#' @title Get data structures +#' @description This function returns the content from /v1.0/datastructures +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_data_structures() +#' get_structuralresources_data_structures(query = "ID EQ 2090", orderBy = "ID ASC") +#' @export +get_structuralresources_data_structures <- function(limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "datastructures" + params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) + path <- paste0(path, params) + url <- get_url(api, path) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get data structures agency +#' @description This function returns the content from /v1.0/datastructures/{agencyID} +#' @param agencyID (string) Identifier of the agency that publishes. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_data_structures_agency("ISTAC") +#' @export +get_structuralresources_data_structures_agency <- function(agencyID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "datastructures" + resource <- agencyID + params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) + resource <- paste0(resource, params) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + + +#' @title Get data structures agency resource +#' @description This function returns the content from /v1.0/datastructures/{agencyID}/{resourceID} +#' @param agencyID (string) Identifier of the agency that publishes. +#' @param resourceID (string) Resource identifier. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_data_structures_agency_resource("ISTAC", "CL_AREA") +#' @export +get_structuralresources_data_structures_agency_resource <- function(agencyID, resourceID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "datastructures" + resource <- paste0(agencyID, "/", resourceID) + params <- paste0("?limit=", limit, "&offset=", offset, "&orderBy=", orderBy, "&query=", query) + resource <- paste0(resource, params) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get data structures agency resource version +#' @description This function returns the content from /v1.0/datastructures/{agencyID}/{resourceID}/{version} +#' @param agencyID (string) Identifier of the agency that publishes. +#' @param resourceID (string) Resource identifier. +#' @param version (string) Specific version of the resource. +#' @examples +#' get_structuralresources_data_structures_agency_resource_version("ISTAC", "CL_AREA", "01.000") +#' @export +get_structuralresources_data_structures_agency_resource_version <- function(agencyID, resourceID, version) { + + # Build URL + api <- "structural-resources" + path <- "datastructures" + resource <- paste0(agencyID, "/", resourceID, "/", version) + url <- get_url(api, path, resource) + + # Get content + # content <- get_content(url) + + return(url) +} diff --git a/R/structural_resources_variables.R b/R/structural_resources_variables.R index 19f7874..bc27b1c 100644 --- a/R/structural_resources_variables.R +++ b/R/structural_resources_variables.R @@ -1,252 +1,244 @@ -# Instituto Canario de Estadística (ISTAC) - -#' @title Get variable families -#' @description This function returns data from /v1.0/variablefamilies -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_variable_families() -#' @export -get_structuralresources_variable_families <- function(limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "variablefamilies" - params <- paste0("?limit=", limit, "&offset=", offset, "&query=", query, "&orderBy=", orderBy) - path <- paste0(path, params) - url <- get_url(api, path) - - # Get content - content <- get_content(url) - - return(content) - -} - -#' @title Get variable families (id) -#' @description This function returns data from /v1.0/variablefamilies/{id} -#' @param id (string) Variable family identificator. -#' @examples -#' get_structuralresources_variable_families_id("VRF_DEMOGRAFICAS") -#' @export -get_structuralresources_variable_families_id <- function(id) { - - # Build URL - api <- "structural-resources" - path <- "variablefamilies" - resource <- id - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) - -} - -#' @title Get variable families (id) variables -#' @description This function returns data from /v1.0/variablefamilies/{id}/variables -#' @param id (string) Variable family identificator. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_variable_families_id_variables("VRF_DEMOGRAFICAS") -#' @export -get_structuralresources_variable_families_id_variables <- function(id, limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "variablefamilies" - resource <- paste0(id, "/variables") - params <- paste0("?limit=", limit, "&offset=", offset, "&query=", query, "&orderBy=", orderBy) - resource <- paste0(resource, params) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) - -} - -#' @title Get variables -#' @description This function returns data from /v1.0/variables -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_variables() -#' @export -get_structuralresources_variables <- function(limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "variables" - url <- get_url(api, path) - - # Get content - content <- get_content(url) - - return(content) - -} - -#' @title Get variables (id) -#' @description This function returns data from /v1.0/variables/{id} -#' @param id (string) Variable identificator. -#' @examples -#' get_structuralresources_variables_id("VR_SEXO") -#' @export -get_structuralresources_variables_id <- function(id) { - - # Build URL - api <- "structural-resources" - path <- "variables" - resource <- id - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) - -} - -#' @title Get variableelements -#' @description This function returns data from /v1.0/variables/{variableID}/variableelements -#' @param variableID (string) Variable identificator. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' get_structuralresources_variableelements("VR_SEXO") -#' @export -get_structuralresources_variableelements <- function(variableID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "variables" - resource <- paste0(variableID, "/variableelements") - params <- paste0("?limit=", limit, "&offset=", offset, "&query=", query, "&orderBy=", orderBy) - resource <- paste0(resource, params) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) - -} - -#' @title Get variableelements resource -#' @description This function returns data from /v1.0/variables/{variableID}/variableelements/{resourceID} -#' @param resourceID (string) Resource identificator. -#' @param variableID (string) Variable identificator. -#' @examples -#' get_structuralresources_variableelements_resource("VR_SEXO", "FEMALE") -#' get_structuralresources_variableelements_resource("VR_TERRITORIO", "CCAA_CANARIAS") -#' @export -get_structuralresources_variableelements_resource <- function(variableID, resourceID) { - - # Build URL - api <- "structural-resources" - path <- "variables" - resource <- paste0(variableID, "/variableelements/", resourceID) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) - -} - -#' @title Get geoinfo -#' @description This function returns data from /v1.0/variables/{variableID}/variableelements/{resourceID}/geoinfo -#' @param variableID (string) Variable identificator. -#' @param resourceID (string) Resource identificator. -#' @param fields (string) Additional fields that you want to show in the answer. -#' @param limit (int) Results limit. By default \code{limit = 25}. -#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. -#' @param query (string) Query to filter the results. -#' @param orderBy (string) Field by which to sort the results. -#' @examples -#' geoinfo <- get_structuralresources_geoinfo("VR_TERRITORIO", "MUN_ICOD_VINOS") -#' @export -get_structuralresources_geoinfo <- function(variableID, resourceID, fields = NULL, limit = 25, offset = 0, query = NULL, orderBy = NULL) { - - # Parse fields - if (!is.null(fields)) { - fields <- parse_param(fields) - } - - # Parse query - if (!is.null(query)) { - query <- parse_param(query) - } - - # Parse orderBy - if (!is.null(orderBy)) { - orderBy <- parse_param(orderBy) - } - - # Build URL - api <- "structural-resources" - path <- "variables" - resource <- paste0(variableID, "/variableelements/", resourceID, "/geoinfo") - params <- paste0("?fields=", fields, "&limit=", limit, "&offset=", offset, "&query=", query, "&orderBy=", orderBy) - resource <- paste0(resource, params) - url <- get_url(api, path, resource) - - # Get content - content <- get_content(url) - - return(content) - -} +# Instituto Canario de Estadística (ISTAC) + +#' @title Get variable families +#' @description This function returns data from /v1.0/variablefamilies +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_variable_families() +#' @export +get_structuralresources_variable_families <- function(limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "variablefamilies" + params <- paste0("?limit=", limit, "&offset=", offset, "&query=", query, "&orderBy=", orderBy) + path <- paste0(path, params) + url <- get_url(api, path) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get variable families (id) +#' @description This function returns data from /v1.0/variablefamilies/{id} +#' @param id (string) Variable family identificator. +#' @examples +#' get_structuralresources_variable_families_id("VRF_DEMOGRAFICAS") +#' @export +get_structuralresources_variable_families_id <- function(id) { + + # Build URL + api <- "structural-resources" + path <- "variablefamilies" + resource <- id + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get variable families (id) variables +#' @description This function returns data from /v1.0/variablefamilies/{id}/variables +#' @param id (string) Variable family identificator. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_variable_families_id_variables("VRF_DEMOGRAFICAS") +#' @export +get_structuralresources_variable_families_id_variables <- function(id, limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "variablefamilies" + resource <- paste0(id, "/variables") + params <- paste0("?limit=", limit, "&offset=", offset, "&query=", query, "&orderBy=", orderBy) + resource <- paste0(resource, params) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get variables +#' @description This function returns data from /v1.0/variables +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_variables() +#' @export +get_structuralresources_variables <- function(limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "variables" + url <- get_url(api, path) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get variables (id) +#' @description This function returns data from /v1.0/variables/{id} +#' @param id (string) Variable identificator. +#' @examples +#' get_structuralresources_variables_id("VR_SEXO") +#' @export +get_structuralresources_variables_id <- function(id) { + + # Build URL + api <- "structural-resources" + path <- "variables" + resource <- id + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get variableelements +#' @description This function returns data from /v1.0/variables/{variableID}/variableelements +#' @param variableID (string) Variable identificator. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' get_structuralresources_variableelements("VR_SEXO") +#' @export +get_structuralresources_variableelements <- function(variableID, limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "variables" + resource <- paste0(variableID, "/variableelements") + params <- paste0("?limit=", limit, "&offset=", offset, "&query=", query, "&orderBy=", orderBy) + resource <- paste0(resource, params) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get variableelements resource +#' @description This function returns data from /v1.0/variables/{variableID}/variableelements/{resourceID} +#' @param resourceID (string) Resource identificator. +#' @param variableID (string) Variable identificator. +#' @examples +#' get_structuralresources_variableelements_resource("VR_SEXO", "FEMALE") +#' get_structuralresources_variableelements_resource("VR_TERRITORIO", "CCAA_CANARIAS") +#' @export +get_structuralresources_variableelements_resource <- function(variableID, resourceID) { + + # Build URL + api <- "structural-resources" + path <- "variables" + resource <- paste0(variableID, "/variableelements/", resourceID) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} + +#' @title Get geoinfo +#' @description This function returns data from /v1.0/variables/{variableID}/variableelements/{resourceID}/geoinfo +#' @param variableID (string) Variable identificator. +#' @param resourceID (string) Resource identificator. +#' @param fields (string) Additional fields that you want to show in the answer. +#' @param limit (int) Results limit. By default \code{limit = 25}. +#' @param offset (int) Displacement. Result from which it is returned. By default \code{offset = 0}. +#' @param query (string) Query to filter the results. +#' @param orderBy (string) Field by which to sort the results. +#' @examples +#' geoinfo <- get_structuralresources_geoinfo("VR_TERRITORIO", "MUN_ICOD_VINOS") +#' @export +get_structuralresources_geoinfo <- function(variableID, resourceID, fields = NULL, limit = 25, offset = 0, query = NULL, orderBy = NULL) { + + # Parse fields + if (!is.null(fields)) { + fields <- parse_param(fields) + } + + # Parse query + if (!is.null(query)) { + query <- parse_param(query) + } + + # Parse orderBy + if (!is.null(orderBy)) { + orderBy <- parse_param(orderBy) + } + + # Build URL + api <- "structural-resources" + path <- "variables" + resource <- paste0(variableID, "/variableelements/", resourceID, "/geoinfo") + params <- paste0("?fields=", fields, "&limit=", limit, "&offset=", offset, "&query=", query, "&orderBy=", orderBy) + resource <- paste0(resource, params) + url <- get_url(api, path, resource) + + # Get content + content <- get_content(url) + + return(content) +} diff --git a/README.Rmd b/README.Rmd new file mode 100644 index 0000000..84a097f --- /dev/null +++ b/README.Rmd @@ -0,0 +1,112 @@ +--- +output: github_document +--- + + + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>", + fig.path = "man/figures/README-", + out.width = "100%" +) +``` + +# istacr + + +[![R build status](https://github.com/eDatos/istacr/workflows/R-CMD-check/badge.svg)](https://github.com/jlopezper/istacr/actions) +[![Codecov test coverage](https://codecov.io/gh/eDatos/istacr/branch/master/graph/badge.svg)](https://codecov.io/gh/jlopezper/istacr?branch=master) + + +The goal of `istacr` is to provide a wrapper to the [ISTAC api catalog](https://www3.gobiernodecanarias.org/aplicaciones/appsistac/api), allowing the user to obtain the open data from R. + +## Installation + +You can install the released version of istacr from [CRAN](https://CRAN.R-project.org) with: + +``` r +install.packages("istacr") +``` + +And the development version from [GitHub](https://github.com/) with: + +``` r +# install.packages("remotes") +remotes::install_github("eDatos/istacr") +``` +## How to use this package + +The package offers different functions depending on the resource you want to access. There're three main resources: + +- Indicators +- Statistical resources (cubes) +- Structural resources + + +## Examples + +### Indicators + +Get a list of all indicators: + +```{r example1} +library(istacr) +tst <- get_indicators() +str(tst, max.level = 1) +``` + +Get information of a specific indicator: + +```{r example2} +tst <- get_indicators_code("TURISTAS") +str(tst, max.level = 1) +``` + +Or about geographical granularities: + +```{r example3} +# Get granularities +tst <- get_indicators_geographic_granularities() +tst$items + +# Get information about a specific granularity +get_indicators_geographical_values('ISLANDS') +``` + + +### Statistical resources + +Get all available cubes: + +```{r example4} +tst <- get_datasets() +str(tst, max.level = 1) +``` + +Only those from a specific maintainer: + +```{r example5} +tst <- get_datasets_agency('ISTAC') +str(tst, max.level = 1) +``` + + +### Structural resources + +```{r example6} +tst <- istacr::get_structuralresources_codelists() +tst$codelist$id +``` + + +```{r example7} +tst <- get_structuralresources_codelists_agency_resource('ISTAC', 'CL_ABANDONO_CULTIVO') +tst$codelist +``` + + +## Further information + +Please find the latest documentation on [CRAN](https://cran.r-project.org/web/packages/istacr/istacr.pdf). In case you want to report a bug, please open an [issue](https://github.com/eDatos/istacr/issues). diff --git a/README.md b/README.md new file mode 100644 index 0000000..b21527d --- /dev/null +++ b/README.md @@ -0,0 +1,217 @@ + + + +# istacr + + + +[![R build +status](https://github.com/eDatos/istacr/workflows/R-CMD-check/badge.svg)](https://github.com/jlopezper/istacr/actions) +[![Codecov test +coverage](https://codecov.io/gh/eDatos/istacr/branch/master/graph/badge.svg)](https://codecov.io/gh/jlopezper/istacr?branch=master) + + +The goal of `istacr` is to provide a wrapper to the [ISTAC api +catalog](https://www3.gobiernodecanarias.org/aplicaciones/appsistac/api), +allowing the user to obtain the open data from R. + +## Installation + +You can install the released version of istacr from +[CRAN](https://CRAN.R-project.org) with: + +``` r +install.packages("istacr") +``` + +And the development version from [GitHub](https://github.com/) with: + +``` r +# install.packages("remotes") +remotes::install_github("eDatos/istacr") +``` + +## How to use this package + +The package offers different functions depending on the resource you +want to access. There’re three main resources: + + - Indicators + - Statistical resources (cubes) + - Structural resources + +## Examples + +### Indicators + +Get a list of all indicators: + +``` r +library(istacr) +tst <- get_indicators() +str(tst, max.level = 1) +#> List of 8 +#> $ kind : chr "indicators#indicators" +#> $ limit : int 25 +#> $ offset : int 0 +#> $ total : int 211 +#> $ selfLink: chr "https://datos.canarias.es/api/estadisticas/indicators/v1.0/indicators?order&fields&representation&limit=25&offset=0" +#> $ nextLink: chr "https://datos.canarias.es/api/estadisticas/indicators/v1.0/indicators?order&fields&representation&limit=25&offset=25" +#> $ lastLink: chr "https://datos.canarias.es/api/estadisticas/indicators/v1.0/indicators?order&fields&representation&limit=25&offset=200" +#> $ items :'data.frame': 25 obs. of 12 variables: +``` + +Get information of a specific indicator: + +``` r +tst <- get_indicators_code("TURISTAS") +str(tst, max.level = 1) +#> List of 17 +#> $ id : chr "TURISTAS" +#> $ kind : chr "indicators#indicator" +#> $ selfLink : chr "https://datos.canarias.es/api/estadisticas/indicators/v1.0/indicators/TURISTAS" +#> $ parentLink :List of 2 +#> $ code : chr "TURISTAS" +#> $ version : chr "1.32" +#> $ title :List of 3 +#> $ acronym :List of 3 +#> $ subjectCode : chr "082" +#> $ systemSurveyLinks :'data.frame': 1 obs. of 2 variables: +#> $ conceptDescription:List of 3 +#> $ notes :List of 3 +#> $ dimension :List of 3 +#> $ attribute :List of 1 +#> $ childLink :List of 2 +#> $ subjectTitle :List of 2 +#> $ decimalPlaces : int 0 +``` + +Or about geographical granularities: + +``` r +# Get granularities +tst <- get_indicators_geographic_granularities() +tst$items +#> code title.en title.es title.__default__ +#> 1 COUNTRIES Countries Países Países +#> 2 REGIONS Regions Comunidades autónomas Comunidades autónomas +#> 3 PROVINCES Provinces Provincias Provincias +#> 4 MUNICIPALITIES Municipalities Municipios Municipios +#> 5 ISLANDS Islands Islas Islas +#> 6 COUNTIES Counties Comarcas Comarcas + +# Get information about a specific granularity +get_indicators_geographical_values('ISLANDS') +#> $kind +#> [1] "indicators#geographicalValues" +#> +#> $total +#> [1] 7 +#> +#> $selfLink +#> [1] "https://datos.canarias.es/api/estadisticas/indicators/v1.0/geographicalValues?geographicalGranularityCode=ISLANDS" +#> +#> $items +#> code title.es title.en title.__default__ granularityCode latitude +#> 1 ES708 Lanzarote Lanzarote Lanzarote ISLANDS 28.95802 +#> 2 ES704 Fuerteventura Fuerteventura Fuerteventura ISLANDS 28.49863 +#> 3 ES705 Gran Canaria Gran Canaria Gran Canaria ISLANDS 28.10786 +#> 4 ES709 Tenerife Tenerife Tenerife ISLANDS 28.46613 +#> 5 ES706 La Gomera La Gomera La Gomera ISLANDS 28.09131 +#> 6 ES707 La Palma La Palma La Palma ISLANDS 28.68142 +#> 7 ES703 El Hierro El Hierro El Hierro ISLANDS 27.80738 +#> longitude +#> 1 -13.56318 +#> 2 -13.86055 +#> 3 -15.41998 +#> 4 -16.24707 +#> 5 -17.11233 +#> 6 -17.76565 +#> 7 -17.91557 +``` + +### Statistical resources + +Get all available cubes: + +``` r +tst <- get_datasets() +str(tst, max.level = 1) +#> List of 8 +#> $ dataset :'data.frame': 25 obs. of 5 variables: +#> $ kind : chr "statisticalResources#datasets" +#> $ total : int 359 +#> $ limit : int 25 +#> $ offset : int 0 +#> $ selfLink: chr "https://datos.canarias.es/api/estadisticas/statistical-resources/v1.0/datasets?query&orderBy&limit=25&offset=0" +#> $ nextLink: chr "https://datos.canarias.es/api/estadisticas/statistical-resources/v1.0/datasets?query&orderBy&limit=25&offset=25" +#> $ lastLink: chr "https://datos.canarias.es/api/estadisticas/statistical-resources/v1.0/datasets?query&orderBy&limit=25&offset=350" +``` + +Only those from a specific maintainer: + +``` r +tst <- get_datasets_agency('ISTAC') +str(tst, max.level = 1) +#> List of 8 +#> $ dataset :'data.frame': 25 obs. of 5 variables: +#> $ kind : chr "statisticalResources#datasets" +#> $ total : int 359 +#> $ limit : int 25 +#> $ offset : int 0 +#> $ selfLink: chr "https://datos.canarias.es/api/estadisticas/statistical-resources/v1.0/datasets/ISTAC?query&orderBy&limit=25&offset=0" +#> $ nextLink: chr "https://datos.canarias.es/api/estadisticas/statistical-resources/v1.0/datasets/ISTAC?query&orderBy&limit=25&offset=25" +#> $ lastLink: chr "https://datos.canarias.es/api/estadisticas/statistical-resources/v1.0/datasets/ISTAC?query&orderBy&limit=25&offset=350" +``` + +### Structural resources + +``` r +tst <- istacr::get_structuralresources_codelists() +tst$codelist$id +#> [1] "CL_ABANDONO_CULTIVO" "CL_ABANDONO_CULTIVO" +#> [3] "CL_ABANDONO_CULTIVO" "CL_AEROPUERTOS" +#> [5] "CL_AEROPUERTOS" "CL_AEROPUERTOS" +#> [7] "CL_AEROPUERTOS" "CL_AGE" +#> [9] "CL_AGE" "CL_AGE" +#> [11] "CL_AGE" "CL_AGE" +#> [13] "CL_AGRIPROD" "CL_AGRIPROD" +#> [15] "CL_ANTIGUEDAD" "CL_AREA_ES" +#> [17] "CL_AREA_ES" "CL_AREA_ES" +#> [19] "CL_AREA_ES" "CL_AREA_ES" +#> [21] "CL_AREA_ES70_COMARCAS" "CL_AREA_ES70_DS_19870610" +#> [23] "CL_AREA_ES70_DS_19910526" "CL_AREA_ES70_DS_19930606" +#> [25] "CL_AREA_ES70_DS_19940612" +``` + +``` r +tst <- get_structuralresources_codelists_agency_resource('ISTAC', 'CL_ABANDONO_CULTIVO') +tst$codelist +#> id +#> 1 CL_ABANDONO_CULTIVO +#> 2 CL_ABANDONO_CULTIVO +#> 3 CL_ABANDONO_CULTIVO +#> urn +#> 1 urn:sdmx:org.sdmx.infomodel.codelist.Codelist=ISTAC:CL_ABANDONO_CULTIVO(01.000) +#> 2 urn:sdmx:org.sdmx.infomodel.codelist.Codelist=ISTAC:CL_ABANDONO_CULTIVO(01.002) +#> 3 urn:sdmx:org.sdmx.infomodel.codelist.Codelist=ISTAC:CL_ABANDONO_CULTIVO(01.001) +#> selfLink.kind +#> 1 structuralResources#codelist +#> 2 structuralResources#codelist +#> 3 structuralResources#codelist +#> selfLink.href +#> 1 https://datos.canarias.es/api/estadisticas/structural-resources/v1.0/codelists/ISTAC/CL_ABANDONO_CULTIVO/01.000 +#> 2 https://datos.canarias.es/api/estadisticas/structural-resources/v1.0/codelists/ISTAC/CL_ABANDONO_CULTIVO/01.002 +#> 3 https://datos.canarias.es/api/estadisticas/structural-resources/v1.0/codelists/ISTAC/CL_ABANDONO_CULTIVO/01.001 +#> text kind +#> 1 Clasificación de Abandono de Cultivo, es structuralResources#codelist +#> 2 Clasificación de Abandono de Cultivo, es structuralResources#codelist +#> 3 Clasificación de Abandono de Cultivo, es structuralResources#codelist +``` + +## Further information + +Please find the latest documentation on +[CRAN](https://cran.r-project.org/web/packages/istacr/istacr.pdf). In +case you want to report a bug, please open an +[issue](https://github.com/eDatos/istacr/issues). diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..04c5585 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,14 @@ +comment: false + +coverage: + status: + project: + default: + target: auto + threshold: 1% + informational: true + patch: + default: + target: auto + threshold: 1% + informational: true diff --git a/istacr-manual.pdf b/istacr-manual.pdf deleted file mode 100644 index 1b145c0..0000000 Binary files a/istacr-manual.pdf and /dev/null differ diff --git a/istacr.Rproj b/istacr.Rproj index decba50..087ebeb 100644 --- a/istacr.Rproj +++ b/istacr.Rproj @@ -1,23 +1,23 @@ -Version: 1.0 - -RestoreWorkspace: Default -SaveWorkspace: Yes -AlwaysSaveHistory: Default - -EnableCodeIndexing: Yes -UseSpacesForTab: Yes -NumSpacesForTab: 2 -Encoding: UTF-8 - -RnwWeave: knitr -LaTeX: pdfLaTeX - -AutoAppendNewline: Yes -StripTrailingWhitespace: Yes - -BuildType: Package -PackageUseDevtools: Yes -PackageInstallArgs: --no-multiarch --with-keep.source -PackageCheckArgs: --as-cran -PackageRoxygenize: rd,collate,namespace,vignette -DisableExecuteRprofile: Yes +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Yes +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: knitr +LaTeX: pdfLaTeX + +AutoAppendNewline: Yes +StripTrailingWhitespace: Yes + +BuildType: Package +PackageUseDevtools: Yes +PackageInstallArgs: --no-multiarch --with-keep.source +PackageCheckArgs: --as-cran +PackageRoxygenize: rd,collate,namespace,vignette +DisableExecuteRprofile: Yes diff --git a/man/get_categorisations.Rd b/man/get_categorisations.Rd deleted file mode 100644 index 1cf14dd..0000000 --- a/man/get_categorisations.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_category.R -\name{get_categorisations} -\alias{get_categorisations} -\title{Get categorisations} -\usage{ -get_categorisations(limit = 25, offset = 0, query = NULL, - orderBy = NULL) -} -\arguments{ -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/categorisations -} -\examples{ -get_categorisations() -get_categorisations(query = "ID EQ 2090", orderBy = "ID ASC") -} diff --git a/man/get_categorisations_agency.Rd b/man/get_categorisations_agency.Rd deleted file mode 100644 index 9729e8d..0000000 --- a/man/get_categorisations_agency.Rd +++ /dev/null @@ -1,26 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_category.R -\name{get_categorisations_agency} -\alias{get_categorisations_agency} -\title{Get categorisations agency} -\usage{ -get_categorisations_agency(agencyID, limit = 25, offset = 0, - query = NULL, orderBy = NULL) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/categorisations/{agencyID} -} -\examples{ -get_categorisations_agency("ISTAC") -} diff --git a/man/get_categorisations_agency_resource.Rd b/man/get_categorisations_agency_resource.Rd deleted file mode 100644 index c375bb1..0000000 --- a/man/get_categorisations_agency_resource.Rd +++ /dev/null @@ -1,28 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_category.R -\name{get_categorisations_agency_resource} -\alias{get_categorisations_agency_resource} -\title{Get categorisations agency resource} -\usage{ -get_categorisations_agency_resource(agencyID, resourceID, limit = 25, - offset = 0, query = NULL, orderBy = NULL) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/categorisations/{agencyID}/{resourceID} -} -\examples{ -get_categorisations_agency_resource("ISTAC", "cat2") -} diff --git a/man/get_categorisations_agency_resource_version.Rd b/man/get_categorisations_agency_resource_version.Rd deleted file mode 100644 index 57c09a8..0000000 --- a/man/get_categorisations_agency_resource_version.Rd +++ /dev/null @@ -1,21 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_category.R -\name{get_categorisations_agency_resource_version} -\alias{get_categorisations_agency_resource_version} -\title{Get categorisations agency resource version} -\usage{ -get_categorisations_agency_resource_version(agencyID, resourceID, version) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{version}{(string) Specific version of the resource.} -} -\description{ -This function returns the content from /v1.0/categorisations/{agencyID}/{resourceID}/{version} -} -\examples{ -get_categorisations_agency_resource_version("ISTAC", "cat2", "01.000") -} diff --git a/man/get_category_schemes.Rd b/man/get_category_schemes.Rd deleted file mode 100644 index 04138ae..0000000 --- a/man/get_category_schemes.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_category.R -\name{get_category_schemes} -\alias{get_category_schemes} -\title{Get category schemes} -\usage{ -get_category_schemes(limit = 25, offset = 0, query = NULL, - orderBy = NULL) -} -\arguments{ -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/categoryschemes -} -\examples{ -get_category_schemes() -get_category_schemes(query = "ID EQ 2090", orderBy = "ID ASC") -} diff --git a/man/get_codelist_families.Rd b/man/get_codelist_families.Rd deleted file mode 100644 index dc1bfaf..0000000 --- a/man/get_codelist_families.Rd +++ /dev/null @@ -1,24 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_classifications.R -\name{get_codelist_families} -\alias{get_codelist_families} -\title{Get codelist families} -\usage{ -get_codelist_families(limit = 25, offset = 0, orderBy = NULL, - query = NULL) -} -\arguments{ -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{orderBy}{(string) Field by which to sort the results.} - -\item{query}{(string) Query to filter the results.} -} -\description{ -This function returns the list of families of classifications -} -\examples{ -get_codelist_families() -} diff --git a/man/get_codelist_families_id.Rd b/man/get_codelist_families_id.Rd deleted file mode 100644 index 10422a3..0000000 --- a/man/get_codelist_families_id.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_classifications.R -\name{get_codelist_families_id} -\alias{get_codelist_families_id} -\title{Get codelist families} -\usage{ -get_codelist_families_id(id = NULL) -} -\arguments{ -\item{id}{(string) codelist family identificator} -} -\description{ -This function allows to obtain a family of classifications in particular. -} -\examples{ -get_codelist_families_id() -} diff --git a/man/get_codelists.Rd b/man/get_codelists.Rd deleted file mode 100644 index 10e9057..0000000 --- a/man/get_codelists.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_classifications.R -\name{get_codelists} -\alias{get_codelists} -\title{Get codelists} -\usage{ -get_codelists(limit = 25, offset = 0, query = NULL, orderBy = NULL) -} -\arguments{ -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function allows to obtain the list of classifications. -} -\examples{ -get_codelists() -} diff --git a/man/get_codelists_agency.Rd b/man/get_codelists_agency.Rd deleted file mode 100644 index 7be7358..0000000 --- a/man/get_codelists_agency.Rd +++ /dev/null @@ -1,28 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_classifications.R -\name{get_codelists_agency} -\alias{get_codelists_agency} -\title{Get codelists agency} -\usage{ -get_codelists_agency(agencyID, limit = 25, offset = 0, query = NULL, - orderBy = NULL) -} -\arguments{ -\item{agencyID}{(string) Agency identificator.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function allows obtaining the list of all the classifications - maintained by a certain organization. -} -\examples{ -get_codelists_agency("ISTAC") -get_codelists_agency("ESTAT") -} diff --git a/man/get_codelists_agency_resource.Rd b/man/get_codelists_agency_resource.Rd deleted file mode 100644 index 29f6bf9..0000000 --- a/man/get_codelists_agency_resource.Rd +++ /dev/null @@ -1,30 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_classifications.R -\name{get_codelists_agency_resource} -\alias{get_codelists_agency_resource} -\title{Get codelists agency resource} -\usage{ -get_codelists_agency_resource(agencyID, resourceID, limit = 25, - offset = 0, query = NULL, orderBy = NULL) -} -\arguments{ -\item{agencyID}{(string) Agency identificator.} - -\item{resourceID}{(string) Resource identificator.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function allows to obtain all the versions of a - classification with a certain identifier and that is also kept by a - certain organization. -} -\examples{ -get_codelists_agency_resource("ISTAC", "CL_AREA_ES") -} diff --git a/man/get_codelists_agency_resource_version.Rd b/man/get_codelists_agency_resource_version.Rd deleted file mode 100644 index 3038e6f..0000000 --- a/man/get_codelists_agency_resource_version.Rd +++ /dev/null @@ -1,21 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_classifications.R -\name{get_codelists_agency_resource_version} -\alias{get_codelists_agency_resource_version} -\title{Get codelists agency resource version} -\usage{ -get_codelists_agency_resource_version(agencyID, resourceID, version) -} -\arguments{ -\item{agencyID}{(string) Agency identificator.} - -\item{resourceID}{(string) Resource identificator.} - -\item{version}{(string) Specific resource version.} -} -\description{ -This function allows you to consult a particular version of a classification. -} -\examples{ -get_codelists_agency_resource_version("ISTAC", "CL_AREA_ES", "01.000") -} diff --git a/man/get_codelists_agency_resource_version_codes.Rd b/man/get_codelists_agency_resource_version_codes.Rd deleted file mode 100644 index 7e84b63..0000000 --- a/man/get_codelists_agency_resource_version_codes.Rd +++ /dev/null @@ -1,40 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_classifications.R -\name{get_codelists_agency_resource_version_codes} -\alias{get_codelists_agency_resource_version_codes} -\title{Get codelists agency resource version codes} -\usage{ -get_codelists_agency_resource_version_codes(agencyID, resourceID, version, - limit = 25, offset = 0, query = NULL, orderBy = NULL, - openness = NULL, order = NULL, fields = NULL) -} -\arguments{ -\item{agencyID}{(string) Agency identificator.} - -\item{resourceID}{(string) Resource identificator.} - -\item{version}{(string) Specific resource version.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} - -\item{openness}{(string) Opening established for viewing.} - -\item{order}{(string) Order established for visualization.} - -\item{fields}{(string) Additional fields that you want to show in the answer.} -} -\description{ -This function allows to consult the codes of a version of a - classification. Note that if wildcards are used as \code{~all} or one of the - \code{limit}, \code{offset}, \code{query} or \code{orderBy} parameters, - the list will be automatically paginated. -} -\examples{ -get_codelists_agency_resource_version_codes("ISTAC", "CL_AREA_ES", "01.000") -} diff --git a/man/get_codelists_agency_resource_version_codes_codeid.Rd b/man/get_codelists_agency_resource_version_codes_codeid.Rd deleted file mode 100644 index 5a8de90..0000000 --- a/man/get_codelists_agency_resource_version_codes_codeid.Rd +++ /dev/null @@ -1,24 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_classifications.R -\name{get_codelists_agency_resource_version_codes_codeid} -\alias{get_codelists_agency_resource_version_codes_codeid} -\title{Get codelists agency resource version codes (codeID)} -\usage{ -get_codelists_agency_resource_version_codes_codeid(agencyID, resourceID, - version, codeID) -} -\arguments{ -\item{agencyID}{(string) Agency identificator.} - -\item{resourceID}{(string) Resource identificator.} - -\item{version}{(string) Specific resource version.} - -\item{codeID}{(string) Code identificator.} -} -\description{ -This function allows to consult a specific code of a version of a classification. -} -\examples{ -get_codelists_agency_resource_version_codes_codeid("ISTAC", "CL_AREA_ES", "01.000", "ES706A01") -} diff --git a/man/get_concept_types.Rd b/man/get_concept_types.Rd deleted file mode 100644 index 8ab0bbb..0000000 --- a/man/get_concept_types.Rd +++ /dev/null @@ -1,14 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_concepts.R -\name{get_concept_types} -\alias{get_concept_types} -\title{Get concept types} -\usage{ -get_concept_types() -} -\description{ -This function returns the content from /v1.0/conceptTypes -} -\examples{ -get_concept_types() -} diff --git a/man/get_content_constraints.Rd b/man/get_content_constraints.Rd deleted file mode 100644 index e94a0ce..0000000 --- a/man/get_content_constraints.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_datastructures.R -\name{get_content_constraints} -\alias{get_content_constraints} -\title{Get content constraints} -\usage{ -get_content_constraints(limit = 25, offset = 0, query = NULL, - orderBy = NULL) -} -\arguments{ -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/contentConstraints -} -\examples{ -get_content_constraints() -get_content_constraints(query = "ID EQ 2090", orderBy = "ID ASC") -} diff --git a/man/get_content_constraints_agency.Rd b/man/get_content_constraints_agency.Rd deleted file mode 100644 index 60c2165..0000000 --- a/man/get_content_constraints_agency.Rd +++ /dev/null @@ -1,26 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_datastructures.R -\name{get_content_constraints_agency} -\alias{get_content_constraints_agency} -\title{Get content constraints agency} -\usage{ -get_content_constraints_agency(agencyID, limit = 25, offset = 0, - query = NULL, orderBy = NULL) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/contentConstraints/{agencyID} -} -\examples{ -get_content_constraints_agency("ISTAC") -} diff --git a/man/get_content_constraints_agency_resource.Rd b/man/get_content_constraints_agency_resource.Rd deleted file mode 100644 index 76bddfa..0000000 --- a/man/get_content_constraints_agency_resource.Rd +++ /dev/null @@ -1,28 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_datastructures.R -\name{get_content_constraints_agency_resource} -\alias{get_content_constraints_agency_resource} -\title{Get content constraints agency resource} -\usage{ -get_content_constraints_agency_resource(agencyID, resourceID, limit = 25, - offset = 0, query = NULL, orderBy = NULL) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/contentConstraints/{agencyID}/{resourceID} -} -\examples{ -get_content_constraints_agency_resource("ISTAC", "CL_AREA") -} diff --git a/man/get_content_constraints_agency_resource_version.Rd b/man/get_content_constraints_agency_resource_version.Rd deleted file mode 100644 index 7605959..0000000 --- a/man/get_content_constraints_agency_resource_version.Rd +++ /dev/null @@ -1,22 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_datastructures.R -\name{get_content_constraints_agency_resource_version} -\alias{get_content_constraints_agency_resource_version} -\title{Get content constraints agency resource version} -\usage{ -get_content_constraints_agency_resource_version(agencyID, resourceID, - version) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{version}{(string) Specific version of the resource.} -} -\description{ -This function returns the content from /v1.0/contentConstraints/{agencyID}/{resourceID}/{version} -} -\examples{ -get_content_constraints_agency_resource_version("ISTAC", "CL_AREA", "01.000") -} diff --git a/man/get_content_constraints_agency_resource_version_regions.Rd b/man/get_content_constraints_agency_resource_version_regions.Rd deleted file mode 100644 index 2dd4096..0000000 --- a/man/get_content_constraints_agency_resource_version_regions.Rd +++ /dev/null @@ -1,24 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_datastructures.R -\name{get_content_constraints_agency_resource_version_regions} -\alias{get_content_constraints_agency_resource_version_regions} -\title{Get content constraints agency resource version regions} -\usage{ -get_content_constraints_agency_resource_version_regions(regionCode, - agencyID, resourceID, version) -} -\arguments{ -\item{regionCode}{(string) Region code.} - -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{version}{(string) Specific version of the resource.} -} -\description{ -This function returns the content from /v1.0/contentConstraints/{agencyID}/{resourceID}/{version}/regions/{regionCode} -} -\examples{ -get_content_constraints_agency_resource_version_regions("0001", "ISTAC", "CL_AREA", "01.000") -} diff --git a/man/get_cschemes.Rd b/man/get_cschemes.Rd deleted file mode 100644 index 5b830d1..0000000 --- a/man/get_cschemes.Rd +++ /dev/null @@ -1,24 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_concepts.R -\name{get_cschemes} -\alias{get_cschemes} -\title{Get concept schemes} -\usage{ -get_cschemes(limit = 25, offset = 0, query = NULL, orderBy = NULL) -} -\arguments{ -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/conceptschemes -} -\examples{ -get_cschemes() -get_cschemes(query = "ID EQ 2090", orderBy = "ID ASC") -} diff --git a/man/get_cschemes_agency.Rd b/man/get_cschemes_agency.Rd deleted file mode 100644 index 82eefea..0000000 --- a/man/get_cschemes_agency.Rd +++ /dev/null @@ -1,27 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_concepts.R -\name{get_cschemes_agency} -\alias{get_cschemes_agency} -\title{Get concept schemes agency} -\usage{ -get_cschemes_agency(agencyID, limit = 25, offset = 0, query = NULL, - orderBy = NULL) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/conceptschemes/{agencyID} -} -\examples{ -get_cschemes_agency("ISTAC") -get_cschemes_agency("ESTAT", query = "ID EQ 2090", orderBy = "ID ASC") -} diff --git a/man/get_cschemes_agency_res_ver_cn.Rd b/man/get_cschemes_agency_res_ver_cn.Rd deleted file mode 100644 index 82f39c7..0000000 --- a/man/get_cschemes_agency_res_ver_cn.Rd +++ /dev/null @@ -1,30 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_concepts.R -\name{get_cschemes_agency_res_ver_cn} -\alias{get_cschemes_agency_res_ver_cn} -\title{Get concept schemes agency resource version concepts} -\usage{ -get_cschemes_agency_res_ver_cn(agencyID, resourceID, version, limit = 25, - offset = 0, query = NULL, orderBy = NULL) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{version}{(string) Specific version of the resource.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/conceptschemes/{agencyID}/{resourceID}/{version}/concepts -} -\examples{ -get_cschemes_agency_res_ver_cn(agencyID = "ISTAC", resourceID = "CL_AREA_ES", version = "01.000") -} diff --git a/man/get_cschemes_agency_resource.Rd b/man/get_cschemes_agency_resource.Rd deleted file mode 100644 index a5f171c..0000000 --- a/man/get_cschemes_agency_resource.Rd +++ /dev/null @@ -1,28 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_concepts.R -\name{get_cschemes_agency_resource} -\alias{get_cschemes_agency_resource} -\title{Get concept schemes agency resource} -\usage{ -get_cschemes_agency_resource(agencyID, resourceID, limit = 25, - offset = 0, query = NULL, orderBy = NULL) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/conceptschemes/{agencyID}/{resourceID} -} -\examples{ -get_cschemes_agency_resource(agencyID = "ISTAC", resourceID = "CL_AREA_ES") -} diff --git a/man/get_cschemes_agency_resource_ver.Rd b/man/get_cschemes_agency_resource_ver.Rd deleted file mode 100644 index 2718877..0000000 --- a/man/get_cschemes_agency_resource_ver.Rd +++ /dev/null @@ -1,21 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_concepts.R -\name{get_cschemes_agency_resource_ver} -\alias{get_cschemes_agency_resource_ver} -\title{Get concept schemes agency resource version} -\usage{ -get_cschemes_agency_resource_ver(agencyID, resourceID, version) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{version}{(string) Specific version of the resource.} -} -\description{ -This function returns the content from /v1.0/conceptschemes/{agencyID}/{resourceID}/{version} -} -\examples{ -get_cschemes_agency_resource_ver(agencyID = "ISTAC", resourceID = "CL_AREA", version = "01.000") -} diff --git a/man/get_cschemes_id.Rd b/man/get_cschemes_id.Rd deleted file mode 100644 index d491af0..0000000 --- a/man/get_cschemes_id.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_concepts.R -\name{get_cschemes_id} -\alias{get_cschemes_id} -\title{Get concept schemes agency resource version concepts (id)} -\usage{ -get_cschemes_id(agencyID, resourceID, version, conceptID) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{version}{(string) Specific version of the resource.} - -\item{conceptID}{(string) Concept identifier.} -} -\description{ -This function returns the content from /v1.0/conceptschemes/{agencyID}/{resourceID}/{version}/concepts/{conceptID} -} -\examples{ -get_cschemes_id(agencyID = "ISTAC", resourceID = "CL_AREA_ES", version = "01.000", conceptID = 0) -} diff --git a/man/get_data_structures.Rd b/man/get_data_structures.Rd deleted file mode 100644 index d5c3217..0000000 --- a/man/get_data_structures.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_datastructures.R -\name{get_data_structures} -\alias{get_data_structures} -\title{Get data structures} -\usage{ -get_data_structures(limit = 25, offset = 0, query = NULL, - orderBy = NULL) -} -\arguments{ -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/datastructures -} -\examples{ -get_data_structures() -get_data_structures(query = "ID EQ 2090", orderBy = "ID ASC") -} diff --git a/man/get_data_structures_agency.Rd b/man/get_data_structures_agency.Rd deleted file mode 100644 index 61166bf..0000000 --- a/man/get_data_structures_agency.Rd +++ /dev/null @@ -1,26 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_datastructures.R -\name{get_data_structures_agency} -\alias{get_data_structures_agency} -\title{Get data structures agency} -\usage{ -get_data_structures_agency(agencyID, limit = 25, offset = 0, - query = NULL, orderBy = NULL) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/datastructures/{agencyID} -} -\examples{ -get_data_structures_agency("ISTAC") -} diff --git a/man/get_data_structures_agency_resource.Rd b/man/get_data_structures_agency_resource.Rd deleted file mode 100644 index e8546db..0000000 --- a/man/get_data_structures_agency_resource.Rd +++ /dev/null @@ -1,28 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_datastructures.R -\name{get_data_structures_agency_resource} -\alias{get_data_structures_agency_resource} -\title{Get data structures agency resource} -\usage{ -get_data_structures_agency_resource(agencyID, resourceID, limit = 25, - offset = 0, query = NULL, orderBy = NULL) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/datastructures/{agencyID}/{resourceID} -} -\examples{ -get_data_structures_agency_resource("ISTAC", "CL_AREA") -} diff --git a/man/get_data_structures_agency_resource_version.Rd b/man/get_data_structures_agency_resource_version.Rd deleted file mode 100644 index bfcf634..0000000 --- a/man/get_data_structures_agency_resource_version.Rd +++ /dev/null @@ -1,21 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_datastructures.R -\name{get_data_structures_agency_resource_version} -\alias{get_data_structures_agency_resource_version} -\title{Get data structures agency resource version} -\usage{ -get_data_structures_agency_resource_version(agencyID, resourceID, version) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{version}{(string) Specific version of the resource.} -} -\description{ -This function returns the content from /v1.0/datastructures/{agencyID}/{resourceID}/{version} -} -\examples{ -get_data_structures_agency_resource_version("ISTAC", "CL_AREA", "01.000") -} diff --git a/man/get_datasets.Rd b/man/get_datasets.Rd index b3a8a8b..ec76db1 100644 --- a/man/get_datasets.Rd +++ b/man/get_datasets.Rd @@ -1,25 +1,25 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/statistical_resources_cubes.R -\name{get_datasets} -\alias{get_datasets} -\title{Get datasets} -\usage{ -get_datasets(lang = "es", limit = 25, offset = 0, orderBy = NULL, query = NULL) -} -\arguments{ -\item{lang}{(string) Language in which you want to get the answer.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{orderBy}{(string) Order. Possible values are \code{ID ASC} or \code{ID DESC},} - -\item{query}{(string) Metadata query on which the searches can be built.} -} -\description{ -This function allows consulting all existing statistical data cubes. -} -\examples{ -get_datasets() -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/statistical_resources_cubes.R +\name{get_datasets} +\alias{get_datasets} +\title{Get datasets} +\usage{ +get_datasets(lang = "es", limit = 25, offset = 0, orderBy = NULL, query = NULL) +} +\arguments{ +\item{lang}{(string) Language in which you want to get the answer.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{orderBy}{(string) Order. Possible values are \code{ID ASC} or \code{ID DESC},} + +\item{query}{(string) Metadata query on which the searches can be built.} +} +\description{ +This function allows consulting all existing statistical data cubes. +} +\examples{ +get_datasets() +} diff --git a/man/get_datasets_agency.Rd b/man/get_datasets_agency.Rd index 6d7a525..d160385 100644 --- a/man/get_datasets_agency.Rd +++ b/man/get_datasets_agency.Rd @@ -1,34 +1,34 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/statistical_resources_cubes.R -\name{get_datasets_agency} -\alias{get_datasets_agency} -\title{Get datasets (agencyID)} -\usage{ -get_datasets_agency( - agencyID, - lang = "es", - limit = 25, - offset = 0, - orderBy = NULL, - query = NULL -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the maintainer organization of the resource. A possible value is \code{ISTAC}.} - -\item{lang}{(string) Language in which you want to get the answer.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{orderBy}{(string) Order. Possible values are \code{ID ASC} or \code{ID DESC},} - -\item{query}{(string) Metadata query on which the searches can be built.} -} -\description{ -This function allows to consult all the data sets maintained by a certain organization. -} -\examples{ -get_datasets_agency(agencyID = "ISTAC") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/statistical_resources_cubes.R +\name{get_datasets_agency} +\alias{get_datasets_agency} +\title{Get datasets (agencyID)} +\usage{ +get_datasets_agency( + agencyID, + lang = "es", + limit = 25, + offset = 0, + orderBy = NULL, + query = NULL +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the maintainer organization of the resource. A possible value is \code{ISTAC}.} + +\item{lang}{(string) Language in which you want to get the answer.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{orderBy}{(string) Order. Possible values are \code{ID ASC} or \code{ID DESC},} + +\item{query}{(string) Metadata query on which the searches can be built.} +} +\description{ +This function allows to consult all the data sets maintained by a certain organization. +} +\examples{ +get_datasets_agency(agencyID = "ISTAC") +} diff --git a/man/get_datasets_agency_resource.Rd b/man/get_datasets_agency_resource.Rd index 991725a..9295a91 100644 --- a/man/get_datasets_agency_resource.Rd +++ b/man/get_datasets_agency_resource.Rd @@ -1,37 +1,37 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/statistical_resources_cubes.R -\name{get_datasets_agency_resource} -\alias{get_datasets_agency_resource} -\title{Get datasets (agencyID / resourceID)} -\usage{ -get_datasets_agency_resource( - agencyID, - resourceID, - lang = "es", - limit = 25, - offset = 0, - orderBy = NULL, - query = NULL -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the maintainer organization of the resource. A possible value is \code{ISTAC}.} - -\item{resourceID}{(string) Resource identifier. A possible value is \code{C00010A_000002}.} - -\item{lang}{(string) Language in which you want to get the answer.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{orderBy}{(string) Order. Possible values are \code{ID ASC} or \code{ID DESC},} - -\item{query}{(string) Metadata query on which the searches can be built.} -} -\description{ -This function allows to obtain all the versions of a statistical cube with a certain identifier and that also maintains a certain organization. -} -\examples{ -get_datasets_agency_resource(agencyID = "ISTAC", resourceID = "C00010A_000002") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/statistical_resources_cubes.R +\name{get_datasets_agency_resource} +\alias{get_datasets_agency_resource} +\title{Get datasets (agencyID / resourceID)} +\usage{ +get_datasets_agency_resource( + agencyID, + resourceID, + lang = "es", + limit = 25, + offset = 0, + orderBy = NULL, + query = NULL +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the maintainer organization of the resource. A possible value is \code{ISTAC}.} + +\item{resourceID}{(string) Resource identifier. A possible value is \code{C00010A_000002}.} + +\item{lang}{(string) Language in which you want to get the answer.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{orderBy}{(string) Order. Possible values are \code{ID ASC} or \code{ID DESC},} + +\item{query}{(string) Metadata query on which the searches can be built.} +} +\description{ +This function allows to obtain all the versions of a statistical cube with a certain identifier and that also maintains a certain organization. +} +\examples{ +get_datasets_agency_resource(agencyID = "ISTAC", resourceID = "C00010A_000002") +} diff --git a/man/get_datasets_agency_resource_version.Rd b/man/get_datasets_agency_resource_version.Rd index cb952d6..6682941 100644 --- a/man/get_datasets_agency_resource_version.Rd +++ b/man/get_datasets_agency_resource_version.Rd @@ -1,37 +1,37 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/statistical_resources_cubes.R -\name{get_datasets_agency_resource_version} -\alias{get_datasets_agency_resource_version} -\title{Get datasets (agencyID / resourceID / version)} -\usage{ -get_datasets_agency_resource_version( - agencyID, - resourceID, - version, - dim = NULL, - fields = NULL, - lang = "es" -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the maintainer organization of the resource. A possible value is \code{ISTAC}.} - -\item{resourceID}{(string) Resource identifier. A possible value is \code{C00010A_000002}.} - -\item{version}{(string) Resource version. A possible value is \code{001.000}.} - -\item{dim}{(string) Allows filtering the data obtained in the response. A example is \code{TIME_PERIOD:2009|2010}.} - -\item{fields}{(string) Allows you to customize the response by excluding fields from it. The possible values are \code{-metadata} and \code{-data}.} - -\item{lang}{(string) Language in which you want to get the answer.} -} -\description{ -This function allows to obtain all the versions of a statistical cube with a certain identifier and that also maintains a certain organization. -} -\examples{ -get_datasets_agency_resource_version( - agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000", - fields = "-data,-metadata" -) -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/statistical_resources_cubes.R +\name{get_datasets_agency_resource_version} +\alias{get_datasets_agency_resource_version} +\title{Get datasets (agencyID / resourceID / version)} +\usage{ +get_datasets_agency_resource_version( + agencyID, + resourceID, + version, + dim = NULL, + fields = NULL, + lang = "es" +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the maintainer organization of the resource. A possible value is \code{ISTAC}.} + +\item{resourceID}{(string) Resource identifier. A possible value is \code{C00010A_000002}.} + +\item{version}{(string) Resource version. A possible value is \code{001.000}.} + +\item{dim}{(string) Allows filtering the data obtained in the response. A example is \code{TIME_PERIOD:2009|2010}.} + +\item{fields}{(string) Allows you to customize the response by excluding fields from it. The possible values are \code{-metadata} and \code{-data}.} + +\item{lang}{(string) Language in which you want to get the answer.} +} +\description{ +This function allows to obtain all the versions of a statistical cube with a certain identifier and that also maintains a certain organization. +} +\examples{ +get_datasets_agency_resource_version( + agencyID = "ISTAC", resourceID = "C00010A_000002", version = "001.000", + fields = "-data,-metadata" +) +} diff --git a/man/get_geoinfo.Rd b/man/get_geoinfo.Rd deleted file mode 100644 index 86625e3..0000000 --- a/man/get_geoinfo.Rd +++ /dev/null @@ -1,30 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_variables.R -\name{get_geoinfo} -\alias{get_geoinfo} -\title{Get geoinfo} -\usage{ -get_geoinfo(variableID, resourceID, fields = NULL, limit = 25, - offset = 0, query = NULL, orderBy = NULL) -} -\arguments{ -\item{variableID}{(string) Variable identificator.} - -\item{resourceID}{(string) Resource identificator.} - -\item{fields}{(string) Additional fields that you want to show in the answer.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns data from /v1.0/variables/{variableID}/variableelements/{resourceID}/geoinfo -} -\examples{ -get_geoinfo("VR_TERRITORIO", "MUN_ICOD_VINOS") -} diff --git a/man/get_indicators.Rd b/man/get_indicators.Rd index 9c585ca..3e066d0 100644 --- a/man/get_indicators.Rd +++ b/man/get_indicators.Rd @@ -1,45 +1,45 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/indicators_indicators.R -\name{get_indicators} -\alias{get_indicators} -\title{Get indicators} -\usage{ -get_indicators( - q = NULL, - order = NULL, - limit = 25, - offset = 0, - fields = NULL, - representation = NULL -) -} -\arguments{ -\item{q}{(string) Metadata query on which the searches can be built using: -\code{id}, \code{subjectCode} or \code{geographicValue}.} - -\item{order}{(string) Order. Possible values are: \code{update} and -\code{id} and order criteria are \code{ASC} and \code{DESC}.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{fields}{(string) Use of the answer by adding new fields. -Possible values are: \code{+metadata}, \code{+data} and \code{+observationsMetadata}.} - -\item{representation}{(string) Allows filtering the observations by their value. -Its use only makes sense when \code{+data} and/or \code{+observationsMetadata} has been included.} -} -\description{ -This function returns a list of indicators published in the - ISTAC-indicators database. An indicator is a measure used to know the - intensity of a phenomenon in spacetime. This measure can refer to - different spatial or temporal granularities. -} -\examples{ -indicators <- get_indicators( - q = 'id IN ("AFILIACIONES", "EMPLEO_REGISTRADO_AGRICULTURA")', - order = "id ASC", fields = "+data", representation = - "GEOGRAPHICAL[35003|35005],MEASURE[ABSOLUTE]" -) -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators_indicators.R +\name{get_indicators} +\alias{get_indicators} +\title{Get indicators} +\usage{ +get_indicators( + q = NULL, + order = NULL, + limit = 25, + offset = 0, + fields = NULL, + representation = NULL +) +} +\arguments{ +\item{q}{(string) Metadata query on which the searches can be built using: +\code{id}, \code{subjectCode} or \code{geographicValue}.} + +\item{order}{(string) Order. Possible values are: \code{update} and +\code{id} and order criteria are \code{ASC} and \code{DESC}.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{fields}{(string) Use of the answer by adding new fields. +Possible values are: \code{+metadata}, \code{+data} and \code{+observationsMetadata}.} + +\item{representation}{(string) Allows filtering the observations by their value. +Its use only makes sense when \code{+data} and/or \code{+observationsMetadata} has been included.} +} +\description{ +This function returns a list of indicators published in the + ISTAC-indicators database. An indicator is a measure used to know the + intensity of a phenomenon in spacetime. This measure can refer to + different spatial or temporal granularities. +} +\examples{ +indicators <- get_indicators( + q = 'id IN ("AFILIACIONES", "EMPLEO_REGISTRADO_AGRICULTURA")', + order = "id ASC", fields = "+data", representation = + "GEOGRAPHICAL[35003|35005],MEASURE[ABSOLUTE]" +) +} diff --git a/man/get_indicators_code.Rd b/man/get_indicators_code.Rd index d70ab2b..c25ddd4 100644 --- a/man/get_indicators_code.Rd +++ b/man/get_indicators_code.Rd @@ -1,21 +1,21 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/indicators_indicators.R -\name{get_indicators_code} -\alias{get_indicators_code} -\title{Get indicators code} -\usage{ -get_indicators_code(indicatorCode) -} -\arguments{ -\item{indicatorCode}{(string) an indicator code} -} -\description{ -This function returns the metadata that describe the characteristics - of a specific indicator, allowing the compression of the measured fact; - also through the data request the complete data (for all spacetime) of the - indicator is provided. -} -\examples{ -get_indicators_code("AFILIACIONES") -get_indicators_code("PARO_REGISTRADO") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators_indicators.R +\name{get_indicators_code} +\alias{get_indicators_code} +\title{Get indicators code} +\usage{ +get_indicators_code(indicatorCode) +} +\arguments{ +\item{indicatorCode}{(string) an indicator code} +} +\description{ +This function returns the metadata that describe the characteristics + of a specific indicator, allowing the compression of the measured fact; + also through the data request the complete data (for all spacetime) of the + indicator is provided. +} +\examples{ +get_indicators_code("AFILIACIONES") +get_indicators_code("PARO_REGISTRADO") +} diff --git a/man/get_indicators_code_data.Rd b/man/get_indicators_code_data.Rd index f8cb89a..a44eac7 100644 --- a/man/get_indicators_code_data.Rd +++ b/man/get_indicators_code_data.Rd @@ -1,32 +1,32 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/indicators_indicators.R -\name{get_indicators_code_data} -\alias{get_indicators_code_data} -\title{Get indicators code data} -\usage{ -get_indicators_code_data( - indicatorCode, - representation = NULL, - granularity = NULL, - fields = NULL -) -} -\arguments{ -\item{indicatorCode}{(string) an indicator code} - -\item{representation}{(string) Allows filtering the observations by their value.} - -\item{granularity}{(string) Allows to filter the observations through the granularities of the same.} - -\item{fields}{(string) Allows you to customize the response by excluding fields. -The possible values are: \code{-observationsMetadata}.} -} -\description{ -This function returns complete data (for all spacetime) of the indicator. - On the other hand, metadata describing the characteristics of a specific - indicator are offered through the metadata request, allowing the compression - of the measured fact. -} -\examples{ -get_indicators_code_data("AFILIACIONES", fields = "-observationsMetadata") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators_indicators.R +\name{get_indicators_code_data} +\alias{get_indicators_code_data} +\title{Get indicators code data} +\usage{ +get_indicators_code_data( + indicatorCode, + representation = NULL, + granularity = NULL, + fields = NULL +) +} +\arguments{ +\item{indicatorCode}{(string) an indicator code} + +\item{representation}{(string) Allows filtering the observations by their value.} + +\item{granularity}{(string) Allows to filter the observations through the granularities of the same.} + +\item{fields}{(string) Allows you to customize the response by excluding fields. +The possible values are: \code{-observationsMetadata}.} +} +\description{ +This function returns complete data (for all spacetime) of the indicator. + On the other hand, metadata describing the characteristics of a specific + indicator are offered through the metadata request, allowing the compression + of the measured fact. +} +\examples{ +get_indicators_code_data("AFILIACIONES", fields = "-observationsMetadata") +} diff --git a/man/get_indicators_geographic_granularities.Rd b/man/get_indicators_geographic_granularities.Rd index 627e2fa..f038470 100644 --- a/man/get_indicators_geographic_granularities.Rd +++ b/man/get_indicators_geographic_granularities.Rd @@ -1,16 +1,16 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/indicators_auxiliary_value_tables.R -\name{get_indicators_geographic_granularities} -\alias{get_indicators_geographic_granularities} -\title{Get geographic granularities} -\usage{ -get_indicators_geographic_granularities() -} -\description{ -This function returns a list of geographic granularities treated - in the ISTAC-indicators database. For example provincial, insular or - municipal granularity. -} -\examples{ -get_indicators_geographic_granularities() -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators_auxiliary_value_tables.R +\name{get_indicators_geographic_granularities} +\alias{get_indicators_geographic_granularities} +\title{Get geographic granularities} +\usage{ +get_indicators_geographic_granularities() +} +\description{ +This function returns a list of geographic granularities treated + in the ISTAC-indicators database. For example provincial, insular or + municipal granularity. +} +\examples{ +get_indicators_geographic_granularities() +} diff --git a/man/get_indicators_geographical_values.Rd b/man/get_indicators_geographical_values.Rd index 22261c9..3224976 100644 --- a/man/get_indicators_geographical_values.Rd +++ b/man/get_indicators_geographical_values.Rd @@ -1,27 +1,27 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/indicators_auxiliary_value_tables.R -\name{get_indicators_geographical_values} -\alias{get_indicators_geographical_values} -\title{Get geographical values} -\usage{ -get_indicators_geographical_values( - geographicalGranularityCode, - subjectCode = NULL, - systemCode = NULL -) -} -\arguments{ -\item{geographicalGranularityCode}{(string) geographical granularity code} - -\item{subjectCode}{(string) subject code} - -\item{systemCode}{(string) system code} -} -\description{ -This function returns values of a geographical granularity that - in turn are part of a specific theme or system of indicators. -} -\examples{ -get_indicators_geographical_values("REGIONS") -get_indicators_geographical_values("REGIONS", subjectCode = "051", systemCode = "C00067A") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators_auxiliary_value_tables.R +\name{get_indicators_geographical_values} +\alias{get_indicators_geographical_values} +\title{Get geographical values} +\usage{ +get_indicators_geographical_values( + geographicalGranularityCode, + subjectCode = NULL, + systemCode = NULL +) +} +\arguments{ +\item{geographicalGranularityCode}{(string) geographical granularity code} + +\item{subjectCode}{(string) subject code} + +\item{systemCode}{(string) system code} +} +\description{ +This function returns values of a geographical granularity that + in turn are part of a specific theme or system of indicators. +} +\examples{ +get_indicators_geographical_values("REGIONS") +get_indicators_geographical_values("REGIONS", subjectCode = "051", systemCode = "C00067A") +} diff --git a/man/get_indicators_subjects.Rd b/man/get_indicators_subjects.Rd index 318fc7a..da91064 100644 --- a/man/get_indicators_subjects.Rd +++ b/man/get_indicators_subjects.Rd @@ -1,15 +1,15 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/indicators_auxiliary_value_tables.R -\name{get_indicators_subjects} -\alias{get_indicators_subjects} -\title{Get subjects} -\usage{ -get_indicators_subjects() -} -\description{ -This function returns all subjects which the ISTAC classifies - its statistical operations. -} -\examples{ -get_indicators_subjects() +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators_auxiliary_value_tables.R +\name{get_indicators_subjects} +\alias{get_indicators_subjects} +\title{Get subjects} +\usage{ +get_indicators_subjects() +} +\description{ +This function returns all subjects which the ISTAC classifies + its statistical operations. +} +\examples{ +get_indicators_subjects() } diff --git a/man/get_indicators_systems.Rd b/man/get_indicators_systems.Rd index db1af68..5772f84 100644 --- a/man/get_indicators_systems.Rd +++ b/man/get_indicators_systems.Rd @@ -1,26 +1,26 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/indicators_indicators_systems.R -\name{get_indicators_systems} -\alias{get_indicators_systems} -\title{Get indicators systems} -\usage{ -get_indicators_systems(limit = 25, offset = 0) -} -\arguments{ -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} -} -\description{ -This function returns a list of indicator systems published in - the ISTAC-indicators database. The indicators are simple or compound - statistics, however a single indicator can rarely provide useful - information about complex phenomena such as the economic situation, - living conditions, schooling or others. Indicator systems are generally - designed to generate more and more accurate information about the - conditions of a phenomenon; and for this they are organized in dimensions - or areas of analysis, under which the indicators are integrated. -} -\examples{ -get_indicators_systems() -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators_indicators_systems.R +\name{get_indicators_systems} +\alias{get_indicators_systems} +\title{Get indicators systems} +\usage{ +get_indicators_systems(limit = 25, offset = 0) +} +\arguments{ +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} +} +\description{ +This function returns a list of indicator systems published in + the ISTAC-indicators database. The indicators are simple or compound + statistics, however a single indicator can rarely provide useful + information about complex phenomena such as the economic situation, + living conditions, schooling or others. Indicator systems are generally + designed to generate more and more accurate information about the + conditions of a phenomenon; and for this they are organized in dimensions + or areas of analysis, under which the indicators are integrated. +} +\examples{ +get_indicators_systems() +} diff --git a/man/get_indicators_systems_code.Rd b/man/get_indicators_systems_code.Rd index fde9ec2..bfaef13 100644 --- a/man/get_indicators_systems_code.Rd +++ b/man/get_indicators_systems_code.Rd @@ -1,21 +1,21 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/indicators_indicators_systems.R -\name{get_indicators_systems_code} -\alias{get_indicators_systems_code} -\title{Get indicators system code} -\usage{ -get_indicators_systems_code(indicatorSystemCode) -} -\arguments{ -\item{indicatorSystemCode}{(string) an indicator system code} -} -\description{ -This function returns metadata of a system of indicators - published in the ISTAC-indicators database. The indicators are simple or - compound statistics, however a single indicator can rarely provide useful - information about complex phenomena such as the economic situation, living - conditions, schooling or others. -} -\examples{ -get_indicators_systems_code("C00075H") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators_indicators_systems.R +\name{get_indicators_systems_code} +\alias{get_indicators_systems_code} +\title{Get indicators system code} +\usage{ +get_indicators_systems_code(indicatorSystemCode) +} +\arguments{ +\item{indicatorSystemCode}{(string) an indicator system code} +} +\description{ +This function returns metadata of a system of indicators + published in the ISTAC-indicators database. The indicators are simple or + compound statistics, however a single indicator can rarely provide useful + information about complex phenomena such as the economic situation, living + conditions, schooling or others. +} +\examples{ +get_indicators_systems_code("C00075H") +} diff --git a/man/get_indicators_systems_code_instances.Rd b/man/get_indicators_systems_code_instances.Rd index 1fa4944..ecdde28 100644 --- a/man/get_indicators_systems_code_instances.Rd +++ b/man/get_indicators_systems_code_instances.Rd @@ -1,50 +1,50 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/indicators_indicators_systems.R -\name{get_indicators_systems_code_instances} -\alias{get_indicators_systems_code_instances} -\title{Get indicators system code instances} -\usage{ -get_indicators_systems_code_instances( - indicatorSystemCode, - q = NULL, - order = NULL, - limit = 25, - offset = 0, - fields = NULL, - representation = NULL, - granularity = NULL -) -} -\arguments{ -\item{indicatorSystemCode}{(string) with an indicator system code} - -\item{q}{(string) Query of metadata on which the searches can be built are: -\code{id} and \code{geographicalValue}.} - -\item{order}{(string) Order. Possible values are: \code{update} and -\code{id} and order criteria are \code{ASC} and \code{DESC}.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{fields}{(string) Use of the answer by adding new fields. -Possible values are: \code{+metadata}, \code{+data} and \code{+observationsMetadata}.} - -\item{representation}{(string) Allows filtering the observations by their value. -Its use only makes sense when \code{+data} and/or \code{+observationsMetadata} has been included.} - -\item{granularity}{(string) Allows to filter the observations through the -granularities of the same. Its use only makes sense when \code{+data} and/or -\code{+observationsMetadata} has been included.} -} -\description{ -This function returns instances of indicators associated - with a specific indicator system. An instance of an indicator is nothing - more than a spatio-temporal query of an indicator when it is incorporated - into a specific indicator system. -} -\examples{ -get_indicators_systems_code_instances("C00075H") -get_indicators_systems_code_instances("C00075H", q = 'id EQ "INDICADORES_MUNICIPALES"') -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators_indicators_systems.R +\name{get_indicators_systems_code_instances} +\alias{get_indicators_systems_code_instances} +\title{Get indicators system code instances} +\usage{ +get_indicators_systems_code_instances( + indicatorSystemCode, + q = NULL, + order = NULL, + limit = 25, + offset = 0, + fields = NULL, + representation = NULL, + granularity = NULL +) +} +\arguments{ +\item{indicatorSystemCode}{(string) with an indicator system code} + +\item{q}{(string) Query of metadata on which the searches can be built are: +\code{id} and \code{geographicalValue}.} + +\item{order}{(string) Order. Possible values are: \code{update} and +\code{id} and order criteria are \code{ASC} and \code{DESC}.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{fields}{(string) Use of the answer by adding new fields. +Possible values are: \code{+metadata}, \code{+data} and \code{+observationsMetadata}.} + +\item{representation}{(string) Allows filtering the observations by their value. +Its use only makes sense when \code{+data} and/or \code{+observationsMetadata} has been included.} + +\item{granularity}{(string) Allows to filter the observations through the +granularities of the same. Its use only makes sense when \code{+data} and/or +\code{+observationsMetadata} has been included.} +} +\description{ +This function returns instances of indicators associated + with a specific indicator system. An instance of an indicator is nothing + more than a spatio-temporal query of an indicator when it is incorporated + into a specific indicator system. +} +\examples{ +get_indicators_systems_code_instances("C00075H") +get_indicators_systems_code_instances("C00075H", q = 'id EQ "INDICADORES_MUNICIPALES"') +} diff --git a/man/get_indicators_systems_code_instances_code.Rd b/man/get_indicators_systems_code_instances_code.Rd index e32e5db..c3557ff 100644 --- a/man/get_indicators_systems_code_instances_code.Rd +++ b/man/get_indicators_systems_code_instances_code.Rd @@ -1,25 +1,25 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/indicators_indicators_systems.R -\name{get_indicators_systems_code_instances_code} -\alias{get_indicators_systems_code_instances_code} -\title{Get indicators system code instances code} -\usage{ -get_indicators_systems_code_instances_code( - indicatorSystemCode, - indicatorInstanceCode -) -} -\arguments{ -\item{indicatorSystemCode}{(string) indicator system code} - -\item{indicatorInstanceCode}{(string) indicator instance code} -} -\description{ -This function returns metadata of an indicator set associated - with a specific indicator system. An instance of an indicator is nothing - more than a spatio-temporal query of an indicator when it is incorporated - into a specific indicator system. -} -\examples{ -get_indicators_systems_code_instances_code("C00075H", "21af0477-d63b-493b-ad02-4ab181547223") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators_indicators_systems.R +\name{get_indicators_systems_code_instances_code} +\alias{get_indicators_systems_code_instances_code} +\title{Get indicators system code instances code} +\usage{ +get_indicators_systems_code_instances_code( + indicatorSystemCode, + indicatorInstanceCode +) +} +\arguments{ +\item{indicatorSystemCode}{(string) indicator system code} + +\item{indicatorInstanceCode}{(string) indicator instance code} +} +\description{ +This function returns metadata of an indicator set associated + with a specific indicator system. An instance of an indicator is nothing + more than a spatio-temporal query of an indicator when it is incorporated + into a specific indicator system. +} +\examples{ +get_indicators_systems_code_instances_code("C00075H", "21af0477-d63b-493b-ad02-4ab181547223") +} diff --git a/man/get_indicators_systems_code_instances_code_data.Rd b/man/get_indicators_systems_code_instances_code_data.Rd index 86c01f4..97a2816 100644 --- a/man/get_indicators_systems_code_instances_code_data.Rd +++ b/man/get_indicators_systems_code_instances_code_data.Rd @@ -1,34 +1,34 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/indicators_indicators_systems.R -\name{get_indicators_systems_code_instances_code_data} -\alias{get_indicators_systems_code_instances_code_data} -\title{Get indicators system code instances code data} -\usage{ -get_indicators_systems_code_instances_code_data( - indicatorSystemCode, - indicatorInstanceCode, - representation = NULL, - granularity = NULL, - fields = NULL -) -} -\arguments{ -\item{indicatorSystemCode}{(string) Indicator system code} - -\item{indicatorInstanceCode}{(string) Indicator instance code} - -\item{representation}{(string) Allows filtering the observations by their value.} - -\item{granularity}{(string) Allows to filter the observations through the granularities of the same.} - -\item{fields}{(string) Allows you to customize the response by excluding fields. The possible values are: \code{-observationsMetadata}.} -} -\description{ -This function returns data of an indicator unit associated with - a specific indicator system. An instance of an indicator is nothing more - than a spatio-temporal query of an indicator when it is incorporated into - a specific indicator system. -} -\examples{ -get_indicators_systems_code_instances_code_data("C00075H", "21af0477-d63b-493b-ad02-4ab181547223") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators_indicators_systems.R +\name{get_indicators_systems_code_instances_code_data} +\alias{get_indicators_systems_code_instances_code_data} +\title{Get indicators system code instances code data} +\usage{ +get_indicators_systems_code_instances_code_data( + indicatorSystemCode, + indicatorInstanceCode, + representation = NULL, + granularity = NULL, + fields = NULL +) +} +\arguments{ +\item{indicatorSystemCode}{(string) Indicator system code} + +\item{indicatorInstanceCode}{(string) Indicator instance code} + +\item{representation}{(string) Allows filtering the observations by their value.} + +\item{granularity}{(string) Allows to filter the observations through the granularities of the same.} + +\item{fields}{(string) Allows you to customize the response by excluding fields. The possible values are: \code{-observationsMetadata}.} +} +\description{ +This function returns data of an indicator unit associated with + a specific indicator system. An instance of an indicator is nothing more + than a spatio-temporal query of an indicator when it is incorporated into + a specific indicator system. +} +\examples{ +get_indicators_systems_code_instances_code_data("C00075H", "21af0477-d63b-493b-ad02-4ab181547223") +} diff --git a/man/get_indicators_time_granularities.Rd b/man/get_indicators_time_granularities.Rd index 4d911b6..3daf7e2 100644 --- a/man/get_indicators_time_granularities.Rd +++ b/man/get_indicators_time_granularities.Rd @@ -1,16 +1,16 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/indicators_auxiliary_value_tables.R -\name{get_indicators_time_granularities} -\alias{get_indicators_time_granularities} -\title{Get time granularities} -\usage{ -get_indicators_time_granularities() -} -\description{ -This function returns a list of temporary granularity treated - in the ISTAC data bank-indicators ordered from highest to lowest granularity. - For example annual, quarterly or monthly granularity. -} -\examples{ -get_indicators_time_granularities() -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators_auxiliary_value_tables.R +\name{get_indicators_time_granularities} +\alias{get_indicators_time_granularities} +\title{Get time granularities} +\usage{ +get_indicators_time_granularities() +} +\description{ +This function returns a list of temporary granularity treated + in the ISTAC data bank-indicators ordered from highest to lowest granularity. + For example annual, quarterly or monthly granularity. +} +\examples{ +get_indicators_time_granularities() +} diff --git a/man/get_schemes_agency.Rd b/man/get_schemes_agency.Rd deleted file mode 100644 index d05ada1..0000000 --- a/man/get_schemes_agency.Rd +++ /dev/null @@ -1,26 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_category.R -\name{get_schemes_agency} -\alias{get_schemes_agency} -\title{Get category schemes agency} -\usage{ -get_schemes_agency(agencyID, limit = 25, offset = 0, query = NULL, - orderBy = NULL) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/categoryschemes/{agencyID} -} -\examples{ -get_schemes_agency("ISTAC", query = "ID EQ 2090", orderBy = "ID ASC") -} diff --git a/man/get_schemes_agency_resource.Rd b/man/get_schemes_agency_resource.Rd deleted file mode 100644 index 71e7f3e..0000000 --- a/man/get_schemes_agency_resource.Rd +++ /dev/null @@ -1,28 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_category.R -\name{get_schemes_agency_resource} -\alias{get_schemes_agency_resource} -\title{Get category schemes agency resource} -\usage{ -get_schemes_agency_resource(agencyID, resourceID, limit = 25, - offset = 0, query = NULL, orderBy = NULL) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/categoryschemes/{agencyID}/{resourceID} -} -\examples{ -get_schemes_agency_resource("ISTAC", "TEMAS_CANARIAS") -} diff --git a/man/get_schemes_agency_resource_version.Rd b/man/get_schemes_agency_resource_version.Rd deleted file mode 100644 index 469c982..0000000 --- a/man/get_schemes_agency_resource_version.Rd +++ /dev/null @@ -1,21 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_category.R -\name{get_schemes_agency_resource_version} -\alias{get_schemes_agency_resource_version} -\title{Get category schemes agency resource version} -\usage{ -get_schemes_agency_resource_version(agencyID, resourceID, version) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{version}{(string) Specific version of the resource.} -} -\description{ -This function returns the content from /v1.0/categoryschemes/{agencyID}/{resourceID}/{version} -} -\examples{ -get_schemes_agency_resource_version("ISTAC", "TEMAS_CANARIAS", "01.000") -} diff --git a/man/get_schemes_agency_resource_version_categories.Rd b/man/get_schemes_agency_resource_version_categories.Rd deleted file mode 100644 index bd83eeb..0000000 --- a/man/get_schemes_agency_resource_version_categories.Rd +++ /dev/null @@ -1,30 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_category.R -\name{get_schemes_agency_resource_version_categories} -\alias{get_schemes_agency_resource_version_categories} -\title{Get category schemes agency resource version categories} -\usage{ -get_schemes_agency_resource_version_categories(agencyID, resourceID, - version, limit = 25, offset = 0, query = NULL, orderBy = NULL) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{version}{(string) Specific version of the resource.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/categoryschemes/{agencyID}/{resourceID}/{version}/categories -} -\examples{ -get_schemes_agency_resource_version_categories("ISTAC", "TEMAS_CANARIAS", "01.000") -} diff --git a/man/get_schemes_agency_resource_version_categories_id.Rd b/man/get_schemes_agency_resource_version_categories_id.Rd deleted file mode 100644 index e79ab3d..0000000 --- a/man/get_schemes_agency_resource_version_categories_id.Rd +++ /dev/null @@ -1,24 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_category.R -\name{get_schemes_agency_resource_version_categories_id} -\alias{get_schemes_agency_resource_version_categories_id} -\title{Get category schemes agency resource version categories (id)} -\usage{ -get_schemes_agency_resource_version_categories_id(agencyID, resourceID, - version, categoryID) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{version}{(string) Specific version of the resource.} - -\item{categoryID}{(string)} -} -\description{ -This function returns the content from /v1.0/categoryschemes/{agencyID}/{resourceID}/{version}/categories/{categoryID} -} -\examples{ -get_schemes_agency_resource_version_categories_id("ISTAC", "TEMAS_CANARIAS", "01.000", "060") -} diff --git a/man/get_structuralresources_categorisations.Rd b/man/get_structuralresources_categorisations.Rd index 8a60c34..fb23569 100644 --- a/man/get_structuralresources_categorisations.Rd +++ b/man/get_structuralresources_categorisations.Rd @@ -1,29 +1,29 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_category.R -\name{get_structuralresources_categorisations} -\alias{get_structuralresources_categorisations} -\title{Get categorisations} -\usage{ -get_structuralresources_categorisations( - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/categorisations -} -\examples{ -get_structuralresources_categorisations() -get_structuralresources_categorisations(query = "ID EQ 2090", orderBy = "ID ASC") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_category.R +\name{get_structuralresources_categorisations} +\alias{get_structuralresources_categorisations} +\title{Get categorisations} +\usage{ +get_structuralresources_categorisations( + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns the content from /v1.0/categorisations +} +\examples{ +get_structuralresources_categorisations() +get_structuralresources_categorisations(query = "ID EQ 2090", orderBy = "ID ASC") +} diff --git a/man/get_structuralresources_categorisations_agency.Rd b/man/get_structuralresources_categorisations_agency.Rd index e610920..23c789e 100644 --- a/man/get_structuralresources_categorisations_agency.Rd +++ b/man/get_structuralresources_categorisations_agency.Rd @@ -1,31 +1,31 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_category.R -\name{get_structuralresources_categorisations_agency} -\alias{get_structuralresources_categorisations_agency} -\title{Get categorisations agency} -\usage{ -get_structuralresources_categorisations_agency( - agencyID, - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/categorisations/{agencyID} -} -\examples{ -get_structuralresources_categorisations_agency("ISTAC") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_category.R +\name{get_structuralresources_categorisations_agency} +\alias{get_structuralresources_categorisations_agency} +\title{Get categorisations agency} +\usage{ +get_structuralresources_categorisations_agency( + agencyID, + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the agency that publishes.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns the content from /v1.0/categorisations/{agencyID} +} +\examples{ +get_structuralresources_categorisations_agency("ISTAC") +} diff --git a/man/get_structuralresources_categorisations_agency_resource.Rd b/man/get_structuralresources_categorisations_agency_resource.Rd index 895b862..9616aca 100644 --- a/man/get_structuralresources_categorisations_agency_resource.Rd +++ b/man/get_structuralresources_categorisations_agency_resource.Rd @@ -1,34 +1,34 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_category.R -\name{get_structuralresources_categorisations_agency_resource} -\alias{get_structuralresources_categorisations_agency_resource} -\title{Get categorisations agency resource} -\usage{ -get_structuralresources_categorisations_agency_resource( - agencyID, - resourceID, - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/categorisations/{agencyID}/{resourceID} -} -\examples{ -get_structuralresources_categorisations_agency_resource("ISTAC", "cat2") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_category.R +\name{get_structuralresources_categorisations_agency_resource} +\alias{get_structuralresources_categorisations_agency_resource} +\title{Get categorisations agency resource} +\usage{ +get_structuralresources_categorisations_agency_resource( + agencyID, + resourceID, + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the agency that publishes.} + +\item{resourceID}{(string) Resource identifier.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns the content from /v1.0/categorisations/{agencyID}/{resourceID} +} +\examples{ +get_structuralresources_categorisations_agency_resource("ISTAC", "cat2") +} diff --git a/man/get_structuralresources_categorisations_agency_resource_version.Rd b/man/get_structuralresources_categorisations_agency_resource_version.Rd index a9685da..329be5c 100644 --- a/man/get_structuralresources_categorisations_agency_resource_version.Rd +++ b/man/get_structuralresources_categorisations_agency_resource_version.Rd @@ -1,25 +1,25 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_category.R -\name{get_structuralresources_categorisations_agency_resource_version} -\alias{get_structuralresources_categorisations_agency_resource_version} -\title{Get categorisations agency resource version} -\usage{ -get_structuralresources_categorisations_agency_resource_version( - agencyID, - resourceID, - version -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{version}{(string) Specific version of the resource.} -} -\description{ -This function returns the content from /v1.0/categorisations/{agencyID}/{resourceID}/{version} -} -\examples{ -get_structuralresources_categorisations_agency_resource_version("ISTAC", "cat2", "01.000") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_category.R +\name{get_structuralresources_categorisations_agency_resource_version} +\alias{get_structuralresources_categorisations_agency_resource_version} +\title{Get categorisations agency resource version} +\usage{ +get_structuralresources_categorisations_agency_resource_version( + agencyID, + resourceID, + version +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the agency that publishes.} + +\item{resourceID}{(string) Resource identifier.} + +\item{version}{(string) Specific version of the resource.} +} +\description{ +This function returns the content from /v1.0/categorisations/{agencyID}/{resourceID}/{version} +} +\examples{ +get_structuralresources_categorisations_agency_resource_version("ISTAC", "cat2", "01.000") +} diff --git a/man/get_structuralresources_category_schemes.Rd b/man/get_structuralresources_category_schemes.Rd index 1e2e3db..d6b81ae 100644 --- a/man/get_structuralresources_category_schemes.Rd +++ b/man/get_structuralresources_category_schemes.Rd @@ -1,29 +1,29 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_category.R -\name{get_structuralresources_category_schemes} -\alias{get_structuralresources_category_schemes} -\title{Get category schemes} -\usage{ -get_structuralresources_category_schemes( - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/categoryschemes -} -\examples{ -get_structuralresources_category_schemes() -get_structuralresources_category_schemes(query = "ID EQ 2090", orderBy = "ID ASC") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_category.R +\name{get_structuralresources_category_schemes} +\alias{get_structuralresources_category_schemes} +\title{Get category schemes} +\usage{ +get_structuralresources_category_schemes( + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns the content from /v1.0/categoryschemes +} +\examples{ +get_structuralresources_category_schemes() +get_structuralresources_category_schemes(query = "ID EQ 2090", orderBy = "ID ASC") +} diff --git a/man/get_structuralresources_category_schemes_agency.Rd b/man/get_structuralresources_category_schemes_agency.Rd index ca76243..94a868e 100644 --- a/man/get_structuralresources_category_schemes_agency.Rd +++ b/man/get_structuralresources_category_schemes_agency.Rd @@ -1,31 +1,31 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_category.R -\name{get_structuralresources_category_schemes_agency} -\alias{get_structuralresources_category_schemes_agency} -\title{Get category schemes agency} -\usage{ -get_structuralresources_category_schemes_agency( - agencyID, - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/categoryschemes/{agencyID} -} -\examples{ -get_structuralresources_category_schemes_agency("ISTAC", query = "ID EQ 2090", orderBy = "ID ASC") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_category.R +\name{get_structuralresources_category_schemes_agency} +\alias{get_structuralresources_category_schemes_agency} +\title{Get category schemes agency} +\usage{ +get_structuralresources_category_schemes_agency( + agencyID, + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the agency that publishes.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns the content from /v1.0/categoryschemes/{agencyID} +} +\examples{ +get_structuralresources_category_schemes_agency("ISTAC", query = "ID EQ 2090", orderBy = "ID ASC") +} diff --git a/man/get_structuralresources_category_schemes_agency_resource.Rd b/man/get_structuralresources_category_schemes_agency_resource.Rd index 066abaa..dada26d 100644 --- a/man/get_structuralresources_category_schemes_agency_resource.Rd +++ b/man/get_structuralresources_category_schemes_agency_resource.Rd @@ -1,34 +1,34 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_category.R -\name{get_structuralresources_category_schemes_agency_resource} -\alias{get_structuralresources_category_schemes_agency_resource} -\title{Get category schemes agency resource} -\usage{ -get_structuralresources_category_schemes_agency_resource( - agencyID, - resourceID, - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/categoryschemes/{agencyID}/{resourceID} -} -\examples{ -get_structuralresources_category_schemes_agency_resource("ISTAC", "TEMAS_CANARIAS") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_category.R +\name{get_structuralresources_category_schemes_agency_resource} +\alias{get_structuralresources_category_schemes_agency_resource} +\title{Get category schemes agency resource} +\usage{ +get_structuralresources_category_schemes_agency_resource( + agencyID, + resourceID, + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the agency that publishes.} + +\item{resourceID}{(string) Resource identifier.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns the content from /v1.0/categoryschemes/{agencyID}/{resourceID} +} +\examples{ +get_structuralresources_category_schemes_agency_resource("ISTAC", "TEMAS_CANARIAS") +} diff --git a/man/get_structuralresources_category_schemes_agency_resource_version.Rd b/man/get_structuralresources_category_schemes_agency_resource_version.Rd index 1698712..77500c6 100644 --- a/man/get_structuralresources_category_schemes_agency_resource_version.Rd +++ b/man/get_structuralresources_category_schemes_agency_resource_version.Rd @@ -1,27 +1,27 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_category.R -\name{get_structuralresources_category_schemes_agency_resource_version} -\alias{get_structuralresources_category_schemes_agency_resource_version} -\title{Get category schemes agency resource version} -\usage{ -get_structuralresources_category_schemes_agency_resource_version( - agencyID, - resourceID, - version -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{version}{(string) Specific version of the resource.} -} -\description{ -This function returns the content from /v1.0/categoryschemes/{agencyID}/{resourceID}/{version} -} -\examples{ -get_structuralresources_category_schemes_agency_resource_version( - "ISTAC", "TEMAS_CANARIAS", "01.000" -) -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_category.R +\name{get_structuralresources_category_schemes_agency_resource_version} +\alias{get_structuralresources_category_schemes_agency_resource_version} +\title{Get category schemes agency resource version} +\usage{ +get_structuralresources_category_schemes_agency_resource_version( + agencyID, + resourceID, + version +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the agency that publishes.} + +\item{resourceID}{(string) Resource identifier.} + +\item{version}{(string) Specific version of the resource.} +} +\description{ +This function returns the content from /v1.0/categoryschemes/{agencyID}/{resourceID}/{version} +} +\examples{ +get_structuralresources_category_schemes_agency_resource_version( + "ISTAC", "TEMAS_CANARIAS", "01.000" +) +} diff --git a/man/get_structuralresources_category_schemes_agency_resource_version_categories.Rd b/man/get_structuralresources_category_schemes_agency_resource_version_categories.Rd index 383e7d8..530061d 100644 --- a/man/get_structuralresources_category_schemes_agency_resource_version_categories.Rd +++ b/man/get_structuralresources_category_schemes_agency_resource_version_categories.Rd @@ -1,39 +1,40 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_category.R -\name{get_structuralresources_category_schemes_agency_resource_version_categories} -\alias{get_structuralresources_category_schemes_agency_resource_version_categories} -\title{Get category schemes agency resource version categories} -\usage{ -get_structuralresources_category_schemes_agency_resource_version_categories( - agencyID, - resourceID, - version, - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{version}{(string) Specific version of the resource.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/categoryschemes/{agencyID}/{resourceID}/{version}/categories -} -\examples{ -get_structuralresources_category_schemes_agency_resource_version_categories( - "ISTAC", "TEMAS_CANARIAS", "01.000", limit = 10 -) -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_category.R +\name{get_structuralresources_category_schemes_agency_resource_version_categories} +\alias{get_structuralresources_category_schemes_agency_resource_version_categories} +\title{Get category schemes agency resource version categories} +\usage{ +get_structuralresources_category_schemes_agency_resource_version_categories( + agencyID, + resourceID, + version, + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the agency that publishes.} + +\item{resourceID}{(string) Resource identifier.} + +\item{version}{(string) Specific version of the resource.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns the content from /v1.0/categoryschemes/{agencyID}/{resourceID}/{version}/categories +} +\examples{ +get_structuralresources_category_schemes_agency_resource_version_categories( + "ISTAC", "TEMAS_CANARIAS", "01.000", + limit = 10 +) +} diff --git a/man/get_structuralresources_category_schemes_agency_resource_version_categories_id.Rd b/man/get_structuralresources_category_schemes_agency_resource_version_categories_id.Rd index 53fafb5..cc11215 100644 --- a/man/get_structuralresources_category_schemes_agency_resource_version_categories_id.Rd +++ b/man/get_structuralresources_category_schemes_agency_resource_version_categories_id.Rd @@ -1,33 +1,33 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_category.R -\name{get_structuralresources_category_schemes_agency_resource_version_categories_id} -\alias{get_structuralresources_category_schemes_agency_resource_version_categories_id} -\title{Get category schemes agency resource version categories (id)} -\usage{ -get_structuralresources_category_schemes_agency_resource_version_categories_id( - agencyID, - resourceID, - version, - categoryID -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{version}{(string) Specific version of the resource.} - -\item{categoryID}{(string)} -} -\description{ -This function returns the content from /v1.0/categoryschemes/{agencyID}/{resourceID}/{version}/categories/{categoryID} -} -\examples{ -get_structuralresources_category_schemes_agency_resource_version_categories_id( - "ISTAC", "TEMAS_CANARIAS", "01.000", "060" -) -get_structuralresources_category_schemes_agency_resource_version_categories_id( - "ISTAC", "TEMAS_CANARIAS", "01.000", "060.060_010.060_010_010" -) -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_category.R +\name{get_structuralresources_category_schemes_agency_resource_version_categories_id} +\alias{get_structuralresources_category_schemes_agency_resource_version_categories_id} +\title{Get category schemes agency resource version categories (id)} +\usage{ +get_structuralresources_category_schemes_agency_resource_version_categories_id( + agencyID, + resourceID, + version, + categoryID +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the agency that publishes.} + +\item{resourceID}{(string) Resource identifier.} + +\item{version}{(string) Specific version of the resource.} + +\item{categoryID}{(string)} +} +\description{ +This function returns the content from /v1.0/categoryschemes/{agencyID}/{resourceID}/{version}/categories/{categoryID} +} +\examples{ +get_structuralresources_category_schemes_agency_resource_version_categories_id( + "ISTAC", "TEMAS_CANARIAS", "01.000", "060" +) +get_structuralresources_category_schemes_agency_resource_version_categories_id( + "ISTAC", "TEMAS_CANARIAS", "01.000", "060.060_010.060_010_010" +) +} diff --git a/man/get_structuralresources_codelist_families.Rd b/man/get_structuralresources_codelist_families.Rd index 4216dc8..f3ba577 100644 --- a/man/get_structuralresources_codelist_families.Rd +++ b/man/get_structuralresources_codelist_families.Rd @@ -1,28 +1,28 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_classifications.R -\name{get_structuralresources_codelist_families} -\alias{get_structuralresources_codelist_families} -\title{Get codelist families} -\usage{ -get_structuralresources_codelist_families( - limit = 25, - offset = 0, - orderBy = NULL, - query = NULL -) -} -\arguments{ -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{orderBy}{(string) Field by which to sort the results.} - -\item{query}{(string) Query to filter the results.} -} -\description{ -This function returns the list of families of classifications -} -\examples{ -get_structuralresources_codelist_families() -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_classifications.R +\name{get_structuralresources_codelist_families} +\alias{get_structuralresources_codelist_families} +\title{Get codelist families} +\usage{ +get_structuralresources_codelist_families( + limit = 25, + offset = 0, + orderBy = NULL, + query = NULL +) +} +\arguments{ +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{orderBy}{(string) Field by which to sort the results.} + +\item{query}{(string) Query to filter the results.} +} +\description{ +This function returns the list of families of classifications +} +\examples{ +get_structuralresources_codelist_families() +} diff --git a/man/get_structuralresources_codelist_families_id.Rd b/man/get_structuralresources_codelist_families_id.Rd index beddee2..70adcfe 100644 --- a/man/get_structuralresources_codelist_families_id.Rd +++ b/man/get_structuralresources_codelist_families_id.Rd @@ -1,17 +1,17 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_classifications.R -\name{get_structuralresources_codelist_families_id} -\alias{get_structuralresources_codelist_families_id} -\title{Get codelist families} -\usage{ -get_structuralresources_codelist_families_id(id = NULL) -} -\arguments{ -\item{id}{(string) codelist family identificator} -} -\description{ -This function allows to obtain a family of classifications in particular. -} -\examples{ -get_structuralresources_codelist_families_id() -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_classifications.R +\name{get_structuralresources_codelist_families_id} +\alias{get_structuralresources_codelist_families_id} +\title{Get codelist families} +\usage{ +get_structuralresources_codelist_families_id(id = NULL) +} +\arguments{ +\item{id}{(string) codelist family identificator} +} +\description{ +This function allows to obtain a family of classifications in particular. +} +\examples{ +get_structuralresources_codelist_families_id() +} diff --git a/man/get_structuralresources_codelists.Rd b/man/get_structuralresources_codelists.Rd index 4235bff..e97a3ab 100644 --- a/man/get_structuralresources_codelists.Rd +++ b/man/get_structuralresources_codelists.Rd @@ -1,28 +1,28 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_classifications.R -\name{get_structuralresources_codelists} -\alias{get_structuralresources_codelists} -\title{Get codelists} -\usage{ -get_structuralresources_codelists( - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function allows to obtain the list of classifications. -} -\examples{ -get_structuralresources_codelists() -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_classifications.R +\name{get_structuralresources_codelists} +\alias{get_structuralresources_codelists} +\title{Get codelists} +\usage{ +get_structuralresources_codelists( + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function allows to obtain the list of classifications. +} +\examples{ +get_structuralresources_codelists() +} diff --git a/man/get_structuralresources_codelists_agency.Rd b/man/get_structuralresources_codelists_agency.Rd index 891ecd4..cc73fbe 100644 --- a/man/get_structuralresources_codelists_agency.Rd +++ b/man/get_structuralresources_codelists_agency.Rd @@ -1,33 +1,33 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_classifications.R -\name{get_structuralresources_codelists_agency} -\alias{get_structuralresources_codelists_agency} -\title{Get codelists agency} -\usage{ -get_structuralresources_codelists_agency( - agencyID, - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{agencyID}{(string) Agency identificator.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function allows obtaining the list of all the classifications - maintained by a certain organization. -} -\examples{ -get_structuralresources_codelists_agency("ISTAC") -get_structuralresources_codelists_agency("ESTAT") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_classifications.R +\name{get_structuralresources_codelists_agency} +\alias{get_structuralresources_codelists_agency} +\title{Get codelists agency} +\usage{ +get_structuralresources_codelists_agency( + agencyID, + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{agencyID}{(string) Agency identificator.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function allows obtaining the list of all the classifications + maintained by a certain organization. +} +\examples{ +get_structuralresources_codelists_agency("ISTAC") +get_structuralresources_codelists_agency("ESTAT") +} diff --git a/man/get_structuralresources_codelists_agency_resource.Rd b/man/get_structuralresources_codelists_agency_resource.Rd index 58fe6d2..6d29217 100644 --- a/man/get_structuralresources_codelists_agency_resource.Rd +++ b/man/get_structuralresources_codelists_agency_resource.Rd @@ -1,36 +1,36 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_classifications.R -\name{get_structuralresources_codelists_agency_resource} -\alias{get_structuralresources_codelists_agency_resource} -\title{Get codelists agency resource} -\usage{ -get_structuralresources_codelists_agency_resource( - agencyID, - resourceID, - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{agencyID}{(string) Agency identificator.} - -\item{resourceID}{(string) Resource identificator.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function allows to obtain all the versions of a - classification with a certain identifier and that is also kept by a - certain organization. -} -\examples{ -get_structuralresources_codelists_agency_resource("ISTAC", "CL_AREA_ES") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_classifications.R +\name{get_structuralresources_codelists_agency_resource} +\alias{get_structuralresources_codelists_agency_resource} +\title{Get codelists agency resource} +\usage{ +get_structuralresources_codelists_agency_resource( + agencyID, + resourceID, + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{agencyID}{(string) Agency identificator.} + +\item{resourceID}{(string) Resource identificator.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function allows to obtain all the versions of a + classification with a certain identifier and that is also kept by a + certain organization. +} +\examples{ +get_structuralresources_codelists_agency_resource("ISTAC", "CL_AREA_ES") +} diff --git a/man/get_structuralresources_codelists_agency_resource_version.Rd b/man/get_structuralresources_codelists_agency_resource_version.Rd index 1941b30..46bb8db 100644 --- a/man/get_structuralresources_codelists_agency_resource_version.Rd +++ b/man/get_structuralresources_codelists_agency_resource_version.Rd @@ -1,25 +1,25 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_classifications.R -\name{get_structuralresources_codelists_agency_resource_version} -\alias{get_structuralresources_codelists_agency_resource_version} -\title{Get codelists agency resource version} -\usage{ -get_structuralresources_codelists_agency_resource_version( - agencyID, - resourceID, - version -) -} -\arguments{ -\item{agencyID}{(string) Agency identificator.} - -\item{resourceID}{(string) Resource identificator.} - -\item{version}{(string) Specific resource version.} -} -\description{ -This function allows you to consult a particular version of a classification. -} -\examples{ -get_structuralresources_codelists_agency_resource_version("ISTAC", "CL_AREA_ES", "01.000") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_classifications.R +\name{get_structuralresources_codelists_agency_resource_version} +\alias{get_structuralresources_codelists_agency_resource_version} +\title{Get codelists agency resource version} +\usage{ +get_structuralresources_codelists_agency_resource_version( + agencyID, + resourceID, + version +) +} +\arguments{ +\item{agencyID}{(string) Agency identificator.} + +\item{resourceID}{(string) Resource identificator.} + +\item{version}{(string) Specific resource version.} +} +\description{ +This function allows you to consult a particular version of a classification. +} +\examples{ +get_structuralresources_codelists_agency_resource_version("ISTAC", "CL_AREA_ES", "01.000") +} diff --git a/man/get_structuralresources_codelists_agency_resource_version_codes.Rd b/man/get_structuralresources_codelists_agency_resource_version_codes.Rd index 0da63ca..b5415e2 100644 --- a/man/get_structuralresources_codelists_agency_resource_version_codes.Rd +++ b/man/get_structuralresources_codelists_agency_resource_version_codes.Rd @@ -1,49 +1,49 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_classifications.R -\name{get_structuralresources_codelists_agency_resource_version_codes} -\alias{get_structuralresources_codelists_agency_resource_version_codes} -\title{Get codelists agency resource version codes} -\usage{ -get_structuralresources_codelists_agency_resource_version_codes( - agencyID, - resourceID, - version, - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL, - openness = NULL, - order = NULL, - fields = NULL -) -} -\arguments{ -\item{agencyID}{(string) Agency identificator.} - -\item{resourceID}{(string) Resource identificator.} - -\item{version}{(string) Specific resource version.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} - -\item{openness}{(string) Opening established for viewing.} - -\item{order}{(string) Order established for visualization.} - -\item{fields}{(string) Additional fields that you want to show in the answer.} -} -\description{ -This function allows to consult the codes of a version of a - classification. Note that if wildcards are used as \code{~all} or one of the - \code{limit}, \code{offset}, \code{query} or \code{orderBy} parameters, - the list will be automatically paginated. -} -\examples{ -get_structuralresources_codelists_agency_resource_version_codes("ISTAC", "CL_AREA_ES", "01.000") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_classifications.R +\name{get_structuralresources_codelists_agency_resource_version_codes} +\alias{get_structuralresources_codelists_agency_resource_version_codes} +\title{Get codelists agency resource version codes} +\usage{ +get_structuralresources_codelists_agency_resource_version_codes( + agencyID, + resourceID, + version, + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL, + openness = NULL, + order = NULL, + fields = NULL +) +} +\arguments{ +\item{agencyID}{(string) Agency identificator.} + +\item{resourceID}{(string) Resource identificator.} + +\item{version}{(string) Specific resource version.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} + +\item{openness}{(string) Opening established for viewing.} + +\item{order}{(string) Order established for visualization.} + +\item{fields}{(string) Additional fields that you want to show in the answer.} +} +\description{ +This function allows to consult the codes of a version of a + classification. Note that if wildcards are used as \code{~all} or one of the + \code{limit}, \code{offset}, \code{query} or \code{orderBy} parameters, + the list will be automatically paginated. +} +\examples{ +get_structuralresources_codelists_agency_resource_version_codes("ISTAC", "CL_AREA_ES", "01.000") +} diff --git a/man/get_structuralresources_codelists_agency_resource_version_codes_codeid.Rd b/man/get_structuralresources_codelists_agency_resource_version_codes_codeid.Rd index 7cc920a..fac609d 100644 --- a/man/get_structuralresources_codelists_agency_resource_version_codes_codeid.Rd +++ b/man/get_structuralresources_codelists_agency_resource_version_codes_codeid.Rd @@ -1,30 +1,30 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_classifications.R -\name{get_structuralresources_codelists_agency_resource_version_codes_codeid} -\alias{get_structuralresources_codelists_agency_resource_version_codes_codeid} -\title{Get codelists agency resource version codes (codeID)} -\usage{ -get_structuralresources_codelists_agency_resource_version_codes_codeid( - agencyID, - resourceID, - version, - codeID -) -} -\arguments{ -\item{agencyID}{(string) Agency identificator.} - -\item{resourceID}{(string) Resource identificator.} - -\item{version}{(string) Specific resource version.} - -\item{codeID}{(string) Code identificator.} -} -\description{ -This function allows to consult a specific code of a version of a classification. -} -\examples{ -get_structuralresources_codelists_agency_resource_version_codes_codeid( - "ISTAC", "CL_AREA_ES", "01.000", "ES706A01" -) -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_classifications.R +\name{get_structuralresources_codelists_agency_resource_version_codes_codeid} +\alias{get_structuralresources_codelists_agency_resource_version_codes_codeid} +\title{Get codelists agency resource version codes (codeID)} +\usage{ +get_structuralresources_codelists_agency_resource_version_codes_codeid( + agencyID, + resourceID, + version, + codeID +) +} +\arguments{ +\item{agencyID}{(string) Agency identificator.} + +\item{resourceID}{(string) Resource identificator.} + +\item{version}{(string) Specific resource version.} + +\item{codeID}{(string) Code identificator.} +} +\description{ +This function allows to consult a specific code of a version of a classification. +} +\examples{ +get_structuralresources_codelists_agency_resource_version_codes_codeid( + "ISTAC", "CL_AREA_ES", "01.000", "ES706A01" +) +} diff --git a/man/get_structuralresources_concept_schemes.Rd b/man/get_structuralresources_concept_schemes.Rd index b8d2408..1dc9128 100644 --- a/man/get_structuralresources_concept_schemes.Rd +++ b/man/get_structuralresources_concept_schemes.Rd @@ -1,29 +1,29 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_concepts.R -\name{get_structuralresources_concept_schemes} -\alias{get_structuralresources_concept_schemes} -\title{Get concept schemes} -\usage{ -get_structuralresources_concept_schemes( - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/conceptschemes -} -\examples{ -get_structuralresources_concept_schemes() -get_structuralresources_concept_schemes(query = "ID EQ 2090", orderBy = "ID ASC") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_concepts.R +\name{get_structuralresources_concept_schemes} +\alias{get_structuralresources_concept_schemes} +\title{Get concept schemes} +\usage{ +get_structuralresources_concept_schemes( + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns the content from /v1.0/conceptschemes +} +\examples{ +get_structuralresources_concept_schemes() +get_structuralresources_concept_schemes(query = "ID EQ 2090", orderBy = "ID ASC") +} diff --git a/man/get_structuralresources_concept_schemes_agency.Rd b/man/get_structuralresources_concept_schemes_agency.Rd index 9b58c33..35ba5e9 100644 --- a/man/get_structuralresources_concept_schemes_agency.Rd +++ b/man/get_structuralresources_concept_schemes_agency.Rd @@ -1,32 +1,32 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_concepts.R -\name{get_structuralresources_concept_schemes_agency} -\alias{get_structuralresources_concept_schemes_agency} -\title{Get concept schemes agency} -\usage{ -get_structuralresources_concept_schemes_agency( - agencyID, - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/conceptschemes/{agencyID} -} -\examples{ -get_structuralresources_concept_schemes_agency("ISTAC") -get_structuralresources_concept_schemes_agency("ESTAT", query = "ID EQ 2090", orderBy = "ID ASC") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_concepts.R +\name{get_structuralresources_concept_schemes_agency} +\alias{get_structuralresources_concept_schemes_agency} +\title{Get concept schemes agency} +\usage{ +get_structuralresources_concept_schemes_agency( + agencyID, + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the agency that publishes.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns the content from /v1.0/conceptschemes/{agencyID} +} +\examples{ +get_structuralresources_concept_schemes_agency("ISTAC") +get_structuralresources_concept_schemes_agency("ESTAT", query = "ID EQ 2090", orderBy = "ID ASC") +} diff --git a/man/get_structuralresources_concept_schemes_agency_resource.Rd b/man/get_structuralresources_concept_schemes_agency_resource.Rd index 368f9fe..8dc7264 100644 --- a/man/get_structuralresources_concept_schemes_agency_resource.Rd +++ b/man/get_structuralresources_concept_schemes_agency_resource.Rd @@ -1,36 +1,36 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_concepts.R -\name{get_structuralresources_concept_schemes_agency_resource} -\alias{get_structuralresources_concept_schemes_agency_resource} -\title{Get concept schemes agency resource} -\usage{ -get_structuralresources_concept_schemes_agency_resource( - agencyID, - resourceID, - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/conceptschemes/{agencyID}/{resourceID} -} -\examples{ -get_structuralresources_concept_schemes_agency_resource( - agencyID = "ISTAC", resourceID = "CL_AREA_ES" -) -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_concepts.R +\name{get_structuralresources_concept_schemes_agency_resource} +\alias{get_structuralresources_concept_schemes_agency_resource} +\title{Get concept schemes agency resource} +\usage{ +get_structuralresources_concept_schemes_agency_resource( + agencyID, + resourceID, + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the agency that publishes.} + +\item{resourceID}{(string) Resource identifier.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns the content from /v1.0/conceptschemes/{agencyID}/{resourceID} +} +\examples{ +get_structuralresources_concept_schemes_agency_resource( + agencyID = "ISTAC", resourceID = "CL_AREA_ES" +) +} diff --git a/man/get_structuralresources_concept_schemes_agency_resource_version.Rd b/man/get_structuralresources_concept_schemes_agency_resource_version.Rd index a41f1a6..c08d87e 100644 --- a/man/get_structuralresources_concept_schemes_agency_resource_version.Rd +++ b/man/get_structuralresources_concept_schemes_agency_resource_version.Rd @@ -1,27 +1,27 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_concepts.R -\name{get_structuralresources_concept_schemes_agency_resource_version} -\alias{get_structuralresources_concept_schemes_agency_resource_version} -\title{Get concept schemes agency resource version} -\usage{ -get_structuralresources_concept_schemes_agency_resource_version( - agencyID, - resourceID, - version -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{version}{(string) Specific version of the resource.} -} -\description{ -This function returns the content from /v1.0/conceptschemes/{agencyID}/{resourceID}/{version} -} -\examples{ -get_structuralresources_concept_schemes_agency_resource_version( - agencyID = "ISTAC", resourceID = "CL_AREA", version = "01.000" -) -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_concepts.R +\name{get_structuralresources_concept_schemes_agency_resource_version} +\alias{get_structuralresources_concept_schemes_agency_resource_version} +\title{Get concept schemes agency resource version} +\usage{ +get_structuralresources_concept_schemes_agency_resource_version( + agencyID, + resourceID, + version +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the agency that publishes.} + +\item{resourceID}{(string) Resource identifier.} + +\item{version}{(string) Specific version of the resource.} +} +\description{ +This function returns the content from /v1.0/conceptschemes/{agencyID}/{resourceID}/{version} +} +\examples{ +get_structuralresources_concept_schemes_agency_resource_version( + agencyID = "ISTAC", resourceID = "CL_AREA", version = "01.000" +) +} diff --git a/man/get_structuralresources_concept_schemes_agency_resource_version_concepts.Rd b/man/get_structuralresources_concept_schemes_agency_resource_version_concepts.Rd index 8ed15c1..0faf283 100644 --- a/man/get_structuralresources_concept_schemes_agency_resource_version_concepts.Rd +++ b/man/get_structuralresources_concept_schemes_agency_resource_version_concepts.Rd @@ -1,39 +1,39 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_concepts.R -\name{get_structuralresources_concept_schemes_agency_resource_version_concepts} -\alias{get_structuralresources_concept_schemes_agency_resource_version_concepts} -\title{Get concept schemes agency resource version concepts} -\usage{ -get_structuralresources_concept_schemes_agency_resource_version_concepts( - agencyID, - resourceID, - version, - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{version}{(string) Specific version of the resource.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/conceptschemes/{agencyID}/{resourceID}/{version}/concepts -} -\examples{ -get_structuralresources_concept_schemes_agency_resource_version_concepts( - agencyID = "ISTAC", resourceID = "CL_AREA_ES", version = "01.000" -) -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_concepts.R +\name{get_structuralresources_concept_schemes_agency_resource_version_concepts} +\alias{get_structuralresources_concept_schemes_agency_resource_version_concepts} +\title{Get concept schemes agency resource version concepts} +\usage{ +get_structuralresources_concept_schemes_agency_resource_version_concepts( + agencyID, + resourceID, + version, + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the agency that publishes.} + +\item{resourceID}{(string) Resource identifier.} + +\item{version}{(string) Specific version of the resource.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns the content from /v1.0/conceptschemes/{agencyID}/{resourceID}/{version}/concepts +} +\examples{ +get_structuralresources_concept_schemes_agency_resource_version_concepts( + agencyID = "ISTAC", resourceID = "CL_AREA_ES", version = "01.000" +) +} diff --git a/man/get_structuralresources_concept_schemes_agency_resource_version_concepts_id.Rd b/man/get_structuralresources_concept_schemes_agency_resource_version_concepts_id.Rd index 9b40819..0c1ffba 100644 --- a/man/get_structuralresources_concept_schemes_agency_resource_version_concepts_id.Rd +++ b/man/get_structuralresources_concept_schemes_agency_resource_version_concepts_id.Rd @@ -1,30 +1,30 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_concepts.R -\name{get_structuralresources_concept_schemes_agency_resource_version_concepts_id} -\alias{get_structuralresources_concept_schemes_agency_resource_version_concepts_id} -\title{Get concept schemes agency resource version concepts (id)} -\usage{ -get_structuralresources_concept_schemes_agency_resource_version_concepts_id( - agencyID, - resourceID, - version, - conceptID -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{version}{(string) Specific version of the resource.} - -\item{conceptID}{(string) Concept identifier.} -} -\description{ -This function returns the content from /v1.0/conceptschemes/{agencyID}/{resourceID}/{version}/concepts/{conceptID} -} -\examples{ -get_structuralresources_concept_schemes_agency_resource_version_concepts_id( - agencyID = "ISTAC", resourceID = "CL_AREA_ES", version = "01.000", conceptID = 0 -) -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_concepts.R +\name{get_structuralresources_concept_schemes_agency_resource_version_concepts_id} +\alias{get_structuralresources_concept_schemes_agency_resource_version_concepts_id} +\title{Get concept schemes agency resource version concepts (id)} +\usage{ +get_structuralresources_concept_schemes_agency_resource_version_concepts_id( + agencyID, + resourceID, + version, + conceptID +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the agency that publishes.} + +\item{resourceID}{(string) Resource identifier.} + +\item{version}{(string) Specific version of the resource.} + +\item{conceptID}{(string) Concept identifier.} +} +\description{ +This function returns the content from /v1.0/conceptschemes/{agencyID}/{resourceID}/{version}/concepts/{conceptID} +} +\examples{ +get_structuralresources_concept_schemes_agency_resource_version_concepts_id( + agencyID = "ISTAC", resourceID = "CL_AREA_ES", version = "01.000", conceptID = 0 +) +} diff --git a/man/get_structuralresources_concept_types.Rd b/man/get_structuralresources_concept_types.Rd index 8339264..16fb945 100644 --- a/man/get_structuralresources_concept_types.Rd +++ b/man/get_structuralresources_concept_types.Rd @@ -1,14 +1,14 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_concepts.R -\name{get_structuralresources_concept_types} -\alias{get_structuralresources_concept_types} -\title{Get concept types} -\usage{ -get_structuralresources_concept_types() -} -\description{ -This function returns the content from /v1.0/conceptTypes -} -\examples{ -get_structuralresources_concept_types() +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_concepts.R +\name{get_structuralresources_concept_types} +\alias{get_structuralresources_concept_types} +\title{Get concept types} +\usage{ +get_structuralresources_concept_types() +} +\description{ +This function returns the content from /v1.0/conceptTypes +} +\examples{ +get_structuralresources_concept_types() } diff --git a/man/get_structuralresources_content_constraints.Rd b/man/get_structuralresources_content_constraints.Rd index e5e9ec7..fccf06e 100644 --- a/man/get_structuralresources_content_constraints.Rd +++ b/man/get_structuralresources_content_constraints.Rd @@ -1,29 +1,29 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_datastructures.R -\name{get_structuralresources_content_constraints} -\alias{get_structuralresources_content_constraints} -\title{Get content constraints} -\usage{ -get_structuralresources_content_constraints( - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/contentConstraints -} -\examples{ -get_structuralresources_content_constraints() -get_structuralresources_content_constraints(query = "ID EQ 2090", orderBy = "ID ASC") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_datastructures.R +\name{get_structuralresources_content_constraints} +\alias{get_structuralresources_content_constraints} +\title{Get content constraints} +\usage{ +get_structuralresources_content_constraints( + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns the content from /v1.0/contentConstraints +} +\examples{ +get_structuralresources_content_constraints() +get_structuralresources_content_constraints(query = "ID EQ 2090", orderBy = "ID ASC") +} diff --git a/man/get_structuralresources_content_constraints_agency.Rd b/man/get_structuralresources_content_constraints_agency.Rd index d00180a..fb4fe93 100644 --- a/man/get_structuralresources_content_constraints_agency.Rd +++ b/man/get_structuralresources_content_constraints_agency.Rd @@ -1,31 +1,31 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_datastructures.R -\name{get_structuralresources_content_constraints_agency} -\alias{get_structuralresources_content_constraints_agency} -\title{Get content constraints agency} -\usage{ -get_structuralresources_content_constraints_agency( - agencyID, - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/contentConstraints/{agencyID} -} -\examples{ -get_structuralresources_content_constraints_agency("ISTAC") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_datastructures.R +\name{get_structuralresources_content_constraints_agency} +\alias{get_structuralresources_content_constraints_agency} +\title{Get content constraints agency} +\usage{ +get_structuralresources_content_constraints_agency( + agencyID, + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the agency that publishes.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns the content from /v1.0/contentConstraints/{agencyID} +} +\examples{ +get_structuralresources_content_constraints_agency("ISTAC") +} diff --git a/man/get_structuralresources_content_constraints_agency_resource.Rd b/man/get_structuralresources_content_constraints_agency_resource.Rd index 9c5efe9..cbb9586 100644 --- a/man/get_structuralresources_content_constraints_agency_resource.Rd +++ b/man/get_structuralresources_content_constraints_agency_resource.Rd @@ -1,34 +1,34 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_datastructures.R -\name{get_structuralresources_content_constraints_agency_resource} -\alias{get_structuralresources_content_constraints_agency_resource} -\title{Get content constraints agency resource} -\usage{ -get_structuralresources_content_constraints_agency_resource( - agencyID, - resourceID, - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/contentConstraints/{agencyID}/{resourceID} -} -\examples{ -get_structuralresources_content_constraints_agency_resource("ISTAC", "CL_AREA") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_datastructures.R +\name{get_structuralresources_content_constraints_agency_resource} +\alias{get_structuralresources_content_constraints_agency_resource} +\title{Get content constraints agency resource} +\usage{ +get_structuralresources_content_constraints_agency_resource( + agencyID, + resourceID, + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the agency that publishes.} + +\item{resourceID}{(string) Resource identifier.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns the content from /v1.0/contentConstraints/{agencyID}/{resourceID} +} +\examples{ +get_structuralresources_content_constraints_agency_resource("ISTAC", "CL_AREA") +} diff --git a/man/get_structuralresources_content_constraints_agency_resource_version.Rd b/man/get_structuralresources_content_constraints_agency_resource_version.Rd index ec7849a..8b21bf3 100644 --- a/man/get_structuralresources_content_constraints_agency_resource_version.Rd +++ b/man/get_structuralresources_content_constraints_agency_resource_version.Rd @@ -1,25 +1,25 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_datastructures.R -\name{get_structuralresources_content_constraints_agency_resource_version} -\alias{get_structuralresources_content_constraints_agency_resource_version} -\title{Get content constraints agency resource version} -\usage{ -get_structuralresources_content_constraints_agency_resource_version( - agencyID, - resourceID, - version -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{version}{(string) Specific version of the resource.} -} -\description{ -This function returns the content from /v1.0/contentConstraints/{agencyID}/{resourceID}/{version} -} -\examples{ -get_structuralresources_content_constraints_agency_resource_version("ISTAC", "CL_AREA", "01.000") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_datastructures.R +\name{get_structuralresources_content_constraints_agency_resource_version} +\alias{get_structuralresources_content_constraints_agency_resource_version} +\title{Get content constraints agency resource version} +\usage{ +get_structuralresources_content_constraints_agency_resource_version( + agencyID, + resourceID, + version +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the agency that publishes.} + +\item{resourceID}{(string) Resource identifier.} + +\item{version}{(string) Specific version of the resource.} +} +\description{ +This function returns the content from /v1.0/contentConstraints/{agencyID}/{resourceID}/{version} +} +\examples{ +get_structuralresources_content_constraints_agency_resource_version("ISTAC", "CL_AREA", "01.000") +} diff --git a/man/get_structuralresources_content_constraints_agency_resource_version_regions.Rd b/man/get_structuralresources_content_constraints_agency_resource_version_regions.Rd index 3c2aef0..33e64b7 100644 --- a/man/get_structuralresources_content_constraints_agency_resource_version_regions.Rd +++ b/man/get_structuralresources_content_constraints_agency_resource_version_regions.Rd @@ -1,30 +1,30 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_datastructures.R -\name{get_structuralresources_content_constraints_agency_resource_version_regions} -\alias{get_structuralresources_content_constraints_agency_resource_version_regions} -\title{Get content constraints agency resource version regions} -\usage{ -get_structuralresources_content_constraints_agency_resource_version_regions( - regionCode, - agencyID, - resourceID, - version -) -} -\arguments{ -\item{regionCode}{(string) Region code.} - -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{version}{(string) Specific version of the resource.} -} -\description{ -This function returns the content from /v1.0/contentConstraints/{agencyID}/{resourceID}/{version}/regions/{regionCode} -} -\examples{ -get_structuralresources_content_constraints_agency_resource_version_regions( - "0001", "ISTAC", "CL_AREA", "01.000" -) -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_datastructures.R +\name{get_structuralresources_content_constraints_agency_resource_version_regions} +\alias{get_structuralresources_content_constraints_agency_resource_version_regions} +\title{Get content constraints agency resource version regions} +\usage{ +get_structuralresources_content_constraints_agency_resource_version_regions( + regionCode, + agencyID, + resourceID, + version +) +} +\arguments{ +\item{regionCode}{(string) Region code.} + +\item{agencyID}{(string) Identifier of the agency that publishes.} + +\item{resourceID}{(string) Resource identifier.} + +\item{version}{(string) Specific version of the resource.} +} +\description{ +This function returns the content from /v1.0/contentConstraints/{agencyID}/{resourceID}/{version}/regions/{regionCode} +} +\examples{ +get_structuralresources_content_constraints_agency_resource_version_regions( + "0001", "ISTAC", "CL_AREA", "01.000" +) +} diff --git a/man/get_structuralresources_data_structures.Rd b/man/get_structuralresources_data_structures.Rd index 436f5fc..d46b8a7 100644 --- a/man/get_structuralresources_data_structures.Rd +++ b/man/get_structuralresources_data_structures.Rd @@ -1,29 +1,29 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_datastructures.R -\name{get_structuralresources_data_structures} -\alias{get_structuralresources_data_structures} -\title{Get data structures} -\usage{ -get_structuralresources_data_structures( - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/datastructures -} -\examples{ -get_structuralresources_data_structures() -get_structuralresources_data_structures(query = "ID EQ 2090", orderBy = "ID ASC") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_datastructures.R +\name{get_structuralresources_data_structures} +\alias{get_structuralresources_data_structures} +\title{Get data structures} +\usage{ +get_structuralresources_data_structures( + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns the content from /v1.0/datastructures +} +\examples{ +get_structuralresources_data_structures() +get_structuralresources_data_structures(query = "ID EQ 2090", orderBy = "ID ASC") +} diff --git a/man/get_structuralresources_data_structures_agency.Rd b/man/get_structuralresources_data_structures_agency.Rd index 4f5124c..0e6459e 100644 --- a/man/get_structuralresources_data_structures_agency.Rd +++ b/man/get_structuralresources_data_structures_agency.Rd @@ -1,31 +1,31 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_datastructures.R -\name{get_structuralresources_data_structures_agency} -\alias{get_structuralresources_data_structures_agency} -\title{Get data structures agency} -\usage{ -get_structuralresources_data_structures_agency( - agencyID, - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/datastructures/{agencyID} -} -\examples{ -get_structuralresources_data_structures_agency("ISTAC") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_datastructures.R +\name{get_structuralresources_data_structures_agency} +\alias{get_structuralresources_data_structures_agency} +\title{Get data structures agency} +\usage{ +get_structuralresources_data_structures_agency( + agencyID, + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the agency that publishes.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns the content from /v1.0/datastructures/{agencyID} +} +\examples{ +get_structuralresources_data_structures_agency("ISTAC") +} diff --git a/man/get_structuralresources_data_structures_agency_resource.Rd b/man/get_structuralresources_data_structures_agency_resource.Rd index b430ddc..883d77d 100644 --- a/man/get_structuralresources_data_structures_agency_resource.Rd +++ b/man/get_structuralresources_data_structures_agency_resource.Rd @@ -1,34 +1,34 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_datastructures.R -\name{get_structuralresources_data_structures_agency_resource} -\alias{get_structuralresources_data_structures_agency_resource} -\title{Get data structures agency resource} -\usage{ -get_structuralresources_data_structures_agency_resource( - agencyID, - resourceID, - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns the content from /v1.0/datastructures/{agencyID}/{resourceID} -} -\examples{ -get_structuralresources_data_structures_agency_resource("ISTAC", "CL_AREA") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_datastructures.R +\name{get_structuralresources_data_structures_agency_resource} +\alias{get_structuralresources_data_structures_agency_resource} +\title{Get data structures agency resource} +\usage{ +get_structuralresources_data_structures_agency_resource( + agencyID, + resourceID, + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the agency that publishes.} + +\item{resourceID}{(string) Resource identifier.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns the content from /v1.0/datastructures/{agencyID}/{resourceID} +} +\examples{ +get_structuralresources_data_structures_agency_resource("ISTAC", "CL_AREA") +} diff --git a/man/get_structuralresources_data_structures_agency_resource_version.Rd b/man/get_structuralresources_data_structures_agency_resource_version.Rd index 8639fb3..02fe970 100644 --- a/man/get_structuralresources_data_structures_agency_resource_version.Rd +++ b/man/get_structuralresources_data_structures_agency_resource_version.Rd @@ -1,25 +1,25 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_datastructures.R -\name{get_structuralresources_data_structures_agency_resource_version} -\alias{get_structuralresources_data_structures_agency_resource_version} -\title{Get data structures agency resource version} -\usage{ -get_structuralresources_data_structures_agency_resource_version( - agencyID, - resourceID, - version -) -} -\arguments{ -\item{agencyID}{(string) Identifier of the agency that publishes.} - -\item{resourceID}{(string) Resource identifier.} - -\item{version}{(string) Specific version of the resource.} -} -\description{ -This function returns the content from /v1.0/datastructures/{agencyID}/{resourceID}/{version} -} -\examples{ -get_structuralresources_data_structures_agency_resource_version("ISTAC", "CL_AREA", "01.000") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_datastructures.R +\name{get_structuralresources_data_structures_agency_resource_version} +\alias{get_structuralresources_data_structures_agency_resource_version} +\title{Get data structures agency resource version} +\usage{ +get_structuralresources_data_structures_agency_resource_version( + agencyID, + resourceID, + version +) +} +\arguments{ +\item{agencyID}{(string) Identifier of the agency that publishes.} + +\item{resourceID}{(string) Resource identifier.} + +\item{version}{(string) Specific version of the resource.} +} +\description{ +This function returns the content from /v1.0/datastructures/{agencyID}/{resourceID}/{version} +} +\examples{ +get_structuralresources_data_structures_agency_resource_version("ISTAC", "CL_AREA", "01.000") +} diff --git a/man/get_structuralresources_geoinfo.Rd b/man/get_structuralresources_geoinfo.Rd index d6913c1..48c836c 100644 --- a/man/get_structuralresources_geoinfo.Rd +++ b/man/get_structuralresources_geoinfo.Rd @@ -1,37 +1,37 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_variables.R -\name{get_structuralresources_geoinfo} -\alias{get_structuralresources_geoinfo} -\title{Get geoinfo} -\usage{ -get_structuralresources_geoinfo( - variableID, - resourceID, - fields = NULL, - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{variableID}{(string) Variable identificator.} - -\item{resourceID}{(string) Resource identificator.} - -\item{fields}{(string) Additional fields that you want to show in the answer.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns data from /v1.0/variables/{variableID}/variableelements/{resourceID}/geoinfo -} -\examples{ -geoinfo <- get_structuralresources_geoinfo("VR_TERRITORIO", "MUN_ICOD_VINOS") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_variables.R +\name{get_structuralresources_geoinfo} +\alias{get_structuralresources_geoinfo} +\title{Get geoinfo} +\usage{ +get_structuralresources_geoinfo( + variableID, + resourceID, + fields = NULL, + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{variableID}{(string) Variable identificator.} + +\item{resourceID}{(string) Resource identificator.} + +\item{fields}{(string) Additional fields that you want to show in the answer.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns data from /v1.0/variables/{variableID}/variableelements/{resourceID}/geoinfo +} +\examples{ +geoinfo <- get_structuralresources_geoinfo("VR_TERRITORIO", "MUN_ICOD_VINOS") +} diff --git a/man/get_structuralresources_variable_families.Rd b/man/get_structuralresources_variable_families.Rd index 121edef..36b31b6 100644 --- a/man/get_structuralresources_variable_families.Rd +++ b/man/get_structuralresources_variable_families.Rd @@ -1,28 +1,28 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_variables.R -\name{get_structuralresources_variable_families} -\alias{get_structuralresources_variable_families} -\title{Get variable families} -\usage{ -get_structuralresources_variable_families( - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns data from /v1.0/variablefamilies -} -\examples{ -get_structuralresources_variable_families() -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_variables.R +\name{get_structuralresources_variable_families} +\alias{get_structuralresources_variable_families} +\title{Get variable families} +\usage{ +get_structuralresources_variable_families( + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns data from /v1.0/variablefamilies +} +\examples{ +get_structuralresources_variable_families() +} diff --git a/man/get_structuralresources_variable_families_id.Rd b/man/get_structuralresources_variable_families_id.Rd index 0485f19..7613b3a 100644 --- a/man/get_structuralresources_variable_families_id.Rd +++ b/man/get_structuralresources_variable_families_id.Rd @@ -1,17 +1,17 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_variables.R -\name{get_structuralresources_variable_families_id} -\alias{get_structuralresources_variable_families_id} -\title{Get variable families (id)} -\usage{ -get_structuralresources_variable_families_id(id) -} -\arguments{ -\item{id}{(string) Variable family identificator.} -} -\description{ -This function returns data from /v1.0/variablefamilies/{id} -} -\examples{ -get_structuralresources_variable_families_id("VRF_DEMOGRAFICAS") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_variables.R +\name{get_structuralresources_variable_families_id} +\alias{get_structuralresources_variable_families_id} +\title{Get variable families (id)} +\usage{ +get_structuralresources_variable_families_id(id) +} +\arguments{ +\item{id}{(string) Variable family identificator.} +} +\description{ +This function returns data from /v1.0/variablefamilies/{id} +} +\examples{ +get_structuralresources_variable_families_id("VRF_DEMOGRAFICAS") +} diff --git a/man/get_structuralresources_variable_families_id_variables.Rd b/man/get_structuralresources_variable_families_id_variables.Rd index 0009986..08cdd92 100644 --- a/man/get_structuralresources_variable_families_id_variables.Rd +++ b/man/get_structuralresources_variable_families_id_variables.Rd @@ -1,31 +1,31 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_variables.R -\name{get_structuralresources_variable_families_id_variables} -\alias{get_structuralresources_variable_families_id_variables} -\title{Get variable families (id) variables} -\usage{ -get_structuralresources_variable_families_id_variables( - id, - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{id}{(string) Variable family identificator.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns data from /v1.0/variablefamilies/{id}/variables -} -\examples{ -get_structuralresources_variable_families_id_variables("VRF_DEMOGRAFICAS") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_variables.R +\name{get_structuralresources_variable_families_id_variables} +\alias{get_structuralresources_variable_families_id_variables} +\title{Get variable families (id) variables} +\usage{ +get_structuralresources_variable_families_id_variables( + id, + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{id}{(string) Variable family identificator.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns data from /v1.0/variablefamilies/{id}/variables +} +\examples{ +get_structuralresources_variable_families_id_variables("VRF_DEMOGRAFICAS") +} diff --git a/man/get_structuralresources_variableelements.Rd b/man/get_structuralresources_variableelements.Rd index 7f564b7..52caf90 100644 --- a/man/get_structuralresources_variableelements.Rd +++ b/man/get_structuralresources_variableelements.Rd @@ -1,31 +1,31 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_variables.R -\name{get_structuralresources_variableelements} -\alias{get_structuralresources_variableelements} -\title{Get variableelements} -\usage{ -get_structuralresources_variableelements( - variableID, - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{variableID}{(string) Variable identificator.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns data from /v1.0/variables/{variableID}/variableelements -} -\examples{ -get_structuralresources_variableelements("VR_SEXO") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_variables.R +\name{get_structuralresources_variableelements} +\alias{get_structuralresources_variableelements} +\title{Get variableelements} +\usage{ +get_structuralresources_variableelements( + variableID, + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{variableID}{(string) Variable identificator.} + +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns data from /v1.0/variables/{variableID}/variableelements +} +\examples{ +get_structuralresources_variableelements("VR_SEXO") +} diff --git a/man/get_structuralresources_variableelements_resource.Rd b/man/get_structuralresources_variableelements_resource.Rd index 0f8f90c..2c3ce0d 100644 --- a/man/get_structuralresources_variableelements_resource.Rd +++ b/man/get_structuralresources_variableelements_resource.Rd @@ -1,20 +1,20 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_variables.R -\name{get_structuralresources_variableelements_resource} -\alias{get_structuralresources_variableelements_resource} -\title{Get variableelements resource} -\usage{ -get_structuralresources_variableelements_resource(variableID, resourceID) -} -\arguments{ -\item{variableID}{(string) Variable identificator.} - -\item{resourceID}{(string) Resource identificator.} -} -\description{ -This function returns data from /v1.0/variables/{variableID}/variableelements/{resourceID} -} -\examples{ -get_structuralresources_variableelements_resource("VR_SEXO", "FEMALE") -get_structuralresources_variableelements_resource("VR_TERRITORIO", "CCAA_CANARIAS") -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_variables.R +\name{get_structuralresources_variableelements_resource} +\alias{get_structuralresources_variableelements_resource} +\title{Get variableelements resource} +\usage{ +get_structuralresources_variableelements_resource(variableID, resourceID) +} +\arguments{ +\item{variableID}{(string) Variable identificator.} + +\item{resourceID}{(string) Resource identificator.} +} +\description{ +This function returns data from /v1.0/variables/{variableID}/variableelements/{resourceID} +} +\examples{ +get_structuralresources_variableelements_resource("VR_SEXO", "FEMALE") +get_structuralresources_variableelements_resource("VR_TERRITORIO", "CCAA_CANARIAS") +} diff --git a/man/get_structuralresources_variables.Rd b/man/get_structuralresources_variables.Rd index e959a3c..b553b14 100644 --- a/man/get_structuralresources_variables.Rd +++ b/man/get_structuralresources_variables.Rd @@ -1,28 +1,28 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_variables.R -\name{get_structuralresources_variables} -\alias{get_structuralresources_variables} -\title{Get variables} -\usage{ -get_structuralresources_variables( - limit = 25, - offset = 0, - query = NULL, - orderBy = NULL -) -} -\arguments{ -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns data from /v1.0/variables -} -\examples{ -get_structuralresources_variables() -} +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_variables.R +\name{get_structuralresources_variables} +\alias{get_structuralresources_variables} +\title{Get variables} +\usage{ +get_structuralresources_variables( + limit = 25, + offset = 0, + query = NULL, + orderBy = NULL +) +} +\arguments{ +\item{limit}{(int) Results limit. By default \code{limit = 25}.} + +\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} + +\item{query}{(string) Query to filter the results.} + +\item{orderBy}{(string) Field by which to sort the results.} +} +\description{ +This function returns data from /v1.0/variables +} +\examples{ +get_structuralresources_variables() +} diff --git a/man/get_structuralresources_variables_id.Rd b/man/get_structuralresources_variables_id.Rd index ded42bc..3463bf5 100644 --- a/man/get_structuralresources_variables_id.Rd +++ b/man/get_structuralresources_variables_id.Rd @@ -1,17 +1,17 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_variables.R -\name{get_structuralresources_variables_id} -\alias{get_structuralresources_variables_id} -\title{Get variables (id)} -\usage{ -get_structuralresources_variables_id(id) -} -\arguments{ -\item{id}{(string) Variable identificator.} -} -\description{ -This function returns data from /v1.0/variables/{id} -} -\examples{ -get_structuralresources_variables_id("VR_SEXO") +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural_resources_variables.R +\name{get_structuralresources_variables_id} +\alias{get_structuralresources_variables_id} +\title{Get variables (id)} +\usage{ +get_structuralresources_variables_id(id) +} +\arguments{ +\item{id}{(string) Variable identificator.} +} +\description{ +This function returns data from /v1.0/variables/{id} +} +\examples{ +get_structuralresources_variables_id("VR_SEXO") } diff --git a/man/get_variable_families.Rd b/man/get_variable_families.Rd deleted file mode 100644 index 53d943d..0000000 --- a/man/get_variable_families.Rd +++ /dev/null @@ -1,24 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_variables.R -\name{get_variable_families} -\alias{get_variable_families} -\title{Get variable families} -\usage{ -get_variable_families(limit = 25, offset = 0, query = NULL, - orderBy = NULL) -} -\arguments{ -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns data from /v1.0/variablefamilies -} -\examples{ -get_variable_families() -} diff --git a/man/get_variable_families_id.Rd b/man/get_variable_families_id.Rd deleted file mode 100644 index 88c43f8..0000000 --- a/man/get_variable_families_id.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_variables.R -\name{get_variable_families_id} -\alias{get_variable_families_id} -\title{Get variable families (id)} -\usage{ -get_variable_families_id(id) -} -\arguments{ -\item{id}{(string) Variable family identificator.} -} -\description{ -This function returns data from /v1.0/variablefamilies/{id} -} -\examples{ -get_variable_families_id("VRF_DEMOGRAFICAS") -} diff --git a/man/get_variable_families_id_variables.Rd b/man/get_variable_families_id_variables.Rd deleted file mode 100644 index 05276e2..0000000 --- a/man/get_variable_families_id_variables.Rd +++ /dev/null @@ -1,26 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_variables.R -\name{get_variable_families_id_variables} -\alias{get_variable_families_id_variables} -\title{Get variable families (id) variables} -\usage{ -get_variable_families_id_variables(id, limit = 25, offset = 0, - query = NULL, orderBy = NULL) -} -\arguments{ -\item{id}{(string) Variable family identificator.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns data from /v1.0/variablefamilies/{id}/variables -} -\examples{ -get_variable_families_id_variables("VRF_DEMOGRAFICAS") -} diff --git a/man/get_variableelements.Rd b/man/get_variableelements.Rd deleted file mode 100644 index 8cd2bb2..0000000 --- a/man/get_variableelements.Rd +++ /dev/null @@ -1,26 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_variables.R -\name{get_variableelements} -\alias{get_variableelements} -\title{Get variableelements} -\usage{ -get_variableelements(variableID, limit = 25, offset = 0, - query = NULL, orderBy = NULL) -} -\arguments{ -\item{variableID}{(string) Variable identificator.} - -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns data from /v1.0/variables/{variableID}/variableelements -} -\examples{ -get_variableelements("VR_SEXO") -} diff --git a/man/get_variableelements_resource.Rd b/man/get_variableelements_resource.Rd deleted file mode 100644 index 9df0231..0000000 --- a/man/get_variableelements_resource.Rd +++ /dev/null @@ -1,20 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_variables.R -\name{get_variableelements_resource} -\alias{get_variableelements_resource} -\title{Get variableelements resource} -\usage{ -get_variableelements_resource(variableID, resourceID) -} -\arguments{ -\item{variableID}{(string) Variable identificator.} - -\item{resourceID}{(string) Resource identificator.} -} -\description{ -This function returns data from /v1.0/variables/{variableID}/variableelements/{resourceID} -} -\examples{ -get_variableelements_resource("VR_SEXO", "FEMALE") -get_variableelements_resource("VR_TERRITORIO", "CCAA_CANARIAS") -} diff --git a/man/get_variables.Rd b/man/get_variables.Rd deleted file mode 100644 index 31daa34..0000000 --- a/man/get_variables.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_variables.R -\name{get_variables} -\alias{get_variables} -\title{Get variables} -\usage{ -get_variables(limit = 25, offset = 0, query = NULL, orderBy = NULL) -} -\arguments{ -\item{limit}{(int) Results limit. By default \code{limit = 25}.} - -\item{offset}{(int) Displacement. Result from which it is returned. By default \code{offset = 0}.} - -\item{query}{(string) Query to filter the results.} - -\item{orderBy}{(string) Field by which to sort the results.} -} -\description{ -This function returns data from /v1.0/variables -} -\examples{ -get_variables() -} diff --git a/man/get_variables_id.Rd b/man/get_variables_id.Rd deleted file mode 100644 index 8a13b63..0000000 --- a/man/get_variables_id.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/structural_resources_variables.R -\name{get_variables_id} -\alias{get_variables_id} -\title{Get variables (id)} -\usage{ -get_variables_id(id) -} -\arguments{ -\item{id}{(string) Variable identificator.} -} -\description{ -This function returns data from /v1.0/variables/{id} -} -\examples{ -get_variables_id("VR_SEXO") -} diff --git a/tests/testthat.R b/tests/testthat.R new file mode 100644 index 0000000..d13ec65 --- /dev/null +++ b/tests/testthat.R @@ -0,0 +1,4 @@ +library(testthat) +library(istacr) + +test_check("istacr") diff --git a/tests/testthat/test-indicators_auxiliary_value_tables.R b/tests/testthat/test-indicators_auxiliary_value_tables.R new file mode 100644 index 0000000..d11e445 --- /dev/null +++ b/tests/testthat/test-indicators_auxiliary_value_tables.R @@ -0,0 +1,79 @@ +## get_indicators_geographic_granularities +test_that("get_indicators_geographic_granularities() returns a list", { + ind <- get_indicators_geographic_granularities() + expect_is(ind, "list") +}) + + +test_that("get_indicators_geographic_granularities() items slot returns a data.frame", { + ind <- get_indicators_geographic_granularities() + expect_is(ind$items, "data.frame") +}) + + +test_that("get_indicators_geographic_granularities() has more than one language", { + ind <- get_indicators_geographic_granularities() + expect_gte(length(names(ind$items$title)[!names(ind$items$title) %in% "__default__"]), 2) +}) + + + +## get_indicators_geographical_values() +test_that("Find error when no geographicalGranularityCode is provided", { + expect_error(get_indicators_geographical_values()) +}) + +test_that("Ensure there're at least 17 regions", { + ind <- get_indicators_geographical_values(geographicalGranularityCode = "REGIONS") + expect_gte(nrow(ind$items), 17) +}) + + +test_that("Ensure Canarias is among the regions", { + ind <- get_indicators_geographical_values(geographicalGranularityCode = "REGIONS") + testthat::expect_true(any(ind$items$title$es == "Canarias")) +}) + + +test_that("Ensure Canarias is among the regions", { + ind <- get_indicators_geographical_values("REGIONS", subjectCode = "051", systemCode = "C00067A") + testthat::expect_true(any(ind$items$title$es == "Canarias")) +}) + + +## get_indicators_subjects() +test_that("get_indicators_subjects() returns a list", { + ind <- get_indicators_subjects() + expect_is(ind, "list") +}) + + +test_that("get_indicators_subjects() items slot returns a data.frame", { + ind <- get_indicators_subjects() + expect_is(ind$items, "data.frame") +}) + +## get_indicators_time_granularities() +test_that("get_indicators_time_granularities() returns a list", { + ind <- get_indicators_time_granularities() + expect_is(ind, "list") +}) + + +test_that("get_indicators_time_granularities() items slot returns a data.frame", { + ind <- get_indicators_time_granularities() + expect_is(ind$items, "data.frame") +}) + + +test_that("get_indicators_time_granularities() id contains all the time frequencies", { + ind <- get_indicators_time_granularities() + expect_equal(ind$items$code, c("YEARLY", "BIYEARLY", "QUARTERLY", "FOUR_MONTHLY", "MONTHLY", + "WEEKLY", "DAILY", "HOURLY")) +}) + + +test_that("get_indicators_time_granularities() has more than one language", { + ind <- get_indicators_time_granularities() + expect_gte(length(names(ind$items$title)[!names(ind$items$title) %in% "__default__"]), 2) +}) diff --git a/tests/testthat/test-indicators_indicators.R b/tests/testthat/test-indicators_indicators.R new file mode 100644 index 0000000..bc001f9 --- /dev/null +++ b/tests/testthat/test-indicators_indicators.R @@ -0,0 +1,82 @@ +## get_indicators() +test_that("get_indicators() returns a list", { + ind <- get_indicators() + expect_is(ind, "list") +}) + + +test_that("get_indicators() items slot returns a data.frame", { + ind <- get_indicators() + expect_is(ind$items, "data.frame") +}) + +test_that("get_indicators() has more than one language", { + ind <- get_indicators() + expect_gte(length(names(ind$items$title)[!names(ind$items$title) %in% "__default__"]), 2) +}) + + + +test_that("get_indicators() has kind indicator", { + ind <- get_indicators( + q = 'id IN ("AFILIACIONES", "EMPLEO_REGISTRADO_AGRICULTURA")', + order = "id ASC", fields = "+data", representation = + "GEOGRAPHICAL[35003|35005],MEASURE[ABSOLUTE]" + ) + expect_true(all(ind$kind == "indicators#indicators")) +}) + + +test_that("get_indicators() offset is correctly set", { + ind <- get_indicators( + q = 'id IN ("AFILIACIONES", "EMPLEO_REGISTRADO_AGRICULTURA")', + order = "id ASC", + fields = "+data", + representation = "GEOGRAPHICAL[35003|35005],MEASURE[ABSOLUTE]" + ) + expect_equal(grep("offset=0", x = ind$selfLink), 1) + + + ind <- get_indicators( + q = 'id IN ("AFILIACIONES", "EMPLEO_REGISTRADO_AGRICULTURA")', + order = "id ASC", + fields = "+data", + representation = + "GEOGRAPHICAL[35003|35005],MEASURE[ABSOLUTE]", + offset = 25 + ) + expect_equal(grep("offset=25", x = ind$selfLink), 1) +}) + + +## get_indicators_code() +test_that("get_indicators_code() needs arguments to work", { + expect_error(get_indicators_code()) +}) + + +test_that("get_indicators_code() needs existing codes", { + expect_equal(length(get_indicators_code('TURISTA')), 0) +}) + + +test_that("get_indicators_code() returns a list", { + ind <- get_indicators_code('TURISTAS') + expect_is(ind, "list") +}) + + +## get_indicators_code_data() +test_that("get_indicators_code_data() needs arguments to work", { + expect_error(get_indicators_code_data()) +}) + +test_that("get_indicators_code_data() needs existing codes", { + expect_equal(length(get_indicators_code_data('TURISTA')), 0) +}) + + +test_that("get_indicators_code_data() returns a list", { + ind <- get_indicators_code_data('TURISTAS') + expect_is(ind, "list") +}) diff --git a/tests/testthat/test-indicators_indicators_systems.R b/tests/testthat/test-indicators_indicators_systems.R new file mode 100644 index 0000000..34b049f --- /dev/null +++ b/tests/testthat/test-indicators_indicators_systems.R @@ -0,0 +1,58 @@ +## get_indicators_systems +test_that("get_indicators_systems() returns a list", { + ind <- get_indicators_systems() + expect_is(ind, "list") +}) + +test_that("get_indicators_systems() items slot returns a data.frame", { + ind <- get_indicators_systems() + expect_is(ind$items, "data.frame") +}) + + +test_that("get_indicators_systems() has more than one language", { + ind <- get_indicators_systems() + expect_gte(length(names(ind$items$title)[!names(ind$items$title) %in% "__default__"]), 2) +}) + +test_that("get_indicators_systems() limit is 25", { + ind <- get_indicators_systems() + expect_equal(ind$limit, 25) +}) + + + +## get_indicators_systems_code() +test_that("Find error when no indicators systems code is provided", { + expect_error(get_indicators_systems_code()) +}) + + +test_that("get_indicators_systems_code() elements slot returns a data.frame", { + ind <- get_indicators_systems_code("C00075H") + expect_is(ind$elements, "data.frame") +}) + + +## get_indicators_systems_code_instances() +test_that("get_indicators_systems_code_instances fails when no indicators systems code is provided", { + expect_error(get_indicators_systems_code_instances()) +}) + + +## get_indicators_systems_code_instances_code() +test_that("get_indicators_systems_code_instances_code fails when no indicators systems code is provided", { + expect_error(get_indicators_systems_code_instances_code()) +}) + + +## get_indicators_systems_code_instances_code_data() +test_that("get_indicators_systems_code_instances_code_data fails when no indicators systems code is provided", { + expect_error(get_indicators_systems_code_instances_code_data()) +}) + + +test_that("get_indicators_systems_code_instances_code_data() attribute slot returns a data.frame", { + ind <- get_indicators_systems_code_instances_code_data("C00075H", "21af0477-d63b-493b-ad02-4ab181547223") + expect_is(ind$attribute, "data.frame") +}) diff --git a/tests/testthat/test-statistical_resources_cubes.R b/tests/testthat/test-statistical_resources_cubes.R new file mode 100644 index 0000000..68484e5 --- /dev/null +++ b/tests/testthat/test-statistical_resources_cubes.R @@ -0,0 +1,43 @@ +## get_datasets_agency() +test_that("get_datasets_agency(agencyID = 'ISTAC') returns a list", { + ind <- get_datasets_agency(agencyID = "ISTAC") + expect_is(ind, "list") +}) + +test_that("get_datasets_agency(agencyID = 'ISTAC') items slot returns a data.frame", { + ind <- get_datasets_agency(agencyID = 'ISTAC') + expect_is(ind$dataset, "data.frame") +}) + + +test_that("get_datasets_agency() returns an error", { + expect_error(get_datasets_agency()) +}) + + +test_that("get_datasets_agency(agencyID = 'ISTAC') are 25", { + ind <- get_datasets_agency(agencyID = 'ISTAC') + expect_gte(nrow(ind$dataset), 25) +}) + + +## get_datasets_agency_resource() +test_that("get_datasets_agency_resource() returns an error", { + expect_error(get_datasets_agency_resource()) +}) + +test_that("get_datasets_agency_resource(agencyID = 'ISTAC', resourceID = 'C00010A_000002') returns a list", { + ind <- get_datasets_agency_resource(agencyID = 'ISTAC', resourceID = 'C00010A_000002') + expect_is(ind, "list") +}) + +test_that("get_datasets_agency_resource(agencyID = 'ISTAC', resourceID = 'C00010A_000002') items slot returns a data.frame", { + ind <- get_datasets_agency_resource(agencyID = 'ISTAC', resourceID = 'C00010A_000002') + expect_is(ind$dataset, "data.frame") +}) + + +## get_datasets_agency_resource_version() +test_that("get_datasets_agency_resource_version() returns an error", { + expect_error(get_datasets_agency_resource_version()) +}) diff --git a/tests/testthat/test-structural_resources_category.R b/tests/testthat/test-structural_resources_category.R new file mode 100644 index 0000000..1d153c9 --- /dev/null +++ b/tests/testthat/test-structural_resources_category.R @@ -0,0 +1,62 @@ +## get_structuralresources_categorisations() +test_that("Structural resources returns a list", { + ind <- get_structuralresources_categorisations() + expect_is(ind, "list") + + ind <- get_structuralresources_categorisations_agency("ISTAC") + expect_is(ind, "list") + + ind <- get_structuralresources_categorisations_agency_resource("ISTAC", "cat2") + expect_is(ind, "list") + + ind <- get_structuralresources_categorisations_agency_resource("ISTAC", "cat2") + expect_is(ind, "list") + + ind <- get_structuralresources_categorisations_agency_resource_version("ISTAC", "cat2", "01.000") + expect_is(ind, "list") + + ind <- get_structuralresources_category_schemes(query = "ID EQ 2090", orderBy = "ID ASC") + expect_is(ind, "list") + + ind <- get_structuralresources_category_schemes_agency("ISTAC", query = "ID EQ 2090", orderBy = "ID ASC") + expect_is(ind, "list") + + ind <- get_structuralresources_category_schemes_agency_resource("ISTAC", "TEMAS_CANARIAS") + expect_is(ind, "list") + + ind <- get_structuralresources_category_schemes_agency_resource_version( + "ISTAC", "TEMAS_CANARIAS", "01.000") + expect_is(ind, "list") + + ind <- get_structuralresources_category_schemes_agency_resource_version_categories( + "ISTAC", "TEMAS_CANARIAS", "01.000", + limit = 10) + expect_is(ind, "list") + + ind <- get_structuralresources_category_schemes_agency_resource_version_categories_id( + "ISTAC", "TEMAS_CANARIAS", "01.000", "060") + expect_is(ind, "list") + +}) + + +test_that("Structural resources - check df", { + ind <- get_structuralresources_categorisations() + expect_is(ind$categorisation, "data.frame") + + ind <- get_structuralresources_categorisations_agency('ISTAC') + expect_is(ind$categorisation, "data.frame") + + ind <-get_structuralresources_categorisations_agency_resource('ISTAC', 'cat2') + expect_is(ind$categorisation, "data.frame") + + ind <- get_structuralresources_category_schemes_agency_resource("ISTAC", "TEMAS_CANARIAS") + expect_is(ind$categoryScheme, "data.frame") + + ind <- get_structuralresources_category_schemes_agency_resource_version_categories( + "ISTAC", "TEMAS_CANARIAS", "01.000", + limit = 10) + expect_is(ind$category, "data.frame") +}) + + diff --git a/tests/testthat/test-structural_resources_classifications.R b/tests/testthat/test-structural_resources_classifications.R new file mode 100644 index 0000000..4b0cbc3 --- /dev/null +++ b/tests/testthat/test-structural_resources_classifications.R @@ -0,0 +1,41 @@ +## get_structuralresources_categorisations() +test_that("Structural resources classification returns a list", { + ind <- get_structuralresources_codelist_families() + expect_is(ind, "list") + + ind <- get_structuralresources_codelist_families_id() + expect_is(ind, "list") + + ind <- get_structuralresources_codelists() + expect_is(ind, "list") + + ind <- get_structuralresources_codelists_agency("ISTAC") + expect_is(ind, "list") + + ind <- get_structuralresources_codelists_agency_resource("ISTAC", "CL_AREA_ES") + expect_is(ind, "list") + + ind <- get_structuralresources_codelists_agency_resource_version("ISTAC", "CL_AREA_ES", "01.000") + expect_is(ind, "list") + + ind <- get_structuralresources_codelists_agency_resource_version_codes("ISTAC", "CL_AREA_ES", "01.000") + expect_is(ind, "list") + + ind <- get_structuralresources_codelists_agency_resource_version_codes_codeid( + "ISTAC", "CL_AREA_ES", "01.000", "ES706A01" ) + expect_is(ind, "list") +}) + + +test_that("Structural resources classification - check df", { + ind <- get_structuralresources_codelists() + expect_is(ind$codelist, "data.frame") + + ind <- get_structuralresources_codelists_agency("ISTAC") + expect_is(ind$codelist, "data.frame") + + ind <- get_structuralresources_codelists_agency_resource_version_codes("ISTAC", "CL_AREA_ES", "01.000") + expect_is(ind$code, "data.frame") +}) + + diff --git a/tests/testthat/test-structural_resources_concepts.R b/tests/testthat/test-structural_resources_concepts.R new file mode 100644 index 0000000..dfb1484 --- /dev/null +++ b/tests/testthat/test-structural_resources_concepts.R @@ -0,0 +1,30 @@ +## get_structuralresources_categorisations() +test_that("Structural resources concet returns a list", { + ind <- get_structuralresources_concept_types() + expect_is(ind, "list") + + ind <- get_structuralresources_concept_schemes() + expect_is(ind, "list") + + ind <- get_structuralresources_concept_schemes_agency("ISTAC") + expect_is(ind, "list") + + ind <- get_structuralresources_concept_schemes_agency_resource( + agencyID = "ISTAC", resourceID = "CL_AREA_ES") + expect_is(ind, "list") + +}) + + +test_that("Structural resources classification - check df", { + ind <- get_structuralresources_concept_types() + expect_is(ind$conceptType, "data.frame") + + ind <- get_structuralresources_concept_schemes() + expect_is(ind$conceptScheme, "data.frame") + + ind <- get_structuralresources_concept_schemes_agency("ISTAC") + expect_is(ind$conceptScheme, "data.frame") +}) + + diff --git a/tests/testthat/test-structural_resources_datastructures.R b/tests/testthat/test-structural_resources_datastructures.R new file mode 100644 index 0000000..01c404e --- /dev/null +++ b/tests/testthat/test-structural_resources_datastructures.R @@ -0,0 +1,28 @@ +test_that("Structural resources content returns a list", { + ind <- get_structuralresources_content_constraints() + expect_is(ind, "list") + + ind <- get_structuralresources_content_constraints_agency("ISTAC") + expect_is(ind, "list") + + ind <- get_structuralresources_content_constraints_agency_resource("ISTAC", "CL_AREA") + expect_is(ind, "list") + + ind <- get_structuralresources_data_structures() + expect_is(ind, "list") + + ind <- get_structuralresources_data_structures_agency("ISTAC") + expect_is(ind, "list") + + ind <- get_structuralresources_data_structures_agency_resource("ISTAC", "CL_AREA") + expect_is(ind, "list") + +}) + +test_that("Structural resources content returns a list", { + ind <- get_structuralresources_data_structures() + expect_is(ind$dataStructure, "data.frame") + + ind <- get_structuralresources_data_structures_agency("ISTAC") + expect_is(ind$dataStructure, "data.frame") +})