solarwindpy.solar_activity.base.DataLoader

class DataLoader(key, url)[source]

Bases: Base

__init__(key, url)[source]

Initialize a data loader.

Parameters:
  • key (str) – Unique data identifier, typically from something like SIDC_ID.

  • url (str) – Full download URL for the data source.

abstract property data_path
abstractmethod static convert_nans(data)[source]
abstractmethod download_data()[source]
abstractmethod load_data()[source]
property logger

logging.Logger attached to the instance.

property data
property key
property url
property ctime
property age
set_key(key)[source]
set_url(new)[source]
get_data_ctime()[source]

Determine when the current data set was created.

Returns:

Creation time inferred from the file name, or 1970-01-01 if no prior data are found.

Return type:

pandas.Timestamp

get_data_age()[source]
maybe_update_stale_data()[source]

Download new data if the existing cache is stale.