sensortoolkit.reference._ref_api_query.save_api_dataset

save_api_dataset(process_df, raw_df, path, query_type, param_class, data_period)[source]

Save processed datasets at regular monthly intervals.

Parameters
  • process_df (pandas DataFrame) – An SDFS formatted dataset for query data returned by the API service.

  • raw_df (pandas DataFrame) – A dataset containing unmodified data returned by the API service.

  • path (str) – The project path where the /data/reference_data subdirectory is housed. Data are saved at the refrence data subdirectory structure within this parent directory.

  • query_type (str) – The name of the API service used to retreieve query data.

  • param_class (sstr) – A term for sorting the parameter into one of three environmental parameter classifications, either ‘PM’ for particulate matter pollutants, ‘Gases’ for gaseous pollutants, or ‘Met’ for meteorological environmental parameters.

  • data_period (list) – A list of length 2, containing the start date for the monthly period (index position 0), and end date (index position 1). Each element is a string with date format ‘YYYYMMDD’.

Returns

None.