Windburglr is a mobile-friendly web application that collects and displays real-time and historical wind data from online weather stations.
This project is a monorepo containing two sub-projects:
scraper: A Python application responsible for scraping wind data from various sources and storing it in a database. For more details, see thescraper/README.md.webapp: A FastAPI web application that provides a web interface for viewing the collected wind data. It features real-time updates via WebSockets and interactive charts. For more details, see thewebapp/README.md.
This project uses PostgreSQL with the TimescaleDB extension for storing and querying time-series wind data. TimescaleDB is used to efficiently handle the large volume of time-series data generated by the scraper.
To initialize the database, you can use the SQL files provided in the common/ directory. These files should be run in the following order:
timescaledb_schema.sql: This file creates the database schema, including thestationandwind_obstables. It also creates a hypertable for thewind_obstable if the TimescaleDB extension is available.initial_data.sql: (Optional) This file inserts the initial data into thestationtable. The scraper will automatically initialize this table from its configuration.
You can use a tool like psql to run these files. For example:
psql -U <username> -d <database_name> -f common/timescaledb_schema.sql
psql -U <username> -d <database_name> -f common/initial_data.sql