Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Future-proof schema, to support other transport companies and cities #3

Open
roata opened this issue Nov 7, 2019 · 1 comment
Open
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@roata
Copy link
Member

roata commented Nov 7, 2019

The current data structures are tied to RTEC. What we need is to make it future-proof and extendable, such that we can cover other transport networks in Chișinău (PUA - parcul urban de autobuze and the minibuses) and other cities.

The new schema must:

  1. Be backwards compatible
  2. Accommodate other cities
  3. Accommodate other transport networks within the same city
  4. Maybe, be modularized - such that one could get and cache just the data they want, instead of downloading lots of unnecessary data

At the moment I am still inclined to use CSV files, but alternatives will be considered. The current proposal is to:

  1. Add 2 more columns to each routes.csv and vehicles.csv file: city_id, network_id
  2. Add 2 more CSV files: cities.csv, where Chișinău=1 :-) and transport-networks.csv, where RTEC=1
  3. Potentially, we could have several scripts that generate city-specific files, so the folks in other parts of Moldova could rely on those reduced data-sets, which will make their downloads a bit faster.

@iamandrewluca @PlugaruT, what do you think?

I would like to work on this during the weekend, so it would be great if you could share your thoughts until then.

@roata roata added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 7, 2019
@iamandrewluca
Copy link
Member

iamandrewluca commented Nov 8, 2019

I agree with your proposal.

As a reference, map.md keeps their routes in this format

CREATE TABLE routes (
    id integer,
    type integer, # 0, 1, 2 (bus, minibus, trolleybus)
    city_id integer,
    number text,
)
id type city_id number
338 2 265099165 "10"
CREATE TABLE locations (
    id integer,
    name text,
    lat real,
    lon real,
    is_in text,
)
id name lat lon is_in
277625074 "Costești" 46.86725 28.7679943 "Ialoveni"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants