Open dannyparsons opened 1 year ago
A couple of additional functions. Like update_daily_data
and get_daily_data
, we now have
get_definitions_data(country, station_id)
- returns definitions data for specified stations as a data frame - looks for file in local storage and calls update_definitions_data() if neededupdate_definitions_data(country, station_id)
- pulls the latest version of the definitions data file from GCS bucket and saves it in local storage
get_daily_data(country, station_id)
- returns daily data for specified stations as a data frame - looks for file in local storage and callsupdate_daily_data()
if neededupdate_daily_data(country, station_id)
- pulls the latest version of a daily data file from GCS bucket and saves it in local storageget_metadata(country)
- returns the station metadata as a data frame - looks for file in local storage and checks for updated data from GCS bucket, returns path to local file silentlyupdate_metadata(country)
- pulls the latest version of a metadata file from GCS bucket and saves it in local storage, returns path to local file silentlyget_data(filename)
- pulls the latest version of filename from GCS bucket and saves it in local storage, returns path to local file silentlyget_seasonal_forecast(country, ...)
- returns the path to a seasonal forecast file, possibly region specific, depending on format usedset_auth_file(auth_file)
- sets GCS_AUTH_FILE with provided file path to json file