Skip to content

pddcs: fetch raw data from different sources and prepare datasets for upload to DCS.

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

worldbank/pddcs

Repository files navigation

pddcs

Lifecycle: maturing R-CMD-check test-coverage pkgdown

pddcs is designed to fetch raw data from different sources and prepare datasets for upload to DCS. Current supported sources are UNICEF, WHO, Eurostat and UN’s Population Division.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github('worldbank/pddcs')
library(pddcs)

Examples

Fetch a single indicator:

# Fetch population data from Eurostat
df <- fetch_indicator('SP.POP.TOTL', source = 'eurostat')

Fetch multiple indicators:

# Fetch multiple indicators from the same source
df <- fetch_indicator(
  indicator = c('SH.STA.ANV4.ZS', 'SN.ITK.VITA.ZS'),
  source = 'unicef')

# Fetch multiple indicators from different sources
df <- fetch_indicator(
  indicator = c('SH.STA.ANV4.ZS', 'SP.POP.TOTL'),
  source = c('unicef', 'eurostat'))

Format data:

# Convert to DCS 'data' format 
df <- format_dcs(df, type = 'data')

Write data:

# Write to a DCS formatted file  
write_dcs(df, path = 'data-SP.POP.TOTL-eurostat.xlsx', type = 'data')

About

pddcs: fetch raw data from different sources and prepare datasets for upload to DCS.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages