metobs_toolkit.geedatasetmanagers.GEEDynamicDatasetManager.extract_timeseries_data#

GEEDynamicDatasetManager.extract_timeseries_data(metadf: DataFrame, startdt_utc, enddt_utc, obstypes: list = ['temp'], get_all_bands: bool = False, drive_filename: str = None, drive_folder: str = 'gee_timeseries_data', force_direct_transfer: bool = False, force_to_drive: bool = False, initialize_gee: bool = True) DataFrame | None[source]#

Extract timeseries data and set the modeldf.

Parameters:
  • metadf (pandas.DataFrame) – Metadata dataframe with station locations.

  • startdt_utc (datetime.datetime) – Start datetime of the timeseries in UTC.

  • enddt_utc (datetime.datetime) – Last datetime of the timeseries in UTC.

  • obstypes (list of str, optional) – List of ModelObstype names to extract modeldata for. Default is [‘temp’].

  • get_all_bands (bool, optional) – If True, all values (over all bands) are extracted. Default is False.

  • drive_filename (str or None, optional) – Filename for saving data on Google Drive. Default is None.

  • drive_folder (str, optional) – Folder on Google Drive to save the file. Default is “gee_timeseries_data”.

  • force_direct_transfer (bool, optional) – If True, forces direct transfer. Default is False.

  • force_to_drive (bool, optional) – If True, forces writing to Google Drive. Default is False.

  • initialize_gee (bool, optional) – If True, initializes the GEE API before extracting data. Default is True.

Returns:

Extracted timeseries dataframe or None if written to Drive.

Return type:

pandas.DataFrame or None

Note

When extracting large amounts of data, the timeseries data will be written to a file and saved on your Google Drive. In this case, use the metobs_toolkit.Dataset.import_gee_data_from_file() method to import the data.