pvlib.iotools.read_midc_raw_data_from_nrel#

pvlib.iotools.read_midc_raw_data_from_nrel(site, start, end, variable_map={}, timeout=30)[source]#

Request and read MIDC data directly from the raw data api.

Parameters
  • site (string) – The MIDC station id.

  • start (datetime-like) – Start date for requested data.

  • end (datetime-like) – End date for requested data.

  • variable_map (dict) – A dictionary mapping MIDC field names to pvlib names. Used to rename columns of the resulting DataFrame. See Notes of pvlib.iotools.read_midc() for example.

  • timeout (float, default 30) – Number of seconds to wait to connect/read from the API before failing.

Returns

data – Dataframe with DatetimeIndex localized to the station location.

Raises
  • requests.HTTPError – For any error in retrieving the CSV file from the MIDC API

  • requests.Timeout – If data is not received in within timeout seconds

Notes

Requests spanning an instrumentation change will yield an error. See the MIDC raw data api page here for more details and considerations.