Skip to contents

get_country_shapefile retrieves the shapefile for a specified country and administrative level.

Usage

get_country_shapefile(country_iso, level = c("admin_level_1", "district"))

Arguments

country_iso

A string specifying the ISO3 code of the country (e.g., 'KEN' for Kenya).

level

A string specifying the level of analysis. Options are:

  • 'adminlevel_1': First administrative level.

  • 'district': District level.

Value

A sf object containing the shapefile for the specified country and level.

Examples

shapefile <- get_country_shapefile('KEN', level = 'admin_level_1')