laser.measles.demographics.gadm
laser.measles.demographics.gadm
GADM shapefiles
laser.measles.demographics.gadm.GADMShapefile
Bases: AdminShapefile
laser.measles.demographics.gadm.GADMShapefile.check_dotname_fields()
Check dotname_fields from shapefile name if not explicitly provided.
laser.measles.demographics.gadm.GADMShapefile.download(country_code, admin_level, directory=None, timeout=60)
classmethod
Download the GADM shapefile for a given country code and return a GADMShapefile instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
country_code
|
str
|
The country code to download the shapefile for. |
required |
admin_level
|
int
|
The admin level to download the shapefile for. |
required |
directory
|
str | Path | None
|
The directory to download the shapefile to. If None, uses current directory. |
None
|
timeout
|
int
|
The timeout for the request. |
60
|
Returns:
| Type | Description |
|---|---|
GADMShapefile
|
A GADMShapefile instance for the downloaded shapefile. |