{"id":26076777,"url":"https://github.com/rootfs/grafana_dashboard_forecasting_integration","last_synced_at":"2026-07-15T00:34:48.100Z","repository":{"id":280539669,"uuid":"942344003","full_name":"rootfs/grafana_dashboard_forecasting_integration","owner":"rootfs","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-04T01:00:10.000Z","size":943,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-14T14:42:36.166Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rootfs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-04T00:54:38.000Z","updated_at":"2025-03-04T01:00:13.000Z","dependencies_parsed_at":"2025-03-04T02:30:14.972Z","dependency_job_id":null,"html_url":"https://github.com/rootfs/grafana_dashboard_forecasting_integration","commit_stats":null,"previous_names":["rootfs/grafana_dashboard_forecasting_integration"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rootfs/grafana_dashboard_forecasting_integration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootfs%2Fgrafana_dashboard_forecasting_integration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootfs%2Fgrafana_dashboard_forecasting_integration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootfs%2Fgrafana_dashboard_forecasting_integration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootfs%2Fgrafana_dashboard_forecasting_integration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rootfs","download_url":"https://codeload.github.com/rootfs/grafana_dashboard_forecasting_integration/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootfs%2Fgrafana_dashboard_forecasting_integration/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35485403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-14T02:00:06.603Z","response_time":114,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-09T02:29:25.388Z","updated_at":"2026-07-15T00:34:48.073Z","avatar_url":"https://github.com/rootfs.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grafana Forecasting Integration\n\nThis project provides a forecasting service that integrates with Grafana to display energy demand forecasts. It uses historical data to generate forecasts using ARIMA models and exposes them through a JSON API that Grafana can consume.\n\n## Features\n\n- Time series forecasting using ARIMA models\n- Grafana JSON API integration\n- Fallback mechanisms for robustness\n- Configurable time ranges and regions\n\n## Prerequisites\n\n- Python 3.7+\n- Grafana 8.0+ with the Grafana JSON Datasource plugin installed\n\n## Installation\n\n1. Clone this repository\n2. Install the required Python packages:\n   ```\n   pip install -r requirements.txt\n   ```\n3. Install the Grafana JSON Datasource plugin\n\n## Usage\n\n```bash\npython forecasting.py\n```\n\nThe service will start on port 9001 by default. You can configure the port using the `API_PORT` environment variable.\n\n### Configuring Grafana\n\n1. Open Grafana (default: http://localhost:3000)\n2. Go to Configuration \u003e Data Sources\n3. Add a new data source of type \"Grafana JSON Datasource\"\n4. Set the URL to http://localhost:9001/forecast (or wherever your service is running)\n5. Save and test the data source\n6. Import the dashboard by going to Create \u003e Import\n7. Upload the `grafana_dashboard.json` file or paste its contents\n8. Select the JSON data source you created and click Import\n\n## Configuration\n\nThe following environment variables can be used to configure the service:\n\n- `API_PORT`: Port for the Grafana JSON API (default: 9001)\n\n## Data Sources\n\nBy default, the service uses a mock data source with sample data from a CSV file:\n\n1. Place a CSV file named `carbon_intensity.csv` in the same directory as the script\n2. The CSV should have a `start_date` column and columns for each region (e.g., `ISONE`, `CAISO`, etc.)\n\n## Adding More Regions\n\nTo add more regions for forecasting:\n\n1. Edit the `self.regions` list in the `ForecastService` class\n2. Add the region data to your CSV file if using sample data\n\n## Integrating with Kepler and Green Dashboard\n\nThis is a diagram of the integration of the forecasting service with Kepler and the Green Dashboard.\n\n```mermaid\ngraph TD;\n    A[Forecast Model] --\u003e|Generates JSON| B[FastAPI Server];\n    B --\u003e|Exposes /forecast Endpoint| C[Grafana JSON API Plugin];\n    C --\u003e|Queries JSON Data| D[Green Dashboard];\n    E[Kepler Prometheus Metrics] --\u003e|Real Power Consumption| D;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootfs%2Fgrafana_dashboard_forecasting_integration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frootfs%2Fgrafana_dashboard_forecasting_integration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootfs%2Fgrafana_dashboard_forecasting_integration/lists"}