Skip to contents

Returns a list of regions available for a particular country.

Usage

gdl_regions(session, country)

Arguments

session

A valid GDL session object to interface with.

country

An ISO3 country code.

Examples

# Create a session using your API token (provided by environment here)
session <- gdl_session(Sys.getenv('GDL_API_TOKEN'))
# Request list of regions for India
regions <- gdl_regions(session, 'IND')
head(regions, n=10)
#>    gdlcode              name
#> 1  INDr101    Andhra Pradesh
#> 2  INDr102             Assam
#> 3  INDr103             Bihar
#> 4  INDr104               Goa
#> 5  INDr105           Gujarat
#> 6  INDr106           Haryana
#> 7  INDr107  Himachal Pradesh
#> 8  INDr108 Jammu and Kashmir
#> 9  INDr109         Karnataka
#> 10 INDr110            Kerala