Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/openclimatefix/pvoutput
Python code for downloading PV data from PVOutput.org
https://github.com/openclimatefix/pvoutput
nowcasting pvoutput python python-library solar
Last synced: 7 days ago
JSON representation
Python code for downloading PV data from PVOutput.org
- Host: GitHub
- URL: https://github.com/openclimatefix/pvoutput
- Owner: openclimatefix
- License: apache-2.0
- Created: 2019-07-16T16:51:03.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-11-25T17:47:02.000Z (about 1 month ago)
- Last Synced: 2024-11-27T11:45:13.441Z (about 1 month ago)
- Topics: nowcasting, pvoutput, python, python-library, solar
- Language: Python
- Homepage:
- Size: 5.09 MB
- Stars: 34
- Watchers: 5
- Forks: 17
- Open Issues: 34
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- open-sustainable-technology - pvoutput - Python code for downloading PV data from PVOutput.org. (Renewable Energy / Photovoltaics and Solar Energy)
README
[![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors-)
[![codecov](https://codecov.io/gh/openclimatefix/pvoutput/branch/main/graph/badge.svg?token=GTQDR2ZZ2S)](https://codecov.io/gh/openclimatefix/pvoutput)
Download historical solar photovoltaic data from [PVOutput.org](https://pvoutput.org).
This code is a work-in-progress. The aim is to provide both a Python library for interacting with [PVOutput.org's API](https://pvoutput.org/help.html#api), and a set of scripts for downloading lots of data :)
# Installation
```bash
$ pip install pvoutput-ocf
```## Register with PVOutput.org
You need to get an API key *and* a system ID from PVOutput.org.
If you don't have a PV system, click the "energy consumption only" box
when registering on PVOutput. If you don't include a
system ID, then you'll get a "401 Unauthorized" response from the PVOutput API.You can pass the API key and system ID into the `PVOutput` constructor.
Or, create a `~/.pvoutput.yml` file which looks like:```yaml
api_key:
system_id:
```The default location of the `.pvoutput.yml` is the user's home directory, expanded from `~`. This can be overridden by setting the `PVOUTPUT_CONFIG` environment variable.
e.g. `export PVOUTPUT_CONFIG="/my/preferred/location/.pvoutput.yml"`
Alternatively, you can set `API_KEY`, `SYSTEM_ID` and `DATA_SERVICE_URL` (see below) as environmental variables.
### API quotas and paid subscriptions
Please see [here](https://pvoutput.org/help/data_services.html) for update info.#### Free
PVOutput.org gives you 60 API requests per hour. Per request, you can download one day of data for one PV system. (See PVOutput's docs for more info about [rate limits](https://pvoutput.org/help/api_specification.html#rate-limits).)
#### Donate
[Donating to PVOutput.org](https://pvoutput.org/help/donations.html#donations) increases your quota for a year to 300 requests per hour.#### Paid
To get more historical data, you can pay $600 Australian dollars for a year's 'Live System History' subscription for a single country ([more info here](https://pvoutput.org/help/data_services.html). And [here's PVOutput.org's full price list](https://pvoutput.org/services.jsp)).
This allows you to use the [`get batch status`](https://pvoutput.org/help/data_services.html#get-batch-status-service) API to download 900 PV-system-*years* per hour.If you have subscribed to PVOutput's data service then either
- add `data_service_url` to your configuration file (`~/.pvoutput.yml`) or
- pass `data_service_url` to the `PVOutput` constructor.The `data_service_url` should end in `.org` (note this dones include the `/service/r2` part of the URL)
For example: `data_service_url: https://pvoutput.org/`## Install pvoutput Python library
`pip install -e git+https://github.com/openclimatefix/pvoutput.git@main#egg=pvoutput-ocf
# Usage
See the [Quick Start notebook](examples/quick_start.ipynb).
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Jack Kelly
💻
Sam Murphy-Sugrue
💻
Gabriel Tseng
💻
Jamie Taylor
💻
Peter Dudfield
🚇
Shanmukh Chava
💻
Antsthebul
💻
Rachit Singh
🔣 💻
devsjc
💻
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!