Skip to content

martinhill/windburglr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

239 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Windburglr

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 the scraper/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 the webapp/README.md.

Database

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.

Initialization

To initialize the database, you can use the SQL files provided in the common/ directory. These files should be run in the following order:

  1. timescaledb_schema.sql: This file creates the database schema, including the station and wind_obs tables. It also creates a hypertable for the wind_obs table if the TimescaleDB extension is available.
  2. initial_data.sql: (Optional) This file inserts the initial data into the station table. 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

About

web app that collects and displays wind data

Topics

Resources

License

Stars

Watchers

Forks

Contributors