{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.13","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":64733,"databundleVersionId":7762802,"sourceType":"competition"}],"dockerImageVersionId":30664,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# How to use the download script ([https://github.com/plantnet/GeoLifeCLEF](https://github.com/plantnet/GeoLifeCLEF))","metadata":{}},{"cell_type":"markdown","source":"First, you need to download the script :\n\n* In the console :\n```\nwget https://raw.githubusercontent.com/plantnet/GeoLifeCLEF/master/download.py\n```\n* In a notebook :\n```\n!wget https://raw.githubusercontent.com/plantnet/GeoLifeCLEF/master/download.py\n```\n\nThe script requires that you first select the type of data you want to download :\n```\nData type:\n  --raster              Download full rasters\n  --presence-only       Download PO metadata and pre-extracted data if option set to true\n  --presence-absence    Download PA metadata and pre-extracted data if option set to true\n  --pre-extracted       Download pre-extracted data of PO and/or PA depending on the options set\n  --cube                Download cube instead of csv when available\n```\n\nAnd the variables you want to download :\n```\nVariables:\n  --climate             Download climate raster or pre-extracted data\n  --elevation           Download elevation raster or pre-extracted data\n  --humanfootprint      Download humanfootprint raster or pre-extracted data\n  --landcover           Download landcover raster or pre-extracted data\n  --soilgrids           Download soilgrids raster or pre-extracted data\n  --satellitepatches    Download satellitepatches raster or pre-extracted data\n  --satellitetimeseries\n                        Download satellitesimeseries raster or pre-extracted data\n  --all-variables       Select all variables\n  ```\n  \n  All variables can be selected with the ```--all-variables``` option. You can select where to store the data with the option ```--data path_to_data```.\n  \n  All combination of paramters do not necessarily lead to existing data (e.g. there is not ```raster``` for ```satellitepatches```). The script will download what's available.","metadata":{}},{"cell_type":"markdown","source":"## Examples\nSuppose that you want to download all rasters available and the metadata for presence-only occurences and save the results in a folder ```output```. The command line should be :\n\n```bash\npython download.py --data output --raster --presence-only --all-variables\n```\n\nNow, if you are only interested in some variables (e.g. ```elevation``` and ```landcover```), you could replace ```-all-variables``` by ```--elevation --landcover```.\n\nSuppose that in addition to the metadata for presence-only, you want to download the extracted features for all variables (thus including ```satellitepatches``` and ```satellitetimeseries```), you can write :\n\n```bash\npython download.py --data output --raster --presence-only --pre-extracted --all-variables\n```\n\nHowever, since you now download the pre-extracted features, we might not need to download the raster and ```--raster``` can be removed.\n\nThe ```-pre-extracted``` will download many CSV. Sometimes, these CSV are grouped in a cube of data (a multi-dimensional Tensor). If you want to download the cube of data when available, you can write :\n\n```bash\npython download.py --data output --presence-only --pre-extracted --cube --all-variables\n```\n\nIf you want to download the presence-absence as well, you can write :\n\n```bash\npython download.py --data output --presence-only --presence-absence --pre-extracted --cube --all-variables\n```","metadata":{}},{"cell_type":"markdown","source":"## ","metadata":{}}]}