Comments (7)
Attached is a list of bus stops.
There are stops served by routes that also call at train stations.
So if route 11 calls at Tel-Aviv Center, all the stops for line 11 are included in this file.
If we can't poll data for the all the 27K bus stops in Israel, we still might be able to poll data for this list (~16K).
stops_connected_to_stations.txt
from open-bus.
Implementation:
- The relevant scheme can be found here: core/schema.sql
- fetch_and_store_arrivals.py is indeed the currently preferred way for fetching SIRI data. It was tested 2 months ago, but I'm not sure what's its current status.
- I think we should create a script which gets a DB name, querying frequency, and experiment duration in hours (e.g. 168 hours - a week) and fetch_and_store_arrivals.py params; and will create the requested DB and the querying cron.
Scaling:
Querying about ~16K stationsat once is quite a lot, @pumbaoz says it may be considered as a DDoS attack on SIRI servers. Can we narrow the list to ~300? (Maybe refer to a partial set of train stations, and switch the set after we have enough data).
For similar reasons, it may be better to lower the querying frequency. @kobigro and @pumbaoz agreed 5 minutes will be a legitimate frequency. We may increase the frequency once we make sure all goes well.
In addition, we should make sure our server has enough resources for this mission.
from open-bus.
OK, so here's another idea. Let's poll all (or many) stops along one or two important lines.
This will allow us to see how well we can infer the bus location based on the SIRI data.
I suggest taking 189 Tel-Aviv - Holon, and maybe another line in Jerusalem \ Haifa. I can ask Gil from 15minutes for suggestions.
Does that seem to make sense?
@nitzangur , are you planning to work on this or should we find another volunteer for that?
from open-bus.
I added the siri cron script, it's in siri/pull_data.cron
. It's currently set to run every 5 minutes.
To deploy it , we need to decide on a list of stops to poll(stops.txt) and create the schema on the server.
from open-bus.
I suggest we start with the stops for lines 189 and TLV and 71 in Jerusalem.
I am attaching files with the lists of stops for each of these lines. The lists were created using https://github.com/hasadna/open-bus/blob/master/gtfs/parser/line_stops_finder.py, on the GTFS data from 24/8.
I think the field we need for SIRI is the stop code, and not the stop id, which I think is GTFS specific. But unless anyone knows for sure please test it to see which one is correct.
from open-bus.
I tried running fetch_and_store on our new server. I made a few small changes, like removing the username and password from the code (for increased security) and turning off the Open Train proxy by default.
The current status is:
- There's some permission problems when writing to the DB:
psycopg2.ProgrammingError: permission denied for sequence responses_id_seq
I am hoping someone with more PostGRES experience can help me fix this on Monday. - The cronjob will have to include command line parameters for the user, password and stops file name. Anyway this will have to be done during deployment because user and password shouldn't be in the repository.
- Unfortunately we again don't have permissions to access SIRI directly from our server (as its IP address changed). I am checking with @uda and @maryLoi what we can do about it.
- Polling 219 stops (as I asked for in my previous post) seems to be all right with SIRI, but the reply is very large (~0.5M) and proxying through Open Train breaks (raises http.client.IncompleteRead). This isn't a huge problem since we meant to use the proxy for testing only.
from open-bus.
Good news everyone!
Our SIRI access has finally been resolved last week.
I have installed fetch_and_store_arrivals on our server. It is configured to run every minute from 5am to 1am, Sunday-Friday.
It polls data for lines 19 in Jerusalem, line 480 (Jer-TLV) and line 947 (Jer-Haifa).
I expect that within a week we will have enough data to start analysing it and seeing if it's helpful at all.
from open-bus.
Related Issues (20)
- Can't access siri br file HOT 2
- Duplicates rows in the db HOT 1
- API call gets an error: "QueuePool limit of size 5 overflow 10 reached" HOT 4
- Missing rows in siri_vehicle_locations HOT 18
- datacity stride project HOT 2
- siri data should reflect changes in OriginAimedDepartureTime / siri_ride__scheduled_start_time HOT 4
- permission to push to open-bus-stride-client HOT 2
- Adding data for route geometry is extremely important HOT 11
- stride api siri vehicle locations should allow to filter by lont/lat bounding box HOT 1
- get number of results for each api call HOT 1
- error in stride api gtfs_stop/get HOT 2
- השלמות stride
- stride additional tasks HOT 1
- all processing should be idempotent and make sure data is available for last X days HOT 2
- MOT problems with SIRI and GTFS data HOT 1
- StrideRequestFailedException: Failure response from Stride API (500): QueuePool limit of size 5 overflow 10 reached, connection timed out, timeout 30.00 HOT 1
- add date/timestamp in /gtfs_rides/list HOT 3
- stride-api feature request: add parameter to siri_ride to enable querying gtfs_ride_id HOT 1
- should have an efficient method to get all vehicle locations in geo area in a day
- filtering unrealistic duration_minutes values from siri_rides
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from open-bus.