download_fr.bnpe#
- download_fr.bnpe(*, dst_folder, start_year=None, end_year=None, masks=None, departments=None, communes=None, file_formats='geojson')[source]#
Function to facilitate the downloading of French water withdrawal data from BNPE API.
Parameters#
- dst_folderstr or pathlib.Path
Destination folder in which the downloaded data will be stored.
- start_yearint, optional
Year from which the data will be retrieved.
- end_yearint, optional
Year until which the data will be retrieved.
- maskslist of-, or single element among str, pathlib.Path, xarray.Dataset, xarray.DataArray or geopandas.GeoDataFrame, optional
Mask on which the data will be retrieved. At least one parameter among
masks
,departments
orcommunes
should be passed.- departmentsint or list of int, optional
INSEE code(s) of department(s) for which data will be retrieved. At least one parameter among
masks
,departments
orcommunes
should be passed.- communesint or list of int, optional
INSEE code(s) of commune(s) for which data will be retrieved. At least one parameter among
masks
,departments
orcommunes
should be passed.- file_formatsstr or list of str, {‘csv’, ‘json’, ‘geojson’}, default ‘geojson’
File format in which the data will be retrieved.
Returns#
None. Downloaded data is stored in
dst_folder