pvlib.iotools.read_pvgis_hourly¶
-
pvlib.iotools.read_pvgis_hourly(filename, pvgis_format=None, map_variables=True)[source]¶ Read a PVGIS hourly file.
- Parameters
filename (str, pathlib.Path, or file-like buffer) – Name, path, or buffer of hourly data file downloaded from PVGIS.
pvgis_format (str, default None) – Format of PVGIS file or buffer. Equivalent to the
outputformatparameter in the PVGIS API. If filename is a file and pvgis_format isNonethen the file extension will be used to determine the PVGIS format to parse. If filename is a buffer, then pvgis_format is required and must be in['csv', 'json'].map_variables (bool, default True) – When true, renames columns of the DataFrame to pvlib variable names where applicable. See variable PVGIS_VARIABLE_MAP.
- Returns
data (pandas.DataFrame) – the time series data
inputs (dict) – the inputs
metadata (dict) – metadata
- Raises
ValueError – if pvgis_format is
Noneand the file extension is neither.csvnor.jsonor if pvgis_format is provided as input but isn’t in['csv', 'json']TypeError – if pvgis_format is
Noneand filename is a buffer
See also