Skip to content

Commit

Permalink
docs for streamlit dashboard (#155)
Browse files Browse the repository at this point in the history
* docs for streamlit dashboard

* added video

* Update README.md

* Update README.md
  • Loading branch information
aryanbhosale authored Jul 19, 2024
1 parent 3160a46 commit 77fe027
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions examples/streamlit_app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Streamlit Dashboard for Open Source Quartz Solar Forecast

This Streamlit Dashboard provides an interactive interface for running and visualizing solar forecasts using the [Open Source Quartz Solar Forecast](https://github.com/openclimatefix/Open-Source-Quartz-Solar-Forecast) model developed by [Open Climate Fix](https://openclimatefix.org/).


https://github.com/user-attachments/assets/940ca4a7-65a4-40ea-a602-ea0f65e96746


## Features

- Configure PV site parameters (latitude, longitude, capacity)
- Select inverter type (No Inverter or Enphase)
- Enphase API authentication flow (if applicable)
- Run solar forecast
- Visualize forecast results with interactive charts
- Compare forecasts with and without recent PV data (if applicable)
- Display raw forecast data and provide an option to download it as CSV

## How to Run

1. Clone the repository and install all the dependencies in a virtual environment on a Linux System(or WSL):
`pip install -e .` and `pip install -r requirements.txt`

2. Optionally, if you have an enphase inverter, set up environment variables (if applicable):

- Create a `.env` file in your root directory
- Add the following variables:
```
ENPHASE_CLIENT_ID=your_client_id
ENPHASE_CLIENT_SECRET=your_client_secret
ENPHASE_API_KEY=your_api_key
ENPHASE_SYSTEM_ID=your_system_id
```

3. Navigate to the `dashboards/dashboard_2` directory.

4. Run the Streamlit app: `streamlit run app.py`

5. Open your web browser and go to the URL provided by Streamlit (usually `http://localhost:8501`).

## Using the App

1. **Configure PV Site:**

- Use the sidebar to input latitude, longitude, and capacity of the PV site.
- Alternatively, check "Use Default Values" to use pre-set values.

2. **Select Inverter Type:**

- Choose between "No Inverter" and "Enphase" from the dropdown menu.

3. **Enphase Authorization (if applicable):**

- If you select Enphase, follow the authorization process:
- Click the provided authorization URL
- Grant permissions on the Enphase website
- Copy the redirect URL and paste it back into the app

4. **Run Forecast:**

- Click the "Run Forecast" button to generate predictions.

5. **View Results:**

- See current power, total forecasted energy, and peak forecasted power.
- Examine the interactive line chart comparing forecasts with and without recent PV data.
- Review the raw forecast data table and optionally download it as CSV for further processing.

## Additional Information

- Forecasts are generated for the next 48 hours in 15-minute intervals.
- The app demonstrates the impact of using recent PV data (from Enphase) on forecast accuracy.

0 comments on commit 77fe027

Please sign in to comment.