raenonx / madison-metro-sim Goto Github PK
View Code? Open in Web Editor NEWMadison Metro System simulator. (UW Madison 2020 Fall CS 638 Project)
Madison Metro System simulator. (UW Madison 2020 Fall CS 638 Project)
Some stops currently seem to have no assigned routes. Create a map reporting these "dangling" stops.
As stated in the report of 2020/09/21, some stops located on different streets should be grouped.
Group these stops to get a better idea of the stop density, could also potentially bring convenience to #8.
The reason of why we are doing this is because that we don't want to write codes that the others cannot understand or run. If such happens, we need to spend additional time on fixing these, which holds back our process. If we can ensure these things won't happen before it happens and it also won't take too much additional time, why aren't we doing that?
Check that you've installed pylint
, pydocstyle
and pytest
.
These should be installed if you do exactly what was stated in README.
If not, run this:
pip install -r requirements-dev.txt
pydocstyle msnmetrosim
pylint msnmetrosim
pytest
pydocstyle
checks if you have the consistent documentation format comply with PEP-257.
pylint
checks if you have any coding style issues.
pytest
runs all the tests. For creating test cases, refer to #10.
If you're interested in automating these things, here are the ways you can do:
git hook
As of a338fc7, it's not clear to see whether a bus route is overlapped or not. Find a way to clearly indicate that.
Not limited to these, but could be the starting point.
For this, we may need to modify how shape
data was being loaded, and apply a small offset to it.
For this, we may need to find some scripts or builtin class to create a similar effect like this.
An alternate way of this is to have the line acts like it's combined with multiple color blocks.
If hourly data is unavailable and unprojectable, reduce the priority on the features that require hourly data first, and try to create a simple interface later for manually entering the customized input.
Continue from #8.
Needs to find the budget data first.
Interactive map. May need to embed the generated HTML into another index page.
You are working at your local computer. The code is also stored remotely at the origin.
You pull the code from the server / origin; you push your code from the local to the origin.
The most recent commit at the current branch is HEAD.
It's recommended to either commit or stash before you execute any of these commands except git commit
, so you may save time on solving conflictions (if any) and/or reduce the risk of losing your work.
I personally recommends PyCharm as it provides some robust git controls. Despite of this, there are still many cases that you will find terminal/cmd/shell/bash useful than the IDE. So I will say, get an IDE for commit, solving conflictions; use terminal for other things.
git commit -m "YOUR_MESSAGE"
git push
git push
pushes all not-yet-pushed commits.git pull
git fetch
, which only check and download the progress of the origin, instead of overwriting your code, which git pull
does. You can check this link for a better/clearer/detailed explanation.git push -f
git rebase -i <REF>
<REF>
can be (not limited to):
HEAD~#
: count of commits counting from and including the head.
HEAD~2
means 2 commits from the head and including the head.<SHA>
: commit hash. Preferably a short commit with 7 or 8 characters would be sufficient.
3508c81
will start the rebase from the initial commit of this repo.After you executed this message, your default text editor will pop up, check the comments inside.
squash
(merge commits) or reword
(edit commit message) command, you will be prompt to enter the new commit message once the rebasing process reaches there.pick
command, and the second line will be squash
command.git commit --amend
squash
in interactive rebase git rebase -i
, except that you don't need that complicating process for merging commits under this situation.For example, say you have the following changes and the commit message:
ADD - New feature
=================
+ feature.py
+ feature_base.py
If I added a file called feature_adv.py and did some changes in feature.py, and it should be in the same commit of ADD - New feature:
M feature.py
+ feature_adv.py
Then once I execute this command, the change will then be
ADD - New feature
=================
+ feature.py
+ feature_base.py
+ feature_adv.py
git rebase <BRANCH_NAME>
master
at the 1st commit, but a commit was made to the master
branch, and you haven't done working on your branch, but you want to synchronize the change on master
into your dev branch.
git rebase master
if this happens.
git stash
.(This could happen quite frequently)
You pushed a commit, and found that despite you passed the tests locally, GitHub Actions tests did not pass, and it's clear that you are the one responsible for it. After you applied some fixes, you want to amend the pushed commit.
git commit --amend
git push -f
git commit --amend
)git push -f
)git push
), you'll find that you need to either commit your changes first then pull, then push, or to stash your changes first, then pull, then push. You'll find that eventually you are creating 2 commits instead.You find that after you committed A, B and C, A and B are actually the same thing, and it should be squashed into A. However, all of these commits were already being pushed to the origin.
git rebase -i HEAD~3
Then after your text editor pops up with the rebasing commands, change it from:
pick aaaaaaa A
pick aaaaaab B
pick aaaaaac C
to:
pick aaaaaaa A
squash aaaaaab B
pick aaaaaac C
Save the file, close the editor, then the text editor will pop up again, prompting you for the new commit message of aaaaaaa
with something similar to this:
# 1st commit message
A
# 2nd commit message
B
Change it to what you want. Assuming we are going to change the new commit message as "AAAAA":
AAAAA
Save it then close the editor.
The rebase will then continue.
After you completed the rebase, run this:
git push -f
git rebase -i
)git push -f
)git push
), you'll find that you need to either commit your changes first then pull, then push, or to stash your changes first, then pull, then push. You'll find that eventually you are creating 2 commits instead.Find a way to let to user select which routes to be displayed.
One solution is to add layers for each route, so the user can toggle it.
Check with Megan.
Also, try to find hourly pedestrian flow, traffic flow data.
Blocked by #22 (travel time), #23 (budget).
Develop an algorithm/small app to find the optimal stop deployment plan.
Try to merge the stops and observe the accessibility difference between before and after the merge.
For example, Aberg & Loftsgordan (EB)
and Aberg & Loftsgordan (WB)
should be merged into Aberg & Loftsgordan
.
Doing so, the stop removal feature to implement in #8 could be slightly easier.
Also, the rendered map will not have too many clustered stops which are essentially the same.
primary_street
and cross_location
at C14 ([13]
) and C16 ([15]
) to group.
Please follow the format at your best to save your future self some time.
<PREFIX> - [ISSUE_ID] <MESSAGE>
Things inside <> is required; [] is optional.
Prefix Abbr. | Prefix meaning | Description | Example |
---|---|---|---|
ADD |
Add | You've added something. | New feature implemented. |
FIX |
Fix | You've fixed something. | A bug was being fixed. |
IMP |
Improvement | You've improved something. | Optimized a piece of code. |
UPD |
Update | You've updated something. | Refactored a piece of code or updated the README.md file. |
DEL |
Delete | You've deleted something. | Deleted a piece of temporary code. |
OTH |
Other | You've done something that cannot be categorized as any of the above. | Initial commit. |
To clarify, the difference between IMP
and UPD
is that IMP
brings some positive effects to the code (presumably); UPD
only brings changes to the code (possibly positive, but not that explicit).
Would be better to be < 50 words. However, if there's something that cannot be briefly described, it's fine to go over 50 words. Just don't be too much. You'll want to read the commit history as a story containing a lot of short sentences.
If your commit relates to an issue, mention it.
Added a new map-generating function.
ADD - new map-generating function
Fixed a bug in stop data parsing, which originally reads the data at column 3 as column 4.
FIX - Misread in stop data parsing process
Implemented a feature listed in issues as #87, which is to incorporate ML to automatically create an optimal route map for Madison.
ADD - #87 create optimal route for Madison
A bug was found after you published #87 which actually creates the worst route map.
FIX - #87 created worst map instead of the best map
Continue of #22.
Manually process the data into stop sequence data for easier access.
route number | stop_id | stop_lat | stop_lon | direction | distance_from_last_stop | travel_time_from_last_stop | number_of_boarding |
---|---|---|---|---|---|---|---|
2 | 1234 | 56.78 | 90.12 | S | 0.12 | 12 | 50 |
2 | 5678 | 90.12 | 34.56 | N | 0.34 | 34 | 100 |
Columns to consider to be added:
We use pytest
for this project. Here is its documentation.
Every test related things will be prefixed with test_
for auto test discovery.
test_
.test_
.test_
.For the module to be a module (and to be discovered), you need to have an __init__.py
inside the module folder, regardless if it's an empty file (and it usually will be empty, except that you want to inject something).
* OBJECTID (Unique ID)
* route_id (Number)
* route_short_name (Number)
* route_url (Text)
* Shape (Geometry)
* Shape.STLength() (Number)
* DotSize (Number)
* IntersectionID (Number)
* Lat (Number)
* Lon (Number)
* OBJECTID (Unique ID)
* Saturday (Number)
* Saturday_1_79 (Number)
* Shape (Geometry)
* StopDescription (Text)
* StopID (Number)
* Sunday (Number)
* Sunday_1_79 (Number)
* Weekday (Number)
* Weekday_1_79 (Number)
* WkdBdPerSvc (Number)
* WkdSvc (Number)
* DotSize (Number)
* InterDescription (Text)
* IntersectionID (Number)
* Lat (Number)
* Lon (Number)
* OBJECTID (Unique ID)
* Saturday (Number)
* Saturday_1 - 79 (Number)
* Shape (Geometry)
* Sunday (Number)
* Sunday_1 - 79 (Number)
* Weekday (Number)
* Weekday_1 - 79 (Number)
* WkdBdPerSvc (Number)
* WkdCash (Number)
* WkdSvc (Number)
* address_range (Number)
* agency_id (Text)
* Bench (Number)
* cardinal_direction (Number)
* cross_location (Text)
* jurisdiction_id (Text)
* Light (Number)
* location_type (Number)
* OBJECTID (Unique ID)
* parent_station (Number)
* PK_MD_WE (Text)
* primary_street (Text)
* Reaitime (Text)
* relative_position (Number)
* Route (Text)
* Route_Dir (Text)
* Schedule (Number)
* Shape (Geometry)
* Shelter (Number)
* stop_code (Text)
* stop_desc (Text)
* stop_id (Number)
* stop_lat (Number)
* stop_lon (Number)
* stop_name (Text)
* wheelchair_boarding (Number)
* OBJECTID (Unique ID)
* route_id (Number)
* route_short_name (Number)
* route_url (Text)
* Shape (Geometry )
* Shape.STLength() (Number)
* DailyBoardings (Number)
* DotSize (Number)
* Lat (Number)
* Lon (Number)
* OBJECTID (Unique ID)
* Route (Number)
* Shape (Geometry)
* StopID (Number)
* DailyBoardings (Number)
* DotSize (Number)
* Lat (Number)
* Lon (Number)
* OBJECTID (Unique ID)
* Route (Number)
* Shape (Geometry)
* StopID (Number)
* DailyBoardings (Number)
* DotSize (Number)
* Lat (Number)
* Lon (Number)
* OBJECTID (Unique ID)
* Route (Number)
* Shape (Geometry)
* StopID (Number)
* Day (Text)
* Direction (Text)
* Month (Text)
* OBJECTID (Unique ID)
* Station (Text)
* Time_Period (Text)
* Volume (Number)
* Year (Number)
* AWT Count (Number)
* AWT_Yr (Number)
* Count Year (Text)
* mslink (Number)
* OBJECTID (Unique ID)
* Shape (Geometry)
* Shape.STLength() (Number)
* SOURCE (Text)
* STATION (Text)
* Street Name (Text)
Reference: https://stackoverflow.com/a/36967648/11571888.
continue from #22
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.