Type: | Package |
Title: | Access Chilean Data via APIs and Curated Datasets |
Version: | 0.1.0 |
Maintainer: | Renzo Caceres Rossi <arenzocaceresrossi@gmail.com> |
Description: | Provides functions to access data from the 'FINDIC API' and the 'REST Countries API', related to Chile's financial indicators, international country information, and more. Additionally, the package includes curated datasets related to Chile, covering topics such as human rights violations during the Pinochet regime, electoral data, census samples, health surveys, seismic events, territorial codes, and environmental measurements. The package supports research and analysis focused on Chile by integrating open APIs with high-quality datasets from multiple domains. For more details on 'FINDIC', see https://findic.cl/, and for 'REST Countries', see https://restcountries.com/. |
License: | GPL-3 |
URL: | https://github.com/lightbluetitan/chiledataapi, https://lightbluetitan.github.io/chiledataapi/ |
BugReports: | https://github.com/lightbluetitan/chiledataapi/issues |
Encoding: | UTF-8 |
LazyData: | true |
Depends: | R (≥ 4.1.0) |
Imports: | utils, httr, jsonlite, dplyr |
Suggests: | ggplot2, testthat (≥ 3.0.0), knitr, rmarkdown |
RoxygenNote: | 7.3.2 |
Config/testthat/edition: | 3 |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2025-07-11 21:06:58 UTC; renzorossiv |
Author: | Renzo Caceres Rossi
|
Repository: | CRAN |
Date/Publication: | 2025-07-16 15:20:13 UTC |
ChileDataAPI: Access Chilean Data via APIs and Curated Datasets
Description
This package provides functions to access data from the 'FINDIC API' and the 'REST Countries API',related to Chile's financial indicators, international country information, additionally, the package includes curated datasets related to Chile.
Details
ChileDataAPI: Access Chilean Data via APIs and Curated Datasets
Access Chilean Data via APIs and Curated Datasets.
Author(s)
Maintainer: Renzo Caceres Rossi arenzocaceresrossi@gmail.com
See Also
Useful links:
Chilean Census Example Data (San Pablo Commune, 2017)
Description
This dataset, census_chile_2017_df, is a data frame containing microdata from the 2017 Chilean census, specifically from the commune of San Pablo. It was selected due to its relatively small size, making it suitable for inclusion in CRAN and GitHub repositories. The dataset includes 7,512 observations and 60 variables related to housing, households, individuals, migration, education, and geographic information. All variable names and data values are in Spanish, as retrieved from the original source.
Usage
data(census_chile_2017_df)
Format
A data frame with 7,512 observations and 60 variables:
- region
Administrative region code
- provincia
Province code
- comuna
Commune code
- dc
Census district code
- area
Urban/rural area indicator
- zc_loc
Census location zone
- id_zona_loc
Location zone ID
- nviv
Number of dwellings
- nhogar
Number of households
- personan
Person number
- p07
Sex
- p08
Relationship to head of household
- p09
Age
- p10
Place of birth (Chile or abroad)
- p10comuna
Commune of birth
- p10pais
Country of birth
- p11
Last place of residence
- p11comuna
Commune of last residence
- p11pais
Country of last residence
- p12
Place of residence in 2012
- p12comuna
Commune of residence in 2012
- p12pais
Country of residence in 2012
- p12a_llegada
Year of arrival
- p12a_tramo
Time range of arrival
- p13
Health insurance
- p14
Marital status
- p15
Educational level
- p15a
Currently attending school
- p16
Employment status
- p16a
Occupation type
- p16a_otro
Other occupation (free text)
- p17
Disability indicator
- p18
Ethnic group
- p19
Language spoken
- p20
Language understood
- p21m
Month of migration
- p21a
Year of migration
- p10pais_grupo
Grouped birth country
- p11pais_grupo
Grouped last residence country
- p12pais_grupo
Grouped 2012 residence country
- escolaridad
Years of schooling
- p16a_grupo
Grouped occupation
- region_15r
Region code (15-region system)
- provincia_15r
Province code (15-region system)
- comuna_15r
Commune code (15-region system)
- p10comuna_15r
Commune of birth (15-region system)
- p11comuna_15r
Commune of last residence (15-region system)
- p12comuna_15r
Commune of residence in 2012 (15-region system)
- geocode
Geographical identifier
- p01
Type of dwelling
- p02
Dwelling condition
- p03a
Material of exterior walls
- p03b
Material of floor
- p03c
Material of roof
- p04
Number of rooms
- p05
Number of bedrooms
- cant_hog
Number of households in the dwelling
- cant_per
Number of persons in the dwelling
- tipo_hogar
Type of household
- tipo_operativo
Census operation type
Details
The dataset name has been kept as census_chile_2017_df to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the ChileDataAPI package and assists users in identifying its specific characteristics. The suffix df indicates that the dataset is a data frame. The original content has not been modified.
Source
Data taken from the ismtchile package version 2.1.5.
Chilean Earthquakes Data
Description
This dataset, chile_earthquakes_tbl_df, is a tibble containing information about significant (perceptible) earthquakes that occurred in Chile from January 1st, 2012 to the present. The data was originally compiled by the Centro Sismológico Nacional (Chile) and was published on Kaggle by Nicolás González Muñoz. The dataset includes 4,018 observations and 5 variables, capturing relevant geophysical characteristics such as the date and time of occurrence, geographic coordinates, depth, and magnitude of each seismic event.
Usage
data(chile_earthquakes_tbl_df)
Format
A tibble with 4,018 observations and 5 variables:
- Date(UTC)
Timestamp of the earthquake in UTC (POSIXct)
- Latitude
Latitude coordinate of the event (numeric)
- Longitude
Longitude coordinate of the event (numeric)
- Depth
Depth in kilometers (numeric)
- Magnitude
Richter magnitude of the earthquake (numeric)
Details
The dataset name has been kept as 'chile_earthquakes_tbl_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the ChileDataAPI package and assists users in identifying its specific characteristics. The suffix 'tbl_df' indicates that the dataset is a tibble (a modern data frame). The original content has not been modified in any way. Variable names and values are in English, as originally provided by the source.
Source
Data taken from Kaggle: https://www.kaggle.com/datasets/nicolasgonzalezmunoz/earthquakes-on-chile
Chilean 2021 First Round Presidential Election
Description
This dataset, chile_election_2021_df, is a data frame containing the results of the first round of the 2021 Chilean presidential elections. It includes vote counts for seven presidential candidates, as well as counts for blank and null votes. Each observation corresponds to an individual ballot box, identified by its unique ID and associated electoral district. Additionally, the dataset includes demographic information on the age distribution of voters for each ballot box, and a logical indicator for mismatches or inconsistencies in the vote counts.
Usage
data(chile_election_2021_df)
Format
A data frame with 46,606 observations and 21 variables:
- REGION
Administrative region (character)
- ELECTORAL.DISTRICT
Electoral district (character)
- BALLOT.BOX
Unique identifier for the ballot box (character)
- C1
Votes for Candidate 1 (integer)
- C2
Votes for Candidate 2 (integer)
- C3
Votes for Candidate 3 (integer)
- C4
Votes for Candidate 4 (integer)
- C5
Votes for Candidate 5 (integer)
- C6
Votes for Candidate 6 (integer)
- C7
Votes for Candidate 7 (integer)
- BLANK.VOTES
Count of blank votes (integer)
- NULL.VOTES
Count of null votes (integer)
- X18.19
Voters aged 18–19 (integer)
- X20.29
Voters aged 20–29 (integer)
- X30.39
Voters aged 30–39 (integer)
- X40.49
Voters aged 40–49 (integer)
- X50.59
Voters aged 50–59 (integer)
- X60.69
Voters aged 60–69 (integer)
- X70.79
Voters aged 70–79 (integer)
- X80.
Voters aged 80 and older (integer)
- MISMATCH
Logical indicator of inconsistency in vote reporting (logical)
Details
The dataset name has been kept as chile_election_2021_df to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the ChileDataAPI package and assists users in identifying its specific characteristics. The suffix df indicates that the dataset is a data frame. The original content has not been modified.
Source
Data taken from the fastei package version 0.0.0.7.
Chilean National Health Survey (2016–2017)
Description
This dataset, chile_health_survey_df, is a data frame containing information collected by the Chilean National Health Survey conducted between 2016 and 2017. The objective of the survey was to study the health status of the Chilean population and support health-related public policy design. The dataset includes biometric, behavioral, demographic, and educational variables from 3,211 individuals.
Usage
data(chile_health_survey_df)
Format
A data frame with 3,211 observations and 12 variables:
- pas, pad
Systolic and diastolic blood pressure (numeric)
- age
Age of the respondent (integer)
- waist, bmi
Waist circumference and body mass index (numeric)
- sedentary, smoker, diabetes, depression
Health behavior and condition indicators (integer)
- male
Sex of the respondent (1 = male, 0 = female) (integer)
- scholar2, scholar3
Education level indicators (integer)
Details
The dataset name has been kept as 'chile_health_survey_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the ChileDataAPI package and assists users in identifying its specific characteristics. The suffix 'df' indicates that the dataset is a data frame. The original content has not been modified in any way.
Source
Data taken from the abms package version 0.2
Voting Intentions in the 1988 Chilean Plebiscite
Description
This dataset, chile_plebiscite_df, is a data frame containing information on voting intentions in the 1988 Chilean plebiscite. The data were collected from a national survey conducted by FLACSO/Chile during April and May of 1988. The dataset consists of 2,700 observations and 8 variables, including demographic details such as region, sex, age, education, and income, as well as voting preferences and support for the status quo. Some observations contain missing values.
Usage
data(chile_plebiscite_df)
Format
A data frame with 2,700 observations and 8 variables:
- region
Region of the respondent (factor with 5 levels: "C", "M", "N", "S", ...)
- population
Population size of the respondent's area (integer)
- sex
Sex of the respondent (factor: "F", "M")
- age
Age in years (integer)
- education
Education level (factor with 3 levels: "P", "PS", "S")
- income
Income of the respondent (integer)
- statusquo
Support for the status quo (numeric scale)
- vote
Intended vote (factor with 4 levels)
Details
The dataset name has been kept as 'chile_plebiscite_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the ChileDataAPI package and assists users in identifying its specific characteristics. The suffix 'df' indicates that the dataset is a data frame. The original content has not been modified in any way.
Source
Data taken from the carData package version 3.0-5
Get Observed Bitcoin Value from the findic.cl API
Description
This function retrieves the observed value of Bitcoin in US Dollars from the API endpoint: https://findic.cl/api/bitcoin. The data is provided by the Chilean website findic.cl.
Usage
get_chile_bitcoin()
Details
The values returned by the API include metadata and a time series of daily values.
The names of the variables and the values are in Spanish, exactly as provided by the API.
For example, the result includes columns named fecha
(date) and valor
(value).
The function sends a GET request to the /api/bitcoin
endpoint. If the request is successful (HTTP 200),
it parses the JSON response and extracts the time series data under the key serie
.
All names and values are kept in Spanish as provided by the API and no translation or modification is applied.
Value
A tibble (data frame) with the following columns:
-
fecha
: Fecha del valor observado (en formato "YYYY-MM-DD"). -
valor
: Valor del bitcoin en dólares estadounidenses (numérico).
Note
Requires internet connection. The function returns the values exactly as provided in Spanish.
See Also
Examples
## Not run:
bitcoin_data <- get_chile_bitcoin()
head(bitcoin_data)
## End(Not run)
Get Observed Copper Price per Pound from the findic.cl API
Description
This function retrieves the observed daily value of the copper price per pound ("Libra de Cobre") in U.S. Dollars from the API endpoint: https://findic.cl/api/libra_cobre. The data is provided by the Chilean website findic.cl.
Usage
get_chile_copper_pound()
Details
The values returned by the API include metadata and a time series of daily prices.
The names of the variables and the values are in Spanish, exactly as provided by the API.
For example, the result includes columns named fecha
(date) and valor
(value).
The function sends a GET request to the /api/libra_cobre
endpoint. If the request is successful (HTTP 200),
it parses the JSON response and extracts the time series data under the key serie
.
All names and values are kept in Spanish as provided by the API and no translation or modification is applied.
Value
A tibble (data frame) with the following columns:
-
fecha
: Fecha del valor observado (in format "YYYY-MM-DD"). -
valor
: Valor de la libra de cobre en dólares estadounidenses (numeric).
Note
Requires internet connection. The function returns the values exactly as provided in Spanish.
See Also
Examples
## Not run:
copper_data <- get_chile_copper_pound()
head(copper_data)
## End(Not run)
Get Observed Dollar Exchange Rate from the findic.cl API
Description
This function retrieves the observed exchange rate ("Dólar observado") in Chilean Pesos from the API endpoint: https://findic.cl/api/dolar. The data is provided by the Chilean website findic.cl.
Usage
get_chile_dollar()
Details
The values returned by the API include metadata and a time series of daily exchange rates.
The names of the variables and the values are in Spanish, exactly as provided by the API.
For example, the result includes columns named fecha
(date) and valor
(value).
The function sends a GET request to the /api/dolar
endpoint. If the request is successful (HTTP 200),
it parses the JSON response and extracts the time series data under the key serie
.
All names and values are kept in Spanish as provided by the API and no translation or modification is applied.
Value
A tibble (data frame) with the following columns:
-
fecha
: Fecha del valor observado (en formato "YYYY-MM-DD"). -
valor
: Valor del dólar observado en pesos chilenos (numérico).
Note
Requires internet connection. The function returns the values exactly as provided in Spanish.
See Also
Examples
## Not run:
dolar_data <- get_chile_dollar()
head(dolar_data)
## End(Not run)
Get Observed Euro Exchange Rate from the findic.cl API
Description
This function retrieves the observed exchange rate ("Euro (pesos por euro)") in Chilean Pesos from the API endpoint: https://findic.cl/api/euro. The data is provided by the Chilean website findic.cl.
Usage
get_chile_euro()
Details
The values returned by the API include metadata and a time series of daily exchange rates.
The names of the variables and the values are in Spanish, exactly as provided by the API.
For example, the result includes columns named fecha
(date) and valor
(value).
The function sends a GET request to the /api/euro
endpoint. If the request is successful (HTTP 200),
it parses the JSON response and extracts the time series data under the key serie
.
All names and values are kept in Spanish as provided by the API and no translation or modification is applied.
Value
A tibble (data frame) with the following columns:
-
fecha
: Fecha del valor observado (en formato "YYYY-MM-DD"). -
valor
: Valor del euro observado en pesos chilenos (numérico).
Note
Requires internet connection. The function returns the values exactly as provided in Spanish.
See Also
Examples
## Not run:
euro_data <- get_chile_euro()
head(euro_data)
## End(Not run)
Get IPSA (Índice de Precios Selectivo de Acciones) from the findic.cl API
Description
This function retrieves the historical values of the IPSA index ("Índice de Precios Selectivo de Acciones") from the API endpoint: https://findic.cl/api/ipsa. The data is provided by the Chilean website findic.cl.
Usage
get_chile_ipsa()
Details
The values returned by the API include metadata and a time series of daily IPSA index values.
The names of the variables and the values are in Spanish, exactly as provided by the API.
For example, the result includes columns named fecha
(date) and valor
(value).
The function sends a GET request to the /api/ipsa
endpoint. If the request is successful (HTTP 200),
it parses the JSON response and extracts the time series data under the key serie
.
All names and values are kept in Spanish as provided by the API and no translation or modification is applied.
Value
A tibble (data frame) with the following columns:
-
fecha
: Fecha de la observación (in "YYYY-MM-DD" format). -
valor
: Valor del índice IPSA en puntos (numeric).
Note
Requires internet connection. The function returns the values exactly as provided in Spanish.
See Also
Examples
## Not run:
ipsa_data <- get_chile_ipsa()
head(ipsa_data)
## End(Not run)
Get Unidad de Fomento (UF) from the findic.cl API
Description
This function retrieves the Unidad de Fomento (UF) daily values in Chilean Pesos from the API endpoint: https://findic.cl/api/uf. The data is provided by the Chilean website findic.cl.
Usage
get_chile_uf()
Details
The values returned by the API include metadata and a time series of daily UF values.
The names of the variables and the values are in Spanish, exactly as provided by the API.
For example, the result includes columns named fecha
(date) and valor
(value).
The function sends a GET request to the /api/uf
endpoint. If the request is successful (HTTP 200),
it parses the JSON response and extracts the time series data under the key serie
.
All names and values are kept in Spanish as provided by the API and no translation or modification is applied.
Value
A tibble (data frame) with the following columns:
-
fecha
: Fecha del valor observado (in "YYYY-MM-DD" format). -
valor
: Valor diario de la UF en pesos chilenos (numeric).
Note
Requires internet connection. The function returns the values exactly as provided in Spanish.
See Also
Examples
## Not run:
uf_data <- get_chile_uf()
head(uf_data)
## End(Not run)
Get Monthly Tax Unit (UTM) from the findic.cl API
Description
This function retrieves the historical values of the Unidad Tributaria Mensual (UTM) in Chilean Pesos from the API endpoint: https://findic.cl/api/utm. The data is provided by the Chilean website findic.cl.
Usage
get_chile_utm()
Details
The values returned by the API include metadata and a time series of monthly values.
The names of the variables and the values are in Spanish, exactly as provided by the API.
For example, the result includes columns named fecha
(date) and valor
(value).
The function sends a GET request to the /api/utm
endpoint. If the request is successful (HTTP 200),
it parses the JSON response and extracts the time series data under the key serie
.
All names and values are kept in Spanish as provided by the API and no translation or modification is applied.
Value
A tibble (data frame) with the following columns:
-
fecha
: Fecha de referencia del valor mensual (in format "YYYY-MM-DD"). -
valor
: Valor mensual de la Unidad Tributaria Mensual (UTM) en pesos chilenos (numeric).
Note
Requires internet connection. The function returns the values exactly as provided in Spanish.
See Also
Examples
## Not run:
utm_data <- get_chile_utm()
head(utm_data)
## End(Not run)
Get Observed Yen Exchange Rate from the findic.cl API
Description
This function retrieves the observed exchange rate ("Yen (pesos por yen)") in Chilean Pesos from the API endpoint: https://findic.cl/api/yen. The data is provided by the Chilean website findic.cl.
Usage
get_chile_yen()
Details
The values returned by the API include metadata and a time series of daily exchange rates.
The names of the variables and the values are in Spanish, exactly as provided by the API.
For example, the result includes columns named fecha
(date) and valor
(value).
The function sends a GET request to the /api/yen
endpoint. If the request is successful (HTTP 200),
it parses the JSON response and extracts the time series data under the key serie
.
All names and values are kept in Spanish as provided by the API and no translation or modification is applied.
Value
A tibble (data frame) with the following columns:
-
fecha
: Fecha del valor observado (en formato "YYYY-MM-DD"). -
valor
: Valor del yen observado en pesos chilenos (numérico).
Note
Requires internet connection. The function returns the values exactly as provided in Spanish.
See Also
Examples
## Not run:
yen_data <- get_chile_yen()
head(yen_data)
## End(Not run)
Get Key Country Information from the REST Countries API
Description
Retrieves selected, essential information about Chile or any other country by its full name. The data is retrieved from the REST Countries API. See the API documentation at https://restcountries.com/. Example API usage: https://restcountries.com/v3.1/name/chile?fullText=true.
Usage
get_country_info(name)
Arguments
name |
Full country name (common or official). For example: "Chile", "Peru", "France". |
Details
This function returns readable details such as the country's common and official name, capital, region, subregion, population, area, and official languages.
The function sends a GET request to the REST Countries API. If the request is successful (HTTP 200),
it parses the JSON and extracts the key fields. If the country is not found or there's an error,
the function returns NULL
with a user-friendly message.
Value
A data frame with 8 columns:
-
name_common
: Common name of the country. -
name_official
: Official name of the country. -
capital
: Capital city. -
region
: Geographic region. -
subregion
: Subregion. -
population
: Total population. -
area
: Total area in square kilometers. -
languages
: Official languages, separated by commas.
See Also
Examples
## Not run:
get_country_info("Chile")
get_country_info("Japan")
get_country_info("France")
## End(Not run)
Average Araucaria Araucana Tree Ring Width
Description
This dataset, malleco_tree_rings_ts, is a time series object ('ts') containing the average annual tree ring width, measured in millimeters, for Araucaria Araucana trees located in the Malleco region of Chile. The data spans 734 years, from 1242 to 1975, and was originally collected for use in climate and environmental reconstructions. The frequency of the series is annual (one observation per year). The series shows interannual variability in growth and is suitable for time series analysis and dendrochronological studies.
Usage
data(malleco_tree_rings_ts)
Format
A time series object with 734 annual observations:
- Start year
1242
- End year
1975
- Frequency
Annual (1)
- Values
Average annual ring width in millimeters (numeric)
Details
The dataset name has been kept as 'malleco_tree_rings_ts' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the ChileDataAPI package and assists users in identifying its specific characteristics. The suffix 'ts' indicates that the dataset is a time series object. The original content has not been modified in any way.
Source
Data taken from the LSTS package version 2.1
Human Rights Abuses in the Pinochet Regime (1973–1990)
Description
This dataset, pinochet_regime_df, is a data frame containing detailed information about human rights violations that occurred in Chile during the military dictatorship of Augusto Pinochet, spanning from 1973 to 1990. The data includes victim-level records such as names, age, gender, affiliation, nature of the violence, methods used, and geographic information when available. It is based on the National Truth and Reconciliation Commission Report (1991, ISBN:9780268016463). The dataset also includes georeferenced locations across multiple levels for incidents where such data could be retrieved.
Usage
data(pinochet_regime_df)
Format
A data frame with 2,398 observations and 59 variables:
- individual_id
Victim ID
- group_id
Group ID for collective incidents
- start_date_daily
Start date (day precision)
- end_date_daily
End date (day precision)
- start_date_monthly
Start date (month precision)
- end_date_monthly
End date (month precision)
- last_name
Victim's last name
- first_name
Victim's first name
- minor
Indicator if victim was a minor
- age
Age of the victim
- male
Indicator if victim was male
- occupation
Victim's occupation
- occupation_detail
Detailed occupation description
- victim_affiliation
Affiliation of the victim
- victim_affiliation_detail
Detailed affiliation
- violence
Type of violence experienced
- method
Method of violence
- interrogation
Interrogation indicator
- torture
Torture indicator
- mistreatment
Mistreatment indicator
- targeted
Targeting category
- press
Indicator for press involvement
- war_tribunal
War tribunal indicator
- number_previous_arrests
Number of previous arrests
- perpetrator_affiliation
Affiliation of perpetrator
- perpetrator_affiliation_detail
Detailed affiliation of perpetrator
- nationality
Victim's nationality
- place_1
First incident location
- location_1
First location detail
- latitude_1
Latitude of first location
- longitude_1
Longitude of first location
- exact_coordinates_1
Indicator of coordinate precision (1 = exact)
- place_2
Second incident location
- location_2
Second location detail
- latitude_2
Latitude of second location
- longitude_2
Longitude of second location
- exact_coordinates_2
Indicator of coordinate precision (2nd)
- place_3
Third incident location
- location_3
Third location detail
- latitude_3
Latitude of third location
- longitude_3
Longitude of third location
- exact_coordinates_3
Indicator of coordinate precision (3rd)
- place_4
Fourth incident location
- location_4
Fourth location detail
- latitude_4
Latitude of fourth location
- longitude_4
Longitude of fourth location
- exact_coordinates_4
Indicator of coordinate precision (4th)
- place_5
Fifth incident location
- location_5
Fifth location detail
- latitude_5
Latitude of fifth location
- longitude_5
Longitude of fifth location
- exact_coordinates_5
Indicator of coordinate precision (5th)
- place_6
Sixth incident location
- location_6
Sixth location detail
- latitude_6
Latitude of sixth location
- longitude_6
Longitude of sixth location
- exact_coordinates_6
Indicator of coordinate precision (6th)
- page
Source page in the original report
- additional_comments
Additional remarks or context
Details
The dataset name has been kept as pinochet_regime_df to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the ChileDataAPI package and assists users in identifying its specific characteristics. The suffix df indicates that the dataset is a data frame. The original content has not been modified.
Source
Data taken from the pinochet package version 0.1.0.
Official Codes for Chilean Communes, Provinces, and Regions
Description
This dataset, territorial_codes_tbl_df, is a tibble containing official codes for communes, provinces, and regions in Chile. The codes were provided by the Chilean government agency SUBDERE. The names of the administrative divisions were converted to ASCII characters to avoid encoding issues. All variable names and data values are in Spanish, as retrieved from the original source.
Usage
data(territorial_codes_tbl_df)
Format
A tibble with 346 observations and 6 variables:
- codigo_comuna, nombre_comuna
Official commune code and commune name (character, in Spanish)
- codigo_provincia, nombre_provincia
Official province code and province name (character, in Spanish)
- codigo_region, nombre_region
Official region code and region name (character, in Spanish)
Details
The dataset name has been kept as 'territorial_codes_tbl_df' to avoid confusion with other datasets in the R ecosystem. This naming convention helps distinguish this dataset as part of the ChileDataAPI package and assists users in identifying its specific characteristics. The suffix 'df' indicates that the dataset is a data frame. The original content has not been modified in any way.
Source
Data taken from the chilemapas package version 0.3.0
View Available Datasets in ChileDataAPI
Description
This function lists all datasets available in the 'ChileDataAPI' package. If the 'ChileDataAPI' package is not loaded, it stops and shows an error message. If no datasets are available, it returns a message and an empty vector.
Usage
view_datasets_ChileDataAPI()
Value
A character vector with the names of the available datasets. If no datasets are found, it returns an empty character vector.
Examples
if (requireNamespace("ChileDataAPI", quietly = TRUE)) {
library(ChileDataAPI)
view_datasets_ChileDataAPI()
}