muni_analyzer's People
muni_analyzer's Issues
[Investigate] GMT vs PST
Issue seems to be that some parts are captured in GMT, while we are querying in UTC, leading to inconsistent results.
Move code dealing with scheduling from mysql to postgres
Still pulling schedule using mysql in analyzer. Need to change that Postgres because I am using a separate library which automatically updates Muni schedule into Postgres format.
Buses leaving 4 mins early & buses not originating from starting point
Two issues found:
- 4128445 | Thu Sep 8 20:13:00 2011 | Thu Sep 8 20:51:00 2011 | Missed or uncaptured run | Missed or uncaptured run | Missed or uncaptured run | | Debug
- Here we have a bus that started way early and was counted towards the previous trip, which is incorrect. Implementing realtime capture should solve this
Second issue:
- 4128439 | Thu Sep 8 20:28:00 2011 / 1315513680 | Thu Sep 8 21:06:00 2011 | Missed or uncaptured run | Missed or uncaptured run | Missed or uncaptured run | | Debug
Here it seems that the route was actually covered by bus_id 5463 but it did not originate at the starting point
Same trip_id is being used twice if buses run next to each other
- A solution is to keep truck of used trip_ids for a particular day and once it has been used -- remove it from available trips
Refactor code
Move the following code around:
- All code dealing with pulling and massaging schedule should go into its own class
- Same for code dealing with pulling all GPS data
Start doing real-time analysis of routes
Probably best to start with a rail line, like 'N' because of consistency of start and end points.
Lotsa work, but will make everything a ton easier. WIll look like:
- load a dictionary of all possible trips at runtime, then keep a queue into which we will add a trip that has started, and track it until it finished.
Make summary rows unique
At the moment, before re-running analyze_data.py we need to delete the database of previous analysis, otherwise we get duplicate rows.
Proposed fixes:
- check existence of trip_id and start_time in the db before adding a row
Fixes
- Change route to trip in schema and code
Real-time bugs
- Imprecise bounding boxes at the start and end points cause wrong schedules to be given out
- What to do about half-trips?
- Could have dynamic trip allocation by recalculating the trips once they get to a certain point
Buses turned around before finishing route.
Buses that are turned around before getting to end destination are not properly handled.
Should be marked as an incomplete route.
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.