@@ -83,9 +83,9 @@ def get_pvgis_hourly(latitude, longitude, start=None, end=None,
83
83
Include effects of horizon
84
84
userhorizon: list of float, default: None
85
85
Optional user specified elevation of horizon in degrees, at equally
86
- spaced azimuth clockwise from north, only valid if `usehorizon` is
87
- true, if `usehorizon` is true but `userhorizon` is `None` then PVGIS
88
- will calculate the horizon [4]_
86
+ spaced azimuth clockwise from north, only valid if `` usehorizon` ` is
87
+ true, if `` usehorizon`` is true but `` userhorizon`` is `` None`` then
88
+ PVGIS will calculate the horizon [4]_
89
89
pvcalculation: bool, default: False
90
90
Return estimate of hourly PV production.
91
91
peakpower: float, default: None
@@ -110,7 +110,7 @@ def get_pvgis_hourly(latitude, longitude, start=None, end=None,
110
110
outputformat: str, default: 'json'
111
111
Must be in ``['json', 'csv']``. See PVGIS hourly data
112
112
documentation [2]_ for more info.
113
- url: str, default: const:`pvlib.iotools.pvgis.URL`
113
+ url: str, default: : const:`pvlib.iotools.pvgis.URL`
114
114
Base url of PVGIS API. ``seriescalc`` is appended to get hourly data
115
115
endpoint.
116
116
map_variables: bool, default: True
@@ -291,10 +291,10 @@ def read_pvgis_hourly(filename, pvgis_format=None, map_variables=True):
291
291
Name, path, or buffer of hourly data file downloaded from PVGIS.
292
292
pvgis_format : str, default None
293
293
Format of PVGIS file or buffer. Equivalent to the ``outputformat``
294
- parameter in the PVGIS API. If `filename` is a file and
295
- `pvgis_format` is ``None`` then the file extension will be used to
296
- determine the PVGIS format to parse. If `filename` is a buffer, then
297
- `pvgis_format` is required and must be in ``['csv', 'json']``.
294
+ parameter in the PVGIS API. If `` filename` ` is a file and
295
+ `` pvgis_format` ` is ``None`` then the file extension will be used to
296
+ determine the PVGIS format to parse. If `` filename` ` is a buffer, then
297
+ `` pvgis_format` ` is required and must be in ``['csv', 'json']``.
298
298
map_variables: bool, default True
299
299
When true, renames columns of the DataFrame to pvlib variable names
300
300
where applicable. See variable PVGIS_VARIABLE_MAP.
@@ -311,11 +311,11 @@ def read_pvgis_hourly(filename, pvgis_format=None, map_variables=True):
311
311
Raises
312
312
------
313
313
ValueError
314
- if `pvgis_format` is ``None`` and the file extension is neither
315
- ``.csv`` nor ``.json`` or if `pvgis_format` is provided as
314
+ if `` pvgis_format` ` is ``None`` and the file extension is neither
315
+ ``.csv`` nor ``.json`` or if `` pvgis_format` ` is provided as
316
316
input but isn't in ``['csv', 'json']``
317
317
TypeError
318
- if `pvgis_format` is ``None`` and `filename` is a buffer
318
+ if `` pvgis_format`` is ``None`` and `` filename` ` is a buffer
319
319
320
320
See Also
321
321
--------
@@ -385,14 +385,14 @@ def get_pvgis_tmy(latitude, longitude, outputformat='json', usehorizon=True,
385
385
include effects of horizon
386
386
userhorizon : list of float, default None
387
387
optional user specified elevation of horizon in degrees, at equally
388
- spaced azimuth clockwise from north, only valid if `usehorizon` is
389
- true, if `usehorizon` is true but `userhorizon` is `None` then PVGIS
390
- will calculate the horizon [3]_
388
+ spaced azimuth clockwise from north, only valid if `` usehorizon` ` is
389
+ true, if `` usehorizon`` is true but `` userhorizon`` is `` None`` then
390
+ PVGIS will calculate the horizon [3]_
391
391
startyear : int, default None
392
392
first year to calculate TMY
393
393
endyear : int, default None
394
394
last year to calculate TMY, must be at least 10 years from first year
395
- url : str, default :const:`pvlib.iotools.pvgis.URL`
395
+ url : str, default: :const:`pvlib.iotools.pvgis.URL`
396
396
base url of PVGIS API, append ``tmy`` to get TMY endpoint
397
397
map_variables: bool
398
398
When true, renames columns of the Dataframe to pvlib variable names
@@ -411,6 +411,16 @@ def get_pvgis_tmy(latitude, longitude, outputformat='json', usehorizon=True,
411
411
metadata : list or dict
412
412
file metadata, ``None`` for basic
413
413
414
+ Note
415
+ ----
416
+ The PVGIS website uses 10 years of data to generate the TMY, whereas the
417
+ API accessed by this function defaults to using all available years. This
418
+ means that the TMY returned by this function may not be identical to the
419
+ one generated by the website. To replicate the website requests, specify
420
+ the corresponding 10 year period using ``startyear`` and ``endyear``.
421
+ Specifying ``endyear`` also avoids the TMY changing when new data becomes
422
+ available.
423
+
414
424
Raises
415
425
------
416
426
requests.HTTPError
@@ -548,12 +558,12 @@ def read_pvgis_tmy(filename, pvgis_format=None, map_variables=None):
548
558
Name, path, or buffer of file downloaded from PVGIS.
549
559
pvgis_format : str, default None
550
560
Format of PVGIS file or buffer. Equivalent to the ``outputformat``
551
- parameter in the PVGIS TMY API. If `filename` is a file and
552
- `pvgis_format` is ``None`` then the file extension will be used to
561
+ parameter in the PVGIS TMY API. If `` filename` ` is a file and
562
+ `` pvgis_format` ` is ``None`` then the file extension will be used to
553
563
determine the PVGIS format to parse. For PVGIS files from the API with
554
- ``outputformat='basic'``, please set `pvgis_format` to ``'basic'``. If
555
- ` filename` is a buffer, then `pvgis_format` is required and must be in
556
- ``['csv', 'epw', 'json', 'basic']``.
564
+ ``outputformat='basic'``, please set `` pvgis_format`` to ``'basic'``.
565
+ If `` filename`` is a buffer, then `` pvgis_format`` is required and must
566
+ be in ``['csv', 'epw', 'json', 'basic']``.
557
567
map_variables: bool
558
568
When true, renames columns of the Dataframe to pvlib variable names
559
569
where applicable. See variable PVGIS_VARIABLE_MAP.
@@ -573,11 +583,11 @@ def read_pvgis_tmy(filename, pvgis_format=None, map_variables=None):
573
583
Raises
574
584
------
575
585
ValueError
576
- if `pvgis_format` is ``None`` and the file extension is neither
577
- ``.csv``, ``.json``, nor ``.epw``, or if `pvgis_format` is provided as
586
+ if `` pvgis_format` ` is ``None`` and the file extension is neither
587
+ ``.csv``, ``.json``, nor ``.epw``, or if `` pvgis_format` ` is provided as
578
588
input but isn't in ``['csv', 'epw', 'json', 'basic']``
579
589
TypeError
580
- if `pvgis_format` is ``None`` and `filename` is a buffer
590
+ if `` pvgis_format`` is ``None`` and `` filename` ` is a buffer
581
591
582
592
See also
583
593
--------
0 commit comments