Skip to content

Commit

Permalink
uodates for cran
Browse files Browse the repository at this point in the history
  • Loading branch information
macataci committed Jul 31, 2024
1 parent ee8bb86 commit 56e5a40
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 3 deletions.
8 changes: 8 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,19 @@ Authors@R: c(
person("Joshua W.", "Lambert", , "[email protected]", role = "rev",
comment = c(ORCID = "0000-0001-5218-3046"))
)
<<<<<<< Updated upstream
Description: This package acquires and wrangles Colombian socioeconomic,
geospatial, population and climate data. It solves the problem of
Colombian data being issued in different web pages and sources by
using functions that allow the user to select the desired database and
download it without having to do the exhausting acquisition process.
=======
Description: This package acquires and wrangles Colombian socioeconomic,
geospatial, population and climate data. It solves the problem of Colombian data
being issued in different web pages and sources by using functions that allow
the user to select the desired database and download it without having to do the
exhausting acquisition process.
>>>>>>> Stashed changes
License: MIT + file LICENSE
URL: https://github.com/epiverse-trace/ColOpenData,
https://epiverse-trace.github.io/ColOpenData/
Expand Down
4 changes: 4 additions & 0 deletions R/retrieve.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ retrieve_climate_path <- function() {
#' Dictionaries are not included in the general documentation file. Therefore,
#' the path is built internally.
#'
<<<<<<< Updated upstream
#' @param dict_name character with the dictionary name.
=======
#' @param dict_name character with the dictionary file name.
>>>>>>> Stashed changes
#'
#' @return character with path to retrieve the dataset.
#'
Expand Down
8 changes: 8 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,21 @@ pak::pak("epiverse-trace/ColOpenData")

## Quick Overview

<<<<<<< Updated upstream
**ColOpenData** contains data from two public data sources: The National Administrative Department of Statistics [(DANE)](https://www.dane.gov.co/index.php/en/), and the Institute of Hydrology, Meteorology and Environmental Studies [(IDEAM)](https://www.ideam.gov.co/). The available data is divided in four categories:
=======
**ColOpenData** contains data from two public data sources: The National Administrative Department of Statistics [(DANE)](https://www.dane.gov.co/index.php/en/), and the Institute of Hydrology, Meteorology and Environmental Studies (IDEAM). The available data is divided in four categories:
>>>>>>> Stashed changes
- **Demographic:** Demographic and Socioeconomic data presents information from the National Population and Dwelling Census (CNPV) of 2018. The CNPV data corresponds to the most recent census available to date and the information is presented as an answer to three questions: How many are we?, Where are we? and How do we live? Further information can be consulted at the [CNPV results](https://www.dane.gov.co/index.php/estadisticas-por-tema/demografia-y-poblacion/censo-nacional-de-poblacion-y-vivenda-2018).

- **Geospatial:** This data is retrieved from the National Geostatistical Framework (MGN), which includes maps and a summarized version of the 2018 CNPV, aggregated to spatial geometries. The data is available at different aggregation levels including: Blocks, Urban and Rural Sections, Urban and Rural Sectors, Urban Areas, Municipalities and Departments. More information is available at [MGN update news](https://www.dane.gov.co/index.php/actualidad-dane/5454-el-dane-actualizo-el-marco-geoestadistico-nacional-a-2018).

<<<<<<< Updated upstream
- **Climate:** Climate data is recovered from backup information provided by IDEAM, containing historical data from the first station in the country (January 1st 1920) until May 31st 2023. This backup includes temperature, precipitation, sunshine duration, wind direction, among others. More information can be found at [IDEAM website](https://www.ideam.gov.co/).
=======
- **Climate:** Climate data is recovered from backup information provided by IDEAM, containing historical data from the first station in the country (January 1st 1920) until May 31st 2023. This backup includes temperature, precipitation, sunshine duration, wind direction, among others.
>>>>>>> Stashed changes
- **Population projections:** Population Projections data contains the population projections and back projections from 1950 to 2070, considering the post COVID-19 update, which was calculated based on the results of 2018 CNPV. Further information can be consulted at [DANE website](https://www.dane.gov.co/index.php/estadisticas-por-tema/demografia-y-poblacion/proyecciones-de-poblacion).

Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!-- `packagename` is extracted from the DESCRIPTION file -->
<!-- `gh_repo` is extracted via a special environment variable in GitHub Actions -->

# ColOpenData <img src="man/figures/logo.svg" align="right" width="200"/>
# {{ packagename }} <img src="man/figures/logo.svg" align="right" width="200"/>

<!-- badges: start -->

Expand Down Expand Up @@ -48,9 +48,14 @@ pak::pak("epiverse-trace/ColOpenData")
**ColOpenData** contains data from two public data sources: The National
Administrative Department of Statistics
[(DANE)](https://www.dane.gov.co/index.php/en/), and the Institute of
<<<<<<< Updated upstream
Hydrology, Meteorology and Environmental Studies
[(IDEAM)](https://www.ideam.gov.co/). The available data is divided in
four categories:
=======
Hydrology, Meteorology and Environmental Studies (IDEAM). The available
data is divided in four categories:
>>>>>>> Stashed changes
- **Demographic:** Demographic and Socioeconomic data presents
information from the National Population and Dwelling Census (CNPV)
Expand All @@ -73,8 +78,12 @@ four categories:
provided by IDEAM, containing historical data from the first station
in the country (January 1st 1920) until May 31st 2023. This backup
includes temperature, precipitation, sunshine duration, wind
<<<<<<< Updated upstream
direction, among others. More information can be found at [IDEAM
website](https://www.ideam.gov.co/).
=======
direction, among others.
>>>>>>> Stashed changes
- **Population projections:** Population Projections data contains the
population projections and back projections from 1950 to 2070,
Expand Down
1 change: 1 addition & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Geospatial
CMD
Codecov
Epiverse
Expand Down
4 changes: 4 additions & 0 deletions man/retrieve_dict_path.Rd

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

2 changes: 1 addition & 1 deletion tests/testthat/test-download_population_projections.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ test_that("Download pop_projections works as expected", {
expect_snapshot(download_pop_projections(
spatial_level = "department",
start_year = 2010,
end_year = 2027
end_year = 2020
))
})
2 changes: 1 addition & 1 deletion tests/testthat/test-merge_geo_demographic.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test_that("Merge geospatial and demographic works as expected", {
test_that("Merge geospatial and demographic has the correct class", {
# Expect object to be an sf data.frame
expect_s3_class(
merge_geo_demographic("DANE_CNPVH_2018_1HM"),
merge_geo_demographic("DANE_CNPVH_2018_1HD"),
c("sf", "data.frame")
)
})
8 changes: 8 additions & 0 deletions vignettes/climate_data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ knitr::opts_chunk$set(
```

::: {style="text-align: justify;"}
<<<<<<< Updated upstream
**ColOpenData** can be used to access open climate data from Colombia. This climate data is retrieved from the Institute of Hydrology, Meteorology and Environmental Studies [(IDEAM)](https://www.ideam.gov.co/). The climate module allows the user to consult climate data for any Region of Interest (ROI) inside the country and retrieve the information for each station contained inside.
=======
**ColOpenData** can be used to access open climate data from Colombia. This climate data is retrieved from the Institute of Hydrology, Meteorology and Environmental Studies (IDEAM). The climate module allows the user to consult climate data for any Region of Interest (ROI) inside the country and retrieve the information for each station contained inside.
>>>>>>> Stashed changes
The available information from IDEAM can be accessed using specific internal tags as follows:
:::
Expand Down Expand Up @@ -111,7 +115,11 @@ head(stations)
```

::: {style="text-align: justify;"}
<<<<<<< Updated upstream
We can see that in the region there are 129 stations. Different categories are recorded by different stations, and can be checked at the column [categoria]{.underline}. Stations under the categories *Climática Principal* and *Climática Ordinaria* have records of temperature.
=======
We can see that in the region there are 129 stations. Different categories are recorded by different stations, and can be checked at the column [categoria]{.underline}. To understand the category of each station we can use the definition catalog provided by IDEAM. Stations under the categories *Climática Principal* and *Climática Ordinaria* have records of temperature.
>>>>>>> Stashed changes
Some stations are suspended, which means they are not taking measurements at the moment. This information is found at the column [estado]{.underline} where, if suspended, the observation would be *Suspendida* Also, at the column [fecha_suspension]{.underline} the observation would be different from `NA`, since suspended stations would have an associated suspension date. However, even if a station is suspended, the historical data (up to the suspension date) can be accessed.

Expand Down

0 comments on commit 56e5a40

Please sign in to comment.