Skip to content

Create data downloader #2

@mcmancini

Description

@mcmancini

Create a downloader for the Soil data. We will start with the SoilGrids dataset;
it was downloaded using the soilgrids 0.1.3 library. Docs can be found here.

The idea here is to have two functionalities implemented:

  • on-demand download through geographic querying (e.g., passing a lon-lat pair, or an OS grid code for the UK) the relevant soil data from the SoilGrids API. Data in this case is not saved to disk.
  • Bulk download of soil data from a geographic area defined with a bounding box to be saved on disk in .netCDF format.

The way I am thinking of building this is as follows:

  • We create a SoilApp object, which the user needs to initialise as follows: soil_app = SoilApp()
  • This object contains two methods: download() and bulk_download()
  • download() takes as only argument a dictionary containing either {'lon': longitude, 'lat': latitude} coordinates or {'OS_code': os_grid_code}
  • bulk_download() which requires the coordinates defining the rectangular bounding box of the area of interest and the path in which the downloaded data will be stored as follows:
    • xmin = the longitude of the left corners of the bounding box of interest;
    • xmax = the longitude of the right corners of the bounding box of interest;
    • ymin = the latitude of the bottom corners of the bounding box of interest;
    • ymax = the latitude of the top corners of the bounding box of interest.
    • save_path = the directory in which the downloaded data will be stored.

At a later stage, we will add the possibility of downloading data also from the World Harmonized Soil Database

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions