pipeline.src.flows.fao_areas

Functions

extract_fao_areas(→ geopandas.GeoDataFrame)

Download shapefile of FAO areas and load to GeoDataFrame.

transform_fao_areas(→ geopandas.GeoDataFrame)

Transforms the fao_areas DataFrame to match the desired table columns.

load_fao_areas(fao_areas)

fao_areas_flow([url, proxies, extract_fao_areas_fn])

Module Contents

pipeline.src.flows.fao_areas.extract_fao_areas(url: str, proxies: dict) geopandas.GeoDataFrame[source]

Download shapefile of FAO areas and load to GeoDataFrame.

Parameters:
  • url (str) – url to fetch the shapefile from

  • proxies (dict) – http and https proxies to use for the download.

Returns:

GeoDataFrame of FAO areas

Return type:

gpd.GeoDataFrame

pipeline.src.flows.fao_areas.transform_fao_areas(fao_areas: geopandas.GeoDataFrame) geopandas.GeoDataFrame[source]

Transforms the fao_areas DataFrame to match the desired table columns.

pipeline.src.flows.fao_areas.load_fao_areas(fao_areas: geopandas.GeoDataFrame)[source]
pipeline.src.flows.fao_areas.fao_areas_flow(url: str = FAO_AREAS_URL, proxies: dict = PROXIES, extract_fao_areas_fn: prefect.Task = extract_fao_areas)[source]