Watch
1
0
Fork
You've already forked eTalonu_validacija
0
Display statistics of Riga city public transportation ticket validations https://validacijas.streamlit.app
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-13 16:39:40 +03:00
.forgejo/workflows Update .forgejo/workflows/scan_vulnerabilities.yml 2026-02-15 12:41:11 +01:00
.helix Adding configuration for sql formatter 2025-10-10 19:26:13 +03:00
tests Adding tests for widgets 2026-01-29 22:13:05 +02:00
widgets Adding tests for widgets 2026-01-29 22:13:05 +02:00
.gitignore Adding .aider to gitignore 2025-09-29 23:17:02 +03:00
.python-version Updating python version 2026-03-12 23:33:07 +02:00
callbacks.py Changing st.error to st.toast 2025-10-16 22:05:07 +03:00
data_manager.py Editing get_available_months function 2025-12-15 19:18:32 +02:00
database.py Changing the singleton implementation 2025-11-30 23:05:03 +02:00
LICENSE Testing selecting first tr_trypes then routes 2025-09-26 18:36:14 +03:00
pyproject.toml Update packages and pin duckdb version 2026-08-05 22:44:10 +03:00
README.md Updating readme 2025-10-16 22:02:19 +03:00
state_manager.py Editing rides per day metric 2025-10-21 22:55:48 +03:00
streamlit_app.py Adding page config and intro text 2025-10-16 22:05:58 +03:00
utils.py Adding unittests 2025-12-11 20:36:04 +02:00
uv.lock Update packages 2026-08-13 16:39:40 +03:00

🚋 eTalonu Validācija

This repository powers the Streamlit Community Cloud app that visualizes Riga city publictransport ticket (eTalons) validation data.

What the app shows

The dashboard provides interactive visualisations of public transport usage in Riga:

Key metrics

  • Monthly ridership - Total rides per month
  • Daily averages - Average rides per day
  • Peak activity hour - Most active hour of the day

Charts

  • Rides per day of week - Average rides per day for each day of week
  • Transport type distribution - How rides are distributed across buses, trams and troleybuses
  • Popular routes - Top 15 routes ranked by count of rides
  • Route intensity - Average rides per vehicle for the top 15 routes

Filters

  • Select any month from the available range
  • Filter by transport type (Bus, Tram, Trolleybus)

Data source

The validation records are pulled from Latvias Open Data portal:

How it works

  1. Data ingestion - monthly .zip files are downloaded from data.gov.lv and extracted
  2. Database - extracted .csv (or .txt) data is uploaded and stored in MotherDuck (DuckDB hosted on cloud)
  3. Queries - streamlit app connects to MotherDuck, SQL queries are executed and returned as Polars DataFrames
  4. Visualization - DataFrames are used to display metrics and charts with Streamlit
  5. Deployment - Hosted on Streamlit Community Cloud