- class eocrops.inputs.meteoblue.WeatherDownload(api_key, shapefile, id_column, timestamp_column, queryBackbone=None)[source]#
Bases:
object
Define the request to download weather data from ERA5 using meteoblue api
- Parameters:
- api_keystr
Meteoblue API
- shapefilegpd.GeoDataFrame
Shapefile with point or polygon geometry. Each observation is a request to obtain the associated meteorological data.
- id_columnstr
Column from the shapefile containing the identifier of each observation. The output file will have this identifier also.
- time_intervaltuple
Time interval (yyyy-mm-dd, yyyy-mm-dd)
- queryBackbonedict
Dictionary containing the query backbone of meteoblue. By default, it is None as we defined it an example.
Methods
execute
(query[, conc_req])Download Meteoblue data given a query and a time interval
- execute(query, conc_req=5)[source]#
Download Meteoblue data given a query and a time interval
- Parameters:
- querydict
Dictionary of agroclimatic variables
- self.time_intervaltuple
Time interval to extract the data
- conc_reqint
Maximum number of requests in concurrency
- Returns:
- pd.DataFrame with weather data associated to each observation.