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

Need to update routes_2014.csv #4

Open
vik-y opened this issue Jul 14, 2015 · 7 comments
Open

Need to update routes_2014.csv #4

vik-y opened this issue Jul 14, 2015 · 7 comments

Comments

@vik-y
Copy link
Contributor

vik-y commented Jul 14, 2015

Are you aware of the fact that bmtc provides "UP" and "DOWN" routes. And in most cases up and down routes are different. In the file https://github.com/openbangalore/bmtc/blob/master/data/routes_2014.csv the url is provided only for one direction, not two directions. Also routes for many buses have changed significantly in the past 1 year. It should be updated, should I do it?

@vik-y
Copy link
Contributor Author

vik-y commented Jul 14, 2015

Oops.. my bad. It already contains "up" and "down" routes. But anyways data of many buses is missing out in that file.

@thejeshgn
Copy link
Contributor

Sure.

I think its a good idea to generate similar set of files for 2015. we could have for example routes_2015,csv etc It makes it easy for non tech person to compare routes from last year to this year.

So you will basically run scraper and generate new database

bmtc_2015.sqlite

and then from that we can generate

bus_route_2015.csv
busstop_2015.csv
routes_2015.csv
timings_2015.csv

Let me know how it goes. Also scraper might need updates!

@vik-y
Copy link
Contributor Author

vik-y commented Jul 16, 2015

Ok. I will try it. Will keep you updated. 👍

@thejeshgn
Copy link
Contributor

cool

@vik-y
Copy link
Contributor Author

vik-y commented Sep 18, 2015

Hey. I just started working on this. The old scraper is working fine. In the database schema for "routes" table, why is route_no not a unique primary key? Should I make it a primary key in the new db? I can see many duplicate values in the bmtc.sqlite table also, I think they are because route_no is not a primary key. Or Am I going wrong somewhere?

CREATE TABLE "routes" ("route_no" , "distance" , "origin" , "destination" , "map_link" , "busstops_link" , "time" , "map_json_content", "departure_from_origin", "arrival_at_destination", "departure_from_destination", "arrival_at_origin");

@thejeshgn
Copy link
Contributor

Should be unique. I didnt enforce it at the DB level. I thought it was
anyway logical.

Did you find any routes with different origin and destination?

Thej

Thejesh GN ತೇಜೇಶ್ ಜಿ.ಎನ್
http://thejeshgn.com
GPG ID : 0xBFFC8DD3C06DD6B0

On 18 September 2015 at 10:00, Vikas Yadav [email protected] wrote:

Hey. I just started working on this. The old scraper is working fine. In
the database schema for "routes" table, why is route_no not a unique
primary key? Should I make it a primary key in the new db? I can see many
duplicate values in the bmtc.sqlite table also, I think they are because
route_no is not a primary key. Or Am I going wrong somewhere?

CREATE TABLE "routes" ("route_no" , "distance" , "origin" , "destination" , "map_link" , "busstops_link" , "time" , "map_json_content", "departure_from_origin", "arrival_at_destination", "departure_from_destination", "arrival_at_origin");


Reply to this email directly or view it on GitHub
#4 (comment).

@vik-y
Copy link
Contributor Author

vik-y commented Sep 18, 2015

No I didn't find different origin destination for same route. But I found duplicate entries. Maybe it happened because I ran the scraper for same page twice.
Anyways I m making it unique in the new design.
On Sep 18, 2015 12:36 PM, Thejesh GN [email protected] wrote:Should be unique. I didnt enforce it at the DB level. I thought it was
anyway logical.

Did you find any routes with different origin and destination?

Thej

Thejesh GN ತೇಜೇಶ್ ಜಿ.ಎನ್
http://thejeshgn.com
GPG ID : 0xBFFC8DD3C06DD6B0

On 18 September 2015 at 10:00, Vikas Yadav [email protected] wrote:

Hey. I just started working on this. The old scraper is working fine. In
the database schema for "routes" table, why is route_no not a unique
primary key? Should I make it a primary key in the new db? I can see many
duplicate values in the bmtc.sqlite table also, I think they are because
route_no is not a primary key. Or Am I going wrong somewhere?

CREATE TABLE "routes" ("route_no" , "distance" , "origin" , "destination" , "map_link" , "busstops_link" , "time" , "map_json_content", "departure_from_origin", "arrival_at_destination", "departure_from_destination", "arrival_at_origin");


Reply to this email directly or view it on GitHub
#4 (comment).

—Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants