No description
- Python 39.6%
- CSS 31.9%
- HTML 19.8%
- JavaScript 8.7%
| .github/workflows | ||
| API | ||
| Depatures | ||
| JSON | ||
| main | ||
| Social | ||
| static | ||
| staticfiles | ||
| Stops | ||
| Templates | ||
| tools | ||
| TransportStatistics | ||
| Trips | ||
| .DS_Store | ||
| .env.example | ||
| .gitattributes | ||
| .gitignore | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| extra-requirements.txt | ||
| fix_rail_coords.py | ||
| GETTING_STARTED.md | ||
| LICENSE | ||
| manage.py | ||
| MANAGEMENT_COMMANDS.md | ||
| map.json | ||
| railpack.json | ||
| README.md | ||
| requirements.txt | ||
| SECURITY.md | ||
| stations copy.json | ||
| stations.json | ||
| stations.py | ||
TransportStatistics
TransportStatistics is a Django project for logging journeys and serving rail/bus stop and departure data through HTML pages and REST endpoints.
Features
- Trip logging with social/privacy controls.
- Stops API with text, type, active-state, and bounding-box filters.
- Train and bus departure APIs.
- Bulk import commands for timetable and stop datasets.
Tech Stack
- Python 3.10+
- Django 5.x
- Django REST Framework
- MySQL/PostgreSQL/SQLite (via
DATABASE_URL)
Quick Start
- Create a virtual environment and install dependencies:
python -m venv venv source venv/bin/activate pip install -r requirements.txt - Copy environment template and adjust values:
cp .env.example .env - Run migrations and start development server:
python manage.py migrate python manage.py runserver
See GETTING_STARTED.md for import workflows and dataset setup.
Full command reference: MANAGEMENT_COMMANDS.md.
Standalone schedule updater package: tools/schedule_updater.
Logging (toggleable)
Logging is controlled through environment variables:
LOGGING_ENABLED=True|False(defaultTrue)LOG_LEVEL=DEBUG|INFO|WARNING|ERROR|CRITICAL(defaultINFO)
Example:
LOGGING_ENABLED=True LOG_LEVEL=DEBUG python manage.py runserver
Open Source Metadata
- License: LICENSE
- Contributing guide: CONTRIBUTING.md
- Code of conduct: CODE_OF_CONDUCT.md
- Security policy: SECURITY.md