import_who: Import WHO Mortality Data

Description Usage Arguments Details Value Examples

View source: R/get_data.R

Description

This function imports the csv WHO mortality files, extracted from downloaded zip files from a local directory

Usage

1
2
import_who(path, data = c("mort", "pop", "ccode", "notes"),
  proc = TRUE)

Arguments

path

a character file path where the extracted .csv WHO files exist

data

a character to specify which files to import into R, must be explicitly defined

proc

a logical to specify whether to automatically modify column class and convert column names to snakecase.

Details

The data parameter allows the user to download a specific set of data files. The mort imports the two ICD-10 mortality csv files, "Morticd10_part1.zip" and "Morticd10_part2.zip" and combines them into a single tibble object The pop imports the WHO population csv file The ccode imports the country code csv file The notes imports the notes csv file

Fore more details see the docs for proc_who_mort and snakecase_cols

Value

a tibble object of the specified data

Examples

1
2
3
4
5
6
7
## Not run: 
download_who(dest = getwd(), data = "ccode")
extract_who(path = getwd(), dest = getwd(), convert = TRUE)
ccode_df <- import_who(path = getwd(), data = "ccode")
head(ccode_df)

## End(Not run)

eugejoh/WHOmortality documentation built on Nov. 4, 2019, 11:58 a.m.