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, orfile-like buffer) – Name, path, or buffer of hourly data file downloaded from PVGIS.pvgis_format (
str, defaultNone) – Format of PVGIS file or buffer. Equivalent to theoutputformatparameter in the PVGIS API. Iffilenameis a file andpvgis_formatisNonethen the file extension will be used to determine the PVGIS format to parse. Iffilenameis a buffer, thenpvgis_formatis required and must be in['csv', 'json'].map_variables (
bool, defaultTrue) – When true, renames columns of the DataFrame to pvlib variable names where applicable. See variableVARIABLE_MAP.
- Returns
data (
pandas.DataFrame) – the time series datainputs (
dict) – the inputsmetadata (
dict) – metadata
- Raises
ValueError – if
pvgis_formatisNoneand the file extension is neither.csvnor.jsonor ifpvgis_formatis provided as input but isn’t in['csv', 'json']TypeError – if
pvgis_formatisNoneandfilenameis a buffer
See also