Title: | Interface and Tools for 'BDL' API |
---|---|
Description: | Interface to Local Data Bank ('Bank Danych Lokalnych' - 'bdl') API <https://api.stat.gov.pl/Home/BdlApi?lang=en> with set of useful tools like quick plotting and map generating using data from bank. |
Authors: | Marzena Szpadel [aut], Krzysztof Kania [aut, cre], Statistics Poland [cph, fnd] |
Maintainer: | Krzysztof Kania <[email protected]> |
License: | GPL-3 |
Version: | 1.0.5.9001 |
Built: | 2024-11-15 04:53:09 UTC |
Source: | https://github.com/statisticspoland/r_package_to_api_bdl |
Retrieve information about attribute.
attribute_info(attrId, lang = c("pl", "en"), ...)
attribute_info(attrId, lang = c("pl", "en"), ...)
attrId |
A single attribute id.Use |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A named list.
# attribute_info("1")
# attribute_info("1")
Interface to Local Data Bank ('Bank Danych Lokalnych' - 'bdl') API https://api.stat.gov.pl/Home/BdlApi?lang=en with set of useful tools like quick plotting and map generating using data from bank.
String with BDL API key which you can get at
https://api.stat.gov.pl/Home/BdlApi?lang=en
Example: options(bdl.api_private_key = "11111111-2222-3333-4444-555555555555")
Maintainer: Krzysztof Kania [email protected]
Authors:
Marzena Szpadel [email protected]
Other contributors:
Statistics Poland [copyright holder, funder]
Useful links:
Generate given NUTS level map with data from given variable
generate_map( varId, year, unitLevel = 2, unitParentId = NULL, aggregateId = NULL, palette = "Blues", style = NULL, n = 10, names = FALSE, borderLevel = NULL, lang = c("pl", "en"), ... )
generate_map( varId, year, unitLevel = 2, unitParentId = NULL, aggregateId = NULL, palette = "Blues", style = NULL, n = 10, names = FALSE, borderLevel = NULL, lang = c("pl", "en"), ... )
varId |
A single variable Id.
Use |
year |
A single year from 2010-2023 range. |
unitLevel |
A map and data NUTS level - number from 1 to 6. Use |
unitParentId |
A 12 character NUTS id code of interested unit. Use |
aggregateId |
An aggregate id. Use |
palette |
A palette name or a vector of colors. See tmaptools::palette_explorer() for the named palettes. Use a "-" as prefix to reverse the palette. |
style |
Method to process the color scale. Options available are "sd", "equal", "pretty", "quantile", "kmeans", "hclust", "bclust", "fisher", "jenks", and "log10_pretty". |
n |
Preferred number of classes. Default is 10. |
names |
Logical that determines whether the unit names are shown. |
borderLevel |
Adds contours of units on specified level - number from 1 to 6.
Use |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
Generate quickly map for given NUTS level, using BDL data. Default level is 2.
Maps available for year: 2010-2020
Provide unit parent id to narrow the map for specific regions.
Generating lower (levels 5 and 6) level maps can take some time.
This function requires external map data "bdl.maps" loaded to global environment. You can get data here: Map download. Download data and double-click to load it to environment.
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A tmap map.
# generate_map(varId = "60559", year = "2017")
# generate_map(varId = "60559", year = "2017")
Retrieve all aggregates with information.
get_aggregates( sort = c("id", "-id", "name", "-name"), lang = c("pl", "en"), ... )
get_aggregates( sort = c("id", "-id", "name", "-name"), lang = c("pl", "en"), ... )
sort |
A type of sorting, "id" (default), "-id", "name", "-name" |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A dataset as a tibble.
# get_aggregates()
# get_aggregates()
Retrieve all attributes with information.
get_attributes( sort = c("id", "-id", "Display", "-Display"), lang = c("pl", "en"), ... )
get_attributes( sort = c("id", "-id", "Display", "-Display"), lang = c("pl", "en"), ... )
sort |
A type of sorting, "id" (default), "-id", "Display", "-Display" |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A dataset as a tibble.
# get_attributes()
# get_attributes()
Retrieve data for given units from BDL with specified format.
get_data_by_unit( unitId, varId, year = NULL, type = c("code", "label"), aggregateId = NULL, lang = c("pl", "en"), ... )
get_data_by_unit( unitId, varId, year = NULL, type = c("code", "label"), aggregateId = NULL, lang = c("pl", "en"), ... )
unitId |
A single 12 character NUTS id code or vector of multiple unit id
codes. If multiple unit codes are used, some columns are not available.
Use |
varId |
A vector of variable Id's.Use |
year |
A vector of years. If |
type |
A type of variables returned, "code" (default), "label" |
aggregateId |
An aggregate id. Use |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
Data to retrieve from
The
BDL Web Services can be filtered with arguments. To get JSON data from specified
directory with custom filters use get_request
directly.
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A dataset as a tibble.
# get_data_by_unit(unitId = "023200000000", varId = "3643") # get_data_by_unit(unitId = "023200000000", varId = c("3643", "2137", "148190"), # type = "label") # Multi variable download # get_data_by_unit(unitId = c("023200000000", "020800000000"), # varId = c("3643", "2137", "148190"))
# get_data_by_unit(unitId = "023200000000", varId = "3643") # get_data_by_unit(unitId = "023200000000", varId = c("3643", "2137", "148190"), # type = "label") # Multi variable download # get_data_by_unit(unitId = c("023200000000", "020800000000"), # varId = c("3643", "2137", "148190"))
Retrieve data for a given unit localities from BDL with specified format.
get_data_by_unit_locality( unitId, varId, year = NULL, type = c("code", "label"), lang = c("pl", "en"), ... )
get_data_by_unit_locality( unitId, varId, year = NULL, type = c("code", "label"), lang = c("pl", "en"), ... )
unitId |
A 12 character NUTS unit locality id with 7 characters locality individual id,
separated by dash or vector of multiple unit id codes. If multiple unit codes are used,
some columns are not available. Use |
varId |
A vector of variable Id's.Use |
year |
A vector of years. If |
type |
A type of variables returned, "code" (default), "label" |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
Data to retrieve from
The
BDL Web Services can be filtered with arguments. To get JSON data from specified
directory with custom filters use get_request
directly.
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A dataset as a tibble.
# get_data_by_unit_locality(unitId = "030210106062-0189782", varId = "415", type = "label") # Multi variable download # get_data_by_unit_locality(unitId = c("030210106062-0189782", "030210106062-0189753"), # varId = "415")
# get_data_by_unit_locality(unitId = "030210106062-0189782", varId = "415", type = "label") # Multi variable download # get_data_by_unit_locality(unitId = c("030210106062-0189782", "030210106062-0189753"), # varId = "415")
Retrieve data for a given variable for multiple units from BDL with specified format.
get_data_by_variable( varId, unitParentId = NULL, unitLevel = NULL, year = NULL, aggregateId = NULL, lang = c("pl", "en"), ... )
get_data_by_variable( varId, unitParentId = NULL, unitLevel = NULL, year = NULL, aggregateId = NULL, lang = c("pl", "en"), ... )
varId |
A single variable Id or vector of multiple variable id's. If multiple id's are used, some columns
are not available. Use |
unitParentId |
A 12 character NUTS id code of parent unit. Use |
unitLevel |
A number from 0 to 6, filters the returned unit by its level.
If |
year |
A vector of years. If |
aggregateId |
An aggregate id. Use |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
Data to retrieve from
The
BDL Web Services can be filtered with arguments. To get JSON data from specified
directory with custom filters use get_request
directly.
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A dataset as a tibble.
# get_data_by_variable(varId = "3643", unitParentId = "030200000000") # get_data_by_variable("420", year = "2000", unitLevel = 6) # Multi variable download # get_data_by_variable(varId =c("415","420"), unitParentId = "030210423000")
# get_data_by_variable(varId = "3643", unitParentId = "030200000000") # get_data_by_variable("420", year = "2000", unitLevel = 6) # Multi variable download # get_data_by_variable(varId =c("415","420"), unitParentId = "030210423000")
Retrieve data for a given variables for multiple unit localities from BDL with specified format.
get_data_by_variable_locality( varId, unitParentId, year = NULL, lang = c("pl", "en"), ... )
get_data_by_variable_locality( varId, unitParentId, year = NULL, lang = c("pl", "en"), ... )
varId |
A single variable id or vector of multiple variable id's. If multiple id's are used, some columns
are not available.. Use |
unitParentId |
A 12 character NUTS id code of interested unit. Use |
year |
A vector of years. If |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
Data to retrieve from
The
BDL Web Services can be filtered with arguments. To get JSON data from specified
directory with custom filters use get_request
directly.
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A dataset as a tibble.
# get_data_by_variable_locality(varId = "415", unitParentId = "011212006063") # get_data_by_variable_locality("420", year = "2008", unitParentId = "070000000000") # Multi variable download # get_data_by_variable_locality(varId =c("415","430"), unitParentId = "011212006063")
# get_data_by_variable_locality(varId = "415", unitParentId = "011212006063") # get_data_by_variable_locality("420", year = "2008", unitParentId = "070000000000") # Multi variable download # get_data_by_variable_locality(varId =c("415","430"), unitParentId = "011212006063")
Retrieve all levels with information.
get_levels(sort = c("id", "-id", "name", "-name"), lang = c("pl", "en"), ...)
get_levels(sort = c("id", "-id", "name", "-name"), lang = c("pl", "en"), ...)
sort |
A type of sorting, "id" (default), "-id", "name", "-name" |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A dataset as a tibble.
# get_levels()
# get_levels()
Retrieve data for given units from BDL with specified format.
get_panel_data(unitId, varId, year = NULL, ggplot = FALSE, ...)
get_panel_data(unitId, varId, year = NULL, ggplot = FALSE, ...)
unitId |
A single 12 character NUTS id code or vector of multiple unit id
codes. If multiple unit codes are used, some columns are not available.
Use |
varId |
A single Id or vector of variable Id's.Use |
year |
A vector of years. If |
ggplot |
Output in a long format suitable for ggplot2. Allows to plot results directly with ggplot function. |
... |
Other arguments passed on to |
Data to retrieve from
The
BDL Web Services can be filtered with arguments. To get JSON data from specified
directory with custom filters use get_request
directly.
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A dataset as a tibble.
# get_panel_data(unitId = "030210101000", varId = "60270") # get_panel_data(unitId = "030210101000", varId = c("60270", "461668")) # get_panel_data(unitId = c("030210101000", "030210105000", "030210106000"), # varId = c("60270", "461668"), year = c(2013:2016)) # get_panel_data(unitId = c("030210101000", "030210105000", "030210106000"), # varId = c("60270", "461668"), ggplot = TRUE)
# get_panel_data(unitId = "030210101000", varId = "60270") # get_panel_data(unitId = "030210101000", varId = c("60270", "461668")) # get_panel_data(unitId = c("030210101000", "030210105000", "030210106000"), # varId = c("60270", "461668"), year = c(2013:2016)) # get_panel_data(unitId = c("030210101000", "030210105000", "030210106000"), # varId = c("60270", "461668"), ggplot = TRUE)
Retrieve data from BDL API in JSON format.
get_request(dir, id, filters = NULL, ...)
get_request(dir, id, filters = NULL, ...)
dir |
A directory of the dataset. |
id |
A name for the dataset of interested. |
filters |
A named list of filters. Names of list objects are bdl
filter names and values are vectors with specified filter values. If |
... |
Other arguments passed on to |
Data to retrieve from
The
BDL Web Services can be specified with filters. If no specific filters
required, it's recommended to use data query like get_data_by_unit_locality
,
than to use get_request
directly.
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A JSON raw data.
# get_request(dir = "data/By-Variable", id = "3643") # get_request(dir = "data/By-Unit", id = "023200000000", filters = list(year = c("2000","2010"), # var-Id" = c("2137","148190"))) # get_request(dir = "data/By-Variable", id = "3643", filters = list(year = c("2000","2010"), # unit-Level" = 2, lang = "en"))
# get_request(dir = "data/By-Variable", id = "3643") # get_request(dir = "data/By-Unit", id = "023200000000", filters = list(year = c("2000","2010"), # var-Id" = c("2137","148190"))) # get_request(dir = "data/By-Variable", id = "3643", filters = list(year = c("2000","2010"), # unit-Level" = 2, lang = "en"))
Retrieve all subjects id's or sub-subjects.
get_subjects( parentId = "", sort = c("id", "-id", "name", "-name"), lang = c("pl", "en"), ... )
get_subjects( parentId = "", sort = c("id", "-id", "name", "-name"), lang = c("pl", "en"), ... )
parentId |
A parent subject id code. If not specified returns all top level subjects.
Use |
sort |
A type of sorting, "id" (default), "-id", "name", "-name" |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
To get all top level subjects skip the parentId
parameter or list
sub-subjects for given parent subject.
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A dataset as a tibble.
# get_subjects() # get_subjects("K3") # get_subjects("G7")
# get_subjects() # get_subjects("K3") # get_subjects("G7")
Retrieve unit locality codes.
get_unit_localities( parentId, sort = c("id", "-id", "name", "-name"), lang = c("pl", "en"), ... )
get_unit_localities( parentId, sort = c("id", "-id", "name", "-name"), lang = c("pl", "en"), ... )
parentId |
A 12 character NUTS id code of parent unit.
Use |
sort |
A type of sorting, "id" (default), "-id", "name", "-name" |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A dataset as a tibble.
# get_unit_localities("030210106062")
# get_unit_localities("030210106062")
Retrieve all unit codes or sub to given unit,
get_units( parentId = "", level = NULL, sort = c("id", "-id", "name", "-name"), lang = c("pl", "en"), ... )
get_units( parentId = "", level = NULL, sort = c("id", "-id", "name", "-name"), lang = c("pl", "en"), ... )
parentId |
A 12 character NUTS id code of parent unit.
Use |
level |
A number from 0 to 6, filters the returned unit by its level.
If |
sort |
A type of sorting, "id" (default), "-id", "name", "-name" |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
To get all units skip the parentId
parameter. Warning! Downloading
all unit can take around 1 minute.
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A dataset as a tibble.
# get_units(level = 2) # get_units("010000000000")
# get_units(level = 2) # get_units("010000000000")
Retrieve variables for given subjectId.
get_variables( subjectId, level = NULL, year = NULL, sort = c("id", "-id", "subjectId", "-subjectId"), lang = c("pl", "en"), ... )
get_variables( subjectId, level = NULL, year = NULL, sort = c("id", "-id", "subjectId", "-subjectId"), lang = c("pl", "en"), ... )
subjectId |
A subject id code. If not specified returns all top level subjects.
Use |
level |
A number from 0 to 6, filters the returned unit by its level.
If |
year |
A vector of years. If |
sort |
A type of sorting, "id" (default), "-id", "subjectId", "-subjectId" |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
Variables for specified subject optionally filtered by level
and year
.
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A dataset as a tibble.
# get_variables("P2425")
# get_variables("P2425")
Generate line plot for one unit/multiple variables or variable/multiple units
line_plot( data_type = c("unit", "unit.locality", "variable", "variable.locality"), unitId = NULL, varId = NULL, year = NULL, aggregateId = NULL, lang = NULL, unitParentId = NULL, unitLevel = NULL, ... )
line_plot( data_type = c("unit", "unit.locality", "variable", "variable.locality"), unitId = NULL, varId = NULL, year = NULL, aggregateId = NULL, lang = NULL, unitParentId = NULL, unitLevel = NULL, ... )
data_type |
A type of data used for generating plot, "unit"(default), "unit.locality","variable","variable.locality" |
unitId |
A 12 character NUTS unit id or locality 12 character id with 7 characters locality individual id, separated by dash. |
varId |
A vector of variable Id's (data_type equal "unit" or "unit.locality)
or single variable (data_type equal "variable" or "variable.locality"). Use |
year |
A vector of years. If |
aggregateId |
An aggregate id. Use |
lang |
A language of returned data, "pl" (default), "en" |
unitParentId |
A 12 character NUTS id code of interested unit. (Used only with data_type equal "variable" or "variable.locality")
Use |
unitLevel |
A number from 0 to 6, filters the returned unit by its level. (Used only with data_type equal "variable")
If |
... |
Other arguments passed on to |
Generate quickly 'ggplot2' plot, using BDL data.
Plot multiple variable values for one unit or one variable value for multiple units.
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A ggplot2 plot.
# line_plot(data_type = "unit", unitId = "000000000000", varId = c("415","420"))
# line_plot(data_type = "unit", unitId = "000000000000", varId = c("415","420"))
Generate pie plot for variable/multiple units
pie_plot( data_type = c("variable", "variable.locality"), varId, year, unitParentId = NULL, unitLevel = NULL, aggregateId = NULL, label = T, lang = c("pl", "en"), ... )
pie_plot( data_type = c("variable", "variable.locality"), varId, year, unitParentId = NULL, unitLevel = NULL, aggregateId = NULL, label = T, lang = c("pl", "en"), ... )
data_type |
A type of data used for generating plot, "variable"(default), "variable","variable.locality" |
varId |
A variable Id. Use |
year |
A single year. If |
unitParentId |
A 12 character NUTS id code of interested unit. Use |
unitLevel |
A number from 0 to 6, filters the returned unit by its level.
(Used only with data_type equal "variable")
If |
aggregateId |
An aggregate id. Use |
label |
Logical; if TRUE (default) adds labels. |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
Generate quickly 'ggplot2' plot, using BDL data.
Pie plot one variable value for multiple units on single year.
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A ggplot2 plot.
# pie_plot(data_type ="variable" ,"1", "2018",unitParentId="042214300000", unitLevel = "6")
# pie_plot(data_type ="variable" ,"1", "2018",unitParentId="042214300000", unitLevel = "6")
Generate scatter correlation plot for 2 variables
scatter_2var_plot( data_type = c("variable", "variable.locality"), varId, year = NULL, unitParentId = NULL, unitLevel = NULL, aggregateId = NULL, lang = c("pl", "en"), ... )
scatter_2var_plot( data_type = c("variable", "variable.locality"), varId, year = NULL, unitParentId = NULL, unitLevel = NULL, aggregateId = NULL, lang = c("pl", "en"), ... )
data_type |
A type of data used for generating plot, "variable"(default), "variable.locality" |
varId |
A vector of 2 variable Id's. Use |
year |
A vector of years. If |
unitParentId |
A 12 character NUTS id code of interested unit.
(Used only with data_type equal "variable" or "variable.locality")Use |
unitLevel |
A number from 0 to 6, filters the returned unit by its level.
(Used only with data_type equal "variable")
If |
aggregateId |
An aggregate id. Use |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
Generate quickly 'ggplot2' scatter correlation plot, using BDL data.
Scatter plot 2 variables for given units with regression line, confidence interval and correlation coefficient.
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A ggplot2 plot.
# scatter_2var_plot(data_type = "variable" ,c("415", "60559"), unitLevel = "2")
# scatter_2var_plot(data_type = "variable" ,c("415", "60559"), unitLevel = "2")
Search for given phrase in subject names
search_subjects( name, sort = c("id", "-id", "name", "-name"), lang = c("pl", "en"), ... )
search_subjects( name, sort = c("id", "-id", "name", "-name"), lang = c("pl", "en"), ... )
name |
A phrase to search. |
sort |
A type of sorting, "id" (default), "-id", "name", "-name" |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A dataset as a tibble.
# search_subjects("samochody") # search_subjects("car", lang = "en")
# search_subjects("samochody") # search_subjects("car", lang = "en")
Search for a given phrase in unit locality names.
search_unit_localities( name, year = NULL, sort = c("id", "-id", "name", "-name"), lang = c("pl", "en"), ... )
search_unit_localities( name, year = NULL, sort = c("id", "-id", "name", "-name"), lang = c("pl", "en"), ... )
name |
A phrase to search. |
year |
A vector of years. If |
sort |
A type of sorting, "id" (default), "-id", "name", "-name" |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A dataset as a tibble.
# search_unit_localities("wro")
# search_unit_localities("wro")
Search for a given phrase in unit names.
search_units( name, level = NULL, year = NULL, kind = NULL, sort = c("id", "-id", "name", "-name"), lang = c("pl", "en"), ... )
search_units( name, level = NULL, year = NULL, kind = NULL, sort = c("id", "-id", "name", "-name"), lang = c("pl", "en"), ... )
name |
A phrase to search. |
level |
A number from 0 to 6, filters the returned unit by its level.
If |
year |
A vector of years. If |
kind |
A type of unit. More info at: https://bdl.stat.gov.pl/BDL/metadane/teryt/rodzaj |
sort |
A type of sorting, "id" (default), "-id", "name", "-name" |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A dataset as a tibble.
# search_units("wro") # search_units("pol", type = "5")
# search_units("wro") # search_units("pol", type = "5")
Search for given phrase in variable names
search_variables( name, subjectId = NULL, level = NULL, year = NULL, sort = c("id", "-id", "subjectId", "-subjectId"), lang = c("pl", "en"), ... )
search_variables( name, subjectId = NULL, level = NULL, year = NULL, sort = c("id", "-id", "subjectId", "-subjectId"), lang = c("pl", "en"), ... )
name |
A phrase to search. |
subjectId |
A subject id code. If not specified returns all top level subjects.
Use |
level |
A number from 0 to 6, filters the returned unit by its level.
If |
year |
A vector of years. If |
sort |
A type of sorting, "id" (default), "-id", "name", "-name" |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A dataset as a tibble.
# search_variables("samochody") # search_variables("cars", lang = "en")
# search_variables("samochody") # search_variables("cars", lang = "en")
Retrieve information about subject
subject_info(subjectId, lang = c("pl", "en"), ...)
subject_info(subjectId, lang = c("pl", "en"), ...)
subjectId |
A subject id code. If not specified returns all top level subjects.
Use |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A named list.
# subject_info("G7")
# subject_info("G7")
Prints brief summary with basic statistical functions like mean, standard deviation, variance, min and max for bdl data frame.
## S3 method for class 'bdl' summary(object, ...)
## S3 method for class 'bdl' summary(object, ...)
object |
bdl data frame to summarise |
... |
other arguments ignored (for compatibility with generic) |
# df <- get_data_by_variable(varId = "3643") # summary(df)
# df <- get_data_by_variable(varId = "3643") # summary(df)
Retrieve information about unit
unit_info(unitId, lang = c("pl", "en"), ...)
unit_info(unitId, lang = c("pl", "en"), ...)
unitId |
A 12 character NUTS id code of interested unit. Use |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A named list.
# unit_info("030210106062")
# unit_info("030210106062")
Retrieve information about unit locality
unit_locality_info(unitId, lang = c("pl", "en"), ...)
unit_locality_info(unitId, lang = c("pl", "en"), ...)
unitId |
A 12 character NUTS id with 7 characters locality individual id, separated by dash.
Use |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A named list.
# unit_locality_info("030210106062-0189782")
# unit_locality_info("030210106062-0189782")
Retrieve information about variable.
variable_info(varId, lang = c("pl", "en"), ...)
variable_info(varId, lang = c("pl", "en"), ...)
varId |
A vector of variable Id's.Use |
lang |
A language of returned data, "pl" (default), "en" |
... |
Other arguments passed on to |
To use a proxy to connect, a use_proxy
can be
passed to GET
. For example
get_request(id, filters,
config = httr::use_proxy(url, port, username, password))
.
A named list.
# variable_info("420")
# variable_info("420")