deafrica_tools.load_wapor#
Functions
|
Get information on WaPOR v3 data. |
List all the available WaPOR v3 mapset codes and descriptions. |
|
|
Load the netCDF downloaded using wapordl.wapor_map as a xarray Dataset. |
- deafrica_tools.load_wapor.get_WaPORv3_info(url: str, info: str | list[str]) pandas.DataFrame#
Get information on WaPOR v3 data. WaPOR v3 variables are stored in mapsets, which in turn contain rasters that contain the data for a particular date or period.
- Parameters:
url (str) – URL to get information from
info (str | list[str]) – Attribute of a mapset
- Returns:
A table of the mapset attributes found.
- Return type:
pd.DataFrame
- deafrica_tools.load_wapor.get_all_WaPORv3_mapsets() pandas.DataFrame#
List all the available WaPOR v3 mapset codes and descriptions.
- Returns:
A table of all the available WaPOR v3 mapset codes and descriptions.
- Return type:
pd.DataFrame
- deafrica_tools.load_wapor.load_wapor_ds(filename: str, variable: str) xarray.Dataset#
Load the netCDF downloaded using wapordl.wapor_map as a xarray Dataset. Note: Only works for netcdf files, this is because when loading the WAPOR TIFF files, the start_date and end_date attributes are only loaded for the first band.
- Parameters:
filename (str) – File path of the netCDF downloaded using wapordl.wapor_map
variable (str) – Name of the WAPOR version 3 mapset downloaded
- Returns:
Dataset containing the WAPOR version 3 mapset data downloaded.
- Return type:
xr.Dataset