expand_location_tree: Expand the tree for location data from Go.Data

View source: R/expand_location_tree.R

expand_location_treeR Documentation

Expand the tree for location data from Go.Data

Description

A function to add location id numbers at all administrative levels.

Usage

expand_location_tree(locations = locations)

Arguments

locations

A data frame of locations. Can be retrieved using get_locations().

Value

Returns a data frame of locations associated with Go.Data instance including all location id numbers at different administrative levels.

Examples

## Not run: 
url <- "https://MyGoDataServer.com/"
username <- "myemail@email.com"
password <- "mypassword"

locations <- get_locations(url=url,
                           username=username,
                           password=password)

locations_clean <- expand_location_tree(locations)

#All in one step
locations_clean <- expand_location_tree(get_locations(url,username,password))

## End(Not run)

WorldHealthOrganization/godataR documentation built on May 21, 2023, 11:30 a.m.