pvlib.iotools.get_solcast_historic#
- pvlib.iotools.get_solcast_historic(latitude, longitude, start, api_key, end=None, duration=None, map_variables=True, **kwargs)[source]#
Get historical irradiance and weather estimates.
for up to 31 days of data at a time for a requested location, derived from satellite (clouds and irradiance over non-polar continental areas) and numerical weather models (other data). Data is available from 2007-01-01T00:00Z up to real time estimated actuals.
- Parameters
latitude (float) – in decimal degrees, between -90 and 90, north is positive
longitude (float) – in decimal degrees, between -180 and 180, east is positive
start (datetime-like) – First day of the requested period
end (optional, datetime-like) – Last day of the requested period. Must include one of
end
orduration
.duration (optional, ISO 8601 compliant duration) – Must include either
end
orduration
. ISO 8601 compliant duration for the historic data, like “P1D” for one day of data. Must be within 31 days ofstart
.map_variables (bool, default: True) – When true, renames columns of the DataFrame to pvlib variable names where applicable. See variable
VARIABLE_MAP
. Time is the index shifted to the midpoint of each interval from Solcast’s “period end” convention.api_key (str) – To access Solcast data you will need an API key 1.
kwargs – Optional parameters passed to the API. See 2 for full list of parameters.
- Returns
data (pandas.DataFrame) – containing the values for the parameters requested. The times in the DataFrame index indicate the midpoint of each interval.
metadata (dict) – latitude and longitude of the request.
Examples
>>> df, meta = pvlib.iotools.solcast.get_solcast_historic( >>> latitude=-33.856784, >>> longitude=151.215297, >>> start='2007-01-01T00:00Z', >>> duration='P1D', >>> api_key="your-key" >>> )
you can pass any of the parameters listed in the API docs, for example using the
end
parameter instead>>> df, meta = pvlib.iotools.solcast.get_solcast_historic( >>> latitude=-33.856784, >>> longitude=151.215297, >>> start='2007-01-01T00:00Z', >>> end='2007-01-02T00:00Z', >>> api_key="your-key" >>> )
References