Giter Club home page Giter Club logo

bustimes.org's Introduction

Python application

Coverage

What's this?

Source code for the website bustimes.org.

It's a magnificent monolithic Django app that's evolved over time (since 2015). The structure doesn't make complete sense:

app concern
buses contains the site settings.py
busstops bus stops - but also operating companies, places, and routes ๐Ÿคฏ and all the site CSS and JavaScript
bustimes getting timetable data out of various formats (GTFS, TransXChange, ATCO-CIF) and into a database and doing stuff therewith
vehicles tracking buses' locations and showing them on a map, and pointless details about vehicles' colours and features
departures listing the "next departures" at a bus stop โ€“ from a timetable and/or predicted by an API
disruptions information about like roadworks, diversions and stuff
vosa the Great Britain Traffic Commissioners' bus service registration data. VOSA is the name of a defunct UK government agency.

This documentation is incomplete and out of date. And that's OK (?) because I don't expect anyone to need to follow it. I will try to document some things for my own reference.

Installing

I'm using Python 3.8 and I don't know if any lower versions still work. Use Pipenv to install the Python dependencies (Django, etc):

pipenv --python 3.8
pipenv install --dev

There are also some JavaScript dependencies:

npm install

Importing data

Static data (stops, timetables, etc)

import.sh will download data from various sources and run the necessary Django management commands to import it. When run repeatedly, it will only download and import the stuff that's changed. It expects to be run from the data directory. It needs a username and password for the Traveline National Dataset step.

Live data

Some "live" data โ€“ departure times at stops, and vehicle locations โ€“ is/are fetched as and when a user accesses a page.

For the rest, there are some Django management commands that need to be run indefinitely in the background. These update the big map of bus locations, etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.