Skip to content

Commit

Permalink
refactor api and dashboard (#149)
Browse files Browse the repository at this point in the history
* refactor api and dashbaord

* update dashboard to dashboards, and add dashboard_2

There was a discrepancy - the streamlit dashboard was also named dashboard_1, changed this to dashboard_2 to match the name in the directory

* rename dashboard to dashboards

* Update .bumpversion.cfg

* Update setup.py

* Bump version: 1.0.46 → 1.0.47 [skip ci] (#154)

Co-authored-by: BumpVersion Action <bumpversion@github-actions>

* Create README.md

* added video

* Update README.md

---------

Co-authored-by: Aryan Bhosale <[email protected]>
Co-authored-by: Aryan Bhosale <[email protected]>
Co-authored-by: BumpVersion Action <bumpversion@github-actions>
  • Loading branch information
4 people authored Jul 19, 2024
1 parent 87d1013 commit 955f6b1
Show file tree
Hide file tree
Showing 40 changed files with 76 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,16 @@ It is also available on [YouTube](https://www.youtube.com/watch?v=NAZ2VeiN1N8)
## Running the dashboard locally

Start the API first (port 8000):
`cd backend`
`cd api`
`python main.py`

Start the frontend (port 5137):
`cd frontend`
`cd dashboards/dashboard_1`
`npm install`
`npm run dev`

There is also a steamlit dashboard in `dashboards/dashboard_2` that can be used.

## Contribution

We welcome other models.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
72 changes: 72 additions & 0 deletions dashboards/dashboard_2/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. 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.
File renamed without changes.
File renamed without changes

0 comments on commit 955f6b1

Please sign in to comment.