This repository automatically collects visitor count data and weather conditions every 15 minutes using GitHub Actions. It also tracks Norwegian holidays and vacation periods to enable richer data analysis.
Data Collection
The system collects and stores:
Visitor counts: Number of visitors at Trimmeriet
Weather data: Temperature and weather conditions from the Norwegian Meteorological Institute
Holiday status: All official Norwegian public holidays
Vacation periods: Common Norwegian vacation and academic periods
Time information: Timestamps with day/night distinction
Data Collector - Trimmeriet
This repository automatically collects visitor count data and weather conditions every 15 minutes using GitHub Actions. It also tracks Norwegian holidays and vacation periods to enable richer data analysis.
Data Collection
The system collects and stores:
Data Structure
The CSV file (
data/visitor_counts.csv) contains:Special Periods Tracked
Official Holidays
Academic & Vacation Periods
Running Locally
You can run the data collector in two ways:
Option 1: Main Script (With Weather Data)
Option 2: Continuous Local Scheduler
The scheduler will collect visitor counts once per minute and save to a local CSV file. Press Ctrl+C to stop.
Using This Data
In a Next.js App
Files
main.py- Main script that runs the collectorscraper.py- Contains the visitor count fetching logicweather.py- Fetches weather data from Yr APIweather_simplifier.py- Categorizes weather conditionsdatabase.py- Handles saving data to the CSV fileenhanced_vacation_periods.py- Tracks Norwegian holidays and vacation periodsscheduler.py- Local continuous scheduler (runs every minute).github/workflows/visitor-tracker.yml- GitHub Actions workflow that runs every 15 minutes