Automated district-level weather warnings for Kerala, India — scraped from the India Meteorological Department (IMD) and displayed on an interactive choropleth map.
kerala-weather-warning.vercel.app
- Automated scraping — A GitHub Action runs every 12 hours to fetch the latest warning data via Playwright.
- Interactive map — Leaflet.js and OpenStreetMap provide a zoomable, pannable view of Kerala.
- Data visualization — Districts are color-coded (Red, Orange, Yellow, Green, or Grey) by current IMD alert level.
- CI/CD pipeline — The scraper commits updated data to the repository; Vercel deploys the site automatically.
| Step | Component | Action | Result |
|---|---|---|---|
| 1 | GitHub Actions | Runs on a 12-hour schedule or manual trigger | A fresh VM starts the job |
| 2 | Playwright scraper | Executes npm run scrape against the IMD site |
Generates public/data.json |
| 3 | GitHub Actions | Commits the updated data file | Pushes an "Automated data update" commit |
| 4 | Vercel | Receives a webhook from the new push | Triggers a new deployment |
| 5 | Vercel | Pulls the latest code and data | Publishes the public folder to the live URL |
| 6 | Browser | Loads the deployed site | Fetches data.json and renders the colored map |
| Layer | Tools |
|---|---|
| Scraper / automation | Node.js, Playwright, GitHub Actions |
| Frontend | HTML, CSS, JavaScript, Leaflet.js, GeoJSON |
| Hosting | Vercel |
-
Clone the repository
git clone https://github.com/RICH132/Kerala-Weather-Warning.git cd Kerala-Weather-Warning -
Install dependencies
npm install
-
Install Playwright browsers
npx playwright install --with-deps
-
Generate initial data
npm run scrape
-
Start the local server
npm start
Open http://localhost:3000 in your browser.
This is an unofficial project for educational purposes. Data is sourced from the IMD. For official use, always refer to the IMD website.
MIT License.
