Giter VIP home page Giter VIP logo

open-bus-map-search's Introduction

Open bus ranking app

Welcome!

This is the official repository of the open bus (תחב"צ פתוחה / דאטאבוס) project - also known as "ShameBus". link to the project

Please feel free to submit pull requests and contribute to the project. For more details about contributing, see the CONTRIBUTING.md file.

Running the project locally

An explanation how to run the project locally you can read here.

View video (Hebrew language):

The video will explain you how to contribute to the project:

video (hebrew) about the project

Easter eggs

We've hidden a couple of fun surprises in our web app, just for you. Discovering them is as easy as typing a few magic words on your keyboard.

How to Find the Easter Eggs

  1. Open our web app

  2. Unleash the Magic Words: To reveal the hidden gems, use your keyboard to type the following commands:

    • Type "storybook": Watch the magic unfold as you type "storybook" on your keyboard. You might just stumble upon our Storybook, a treasure trove of UI components showcasing the beauty and functionality of our app.
    • Type "geek": To get some experimental charts with some additional data and aggregation

deployments

This app is created by the volunteers of Public Knowledge Workshop

submitting pull requests

Thanks for your willingness to invest time and help us improve!

  1. If you're new to GitHub, here is a tutorial describing Pull Requests. if you're familiarized with Merge Requests - it's the same concept.
  2. Please make sure that the project works on your computer
  3. Please tag one of the maintainers as reviewers we're here to help! feel free to join our Slack channel

Links for developers

Related Repositories

  • the API client
  • the data API

API client

The client is a JS library that provides methods and data models. for example:
https://github.com/hasadna/open-bus-map-search/blob/main/src/model/busStop.ts#L4
link to repo.

Contributors

Shay
Shay

💻 📖 🧑‍🏫 🤔 🔬
Noam Gaash
Noam Gaash

📆 ⚠️ 💻 📖 👀
Kiril Volskiy
Kiril Volskiy

💻
R894
R894

💻 ⚠️
Tamir Abutbul
Tamir Abutbul

💻 👀
aviv1620
aviv1620

👀 💻
davis0011
davis0011

💻
Arkadi Koifman
Arkadi Koifman

👀
Ori Hoch
Ori Hoch

💻 🔣 📖 🚇 🚧 🧑‍🏫
israel zusha rotenberg
israel zusha rotenberg

💻
Yuval
Yuval

💻
Haswell-s
Haswell-s

💻

data API

The API is backend code that provides us with data and aggregations from the DB You can see it's endpoints here:
https://open-bus-stride-api.hasadna.org.il/docs
link to repo.

open-bus-map-search's People

Contributors

adlershay avatar allcontributors[bot] avatar amabelles avatar arkadik94 avatar aviv1620 avatar binahovav avatar dependabot[bot] avatar donno2048 avatar eyalyehia avatar giladfuchs avatar haswell-s avatar idandover avatar iliakap avatar knightcube avatar mordechai1323 avatar moshefortgang avatar noamgaash avatar orihoch avatar r894 avatar reallyliri avatar roni750 avatar rzarviv avatar senior-ai avatar sergeyarenzon avatar shayadler avatar shootermv avatar tamir198 avatar xormalka avatar yardenmezi avatar zushar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

open-bus-map-search's Issues

SearchContext creating a Provider for this context

There is a SearchContext as an model and in every page we use
const { search, setSearch } = useContext(SearchContext)
and
setSearch((current) => ({ ...current, operatorId: id })) // with some changes in different places

In my opinion, we should create a Provider for this context and make the code cleaner.
This Provider would manage the state of search.
What do you think?
@NoamGaash @ShayAdler

Test the realtime map page

  1. when the page gets loaded, the difference between the start date and the end date should be one minute
  2. when "from" date changes, the "to" date should change accordingly
  3. when the number field changes, the "to" date should change as well

Add reset button to user input

In some pages like GapsPage and TimelinePage, I think it will be a better user experience to add a reset button. When the user would like to change the selected bus number he/she will click this button and the inputs will be removed/change to the default input. What do you think about this? @ShayAdler @NoamGaash

Support filters on the "worst lines" widget

Suggested filters:

  • By operator
  • By line number
  • By city (src \ dst) - a bit trickier, because we don't directly have the city name from the route_long _name (the name can be מסוף קסטינה <> דרך ירושלים, תל אביב). This can be achieved by identifying the location of the first and the last stop using GIS.

DatePicker component | show invalid dates warning

For now, when the user selects an invalid Date, the box is marked in red.
I think it is better to add some warning in words so the user will understand why it is red...
image
In addition, we should make sure that if the user enters a year before X (I think make it 2000 but maybe before or after) it will be marked as well
image

[Bug] Fix Layouts

Think open new issues.
PR #54 destroy the layout.

And the place need to be here:
Screenshot 2023-10-07 010101

Originally posted by @aviv1620 in #80 (comment)

We should fix the layouts of DashboardPage and GapsPatternsPage

DashboardPage:
Before:
image
image

After:
image
image

GapsPatternsPage:
Before:
image

After:
image

add busses logos

bus logos.zip
replace the icons on the map to better icons
image

לכל נקודה על המפה יש attribute בשם operator_id. אגד למשל עם id=3 לכן התמונה היא 3.svg

add unit tests

  • add unit tests (jest)
  • add e2e tests (playwright)

things to test:

  • hooks
  • components
  • mock network and verify different charts that we have

Move `colorIcon` To a Separate File

The colorIcon function is defined in two files (RealTimeMapPage and BusLayer) and have the same functionality and style.
Do you want to keep it as is or to move it to a separate file?

Support investigation of misses patterns by hour and line

Use case: Identifying of lack of execution by hour patterns

Example:
If we group by the execution metrics of line 64 of Electra Afikim from 1.7-30.7 by hour, we can easily identify patterns (take a look at 9:30):
64_misses_july_by_Hour (1)

Suggestion:

  • In the "gaps" page, allow selecting a range of dates.
  • When more than 1 day is selected, the results will be grouped -by hour, so instead of "V", "X", we'll see the following columns:
    • total planned
    • total executed
    • miss percentage - colored red-yellow-green.

Bug - Open Menu In the Mobile Display

When we in mobile display of media screen less than 600px approximately and try to open the menu, it appears near the content screen and the sum of the menu width and content width is more than the actual screen so the screen slides. Better to make the menu appear above the content screen in those screen sizes.

improve descriptions on top of each page

Our users doesn't understand the data shown on different pages.
We will need some text contributions describing what's going on.

The text will need approval - we have volunteers with legal understanding, but it could take more time than other contribution. Yet, this contribution is vital.

ways to contribute -

  1. write the text here - https://docs.google.com/document/d/1jCXtb4T1uNpI8D23p-nAogorb8YVg_dsx0DKZJXj160/edit?usp=sharing
  2. translate/rephrase a text
  3. add text to the code by making a pull request. the text can be inside a <section> tag or inside a <Tooltip> component
  • dashboard page
  • timeline page
  • gaps page
  • gaps_patterns page
  • map page
  • single-line-map page
  • about page

thank you all!

add loading animation to patterns page

on the patterns page, when you choose a new bus route it takes about 4 seconds to fetch and show the data.
right now there is no indicator that the data is being fetched, i'd suggest adding some sort of spinner or loading indicator.

i can take this issue if needed :)

Better indication on partial data in the UI

Currently, mainly in the aggregation widgets, there's no way to know if the percentage you see is based on a complete data. Bugs I saw so far can due to -

  • global siri reporting problem
  • specific lines siri reporting problem
  • some ETLs in our system that didn't run properly

Anyway, users should take this into account before exporting statistics.
A first step can be something like this, basically by counting the amount of siri data we have globally for this dat + the amount that was matched to gtfs:
image

More complex solutions can be:

  • based on operators (maybe showing a ⚠️ icon near the operator name with some details)
  • have an option in the UI to ignore dates \ hours with missing data from the aggregations
  • let users report on missing data and aggregate that with the heuristics we have

duplicated bus stations at `stations list`

image

reproduce steps

  1. go to לוח זמנים הסטורי page
  2. select אגד תעבורה
  3. select 364 line
  4. select היכל המשפט/אבא אבן-ירושלים ⟵ 'מיצד א-אספר
  5. try to select some station - you will see stations names are duplicate

delete buttons in Realtime Map Page

Right now buttons program 5 minutes from now. and in UTC.
But I think the purpose is to be 5 minutes from the time that is in the field.
And make "before 5 minutes" and "after 5 minutes"

Above-mentioned about 10 minutes buttons.

problem

feature suggestion: mark date with exceptional events

Is it a good idea to make a feature that marks dates with exceptional events?

For example, if we look in 'gaps' when there is war and the bus can be gapped because of 'Red color alarm'.
Another example we look in 'gaps' when there is a demonstration and the bus can be gapped because the roads are blocked.

Untitled

Infinite calling an API Ajax at map by line

Description

after you select in the form the fourth drop-down (choose drive route)
It begins an infinite loop in the useEffect make ajax with different time (recorded_at_time_from/to)

Screenshots

25

auto generation of MOT complaint

יהיה נחמד אם במסך של תחקור נסיעה ספציפית, יהיה אפשר אוטומטית לייצר טופס תלונה למשרד התחבורה (ואולי גם להגיש את טופס התלונה באופן אוטומטי).
בגדול, טפסי תלונה זה דבר שאפשר לייצא \ לייבא בפורמט XML, אז לייצר את הקובץ בשביל שמשתמשים יוכלו להוריד אותו ולהגיש אותו זאת התחלה מצויינת.
דברים שאנחנו יכולים לייצר אוטומטית:

  • שעת יציאה מתחנת המקור
  • מספר לוחית רישוי (ברוב המפעילות)
  • זמן הגעה מתוכנן לעומת זמן הגעה בפועל (אם היתה הגעה בפועל)
    ועוד

דוגמה לXML:

<?xml version="1.0" encoding="utf-8"?><root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" formId="[email protected]" formVersion="3.0.2" formCompileTime="13/08/2023" xmlns="http://AGForms/[email protected]"><form><UserUImode>AGFrom2Html</UserUImode><BTSFormID xsi:nil="true"></BTSFormID><BTSFormDesc xsi:nil="true"></BTSFormDesc><BTSProcessID xsi:nil="true"></BTSProcessID><ReferenceNumber>1094302</ReferenceNumber><StageStatus>UserToOffice</StageStatus><dataModelSaver>{  "contactType": {    "selectContactType": "1",    "isChosenType": true  },  "personalDetails": {    "firstName": "עגכע",    "lastName": "תצתץ",    "iDNum": "123456789",    "mobile": "050-1234567",    "phone": "",    "contactOptions": "1",    "fax": "",    "email": "[email protected]",    "city": {      "dataCode": 8600,      "dataText": "רמת גן"    },    "street": "רחוב",    "houseNumber": "1234",    "appartment": "",    "postBox": "",    "zipCode": "",    "name": "personalDetails",    "state": "completed",    "next": "",    "prev": "",    "isClosed": true  },  "requestSubject": {    "applySubject": {      "dataCode": "0",      "dataText": "אוטובוס"    },    "applyType": {      "dataCode": "2",      "dataText": "אי ביצוע נסיעה"    },    "name": "requestSubject",    "state": "completed",    "next": "",    "prev": "",    "isClosed": true  },  "requestDetails": {    "taxi": {      "taxiType": "2"    },    "busAndOther": {      "ravKav": true,      "ravKavNumber": "",      "reportdate": "",      "reportTime": "",      "addingFrequencyReason": [],      "operator": {        "dataCode": 3,        "dataText": "אגד"      },      "addOrRemoveStation": "2",      "driverName": "",      "licenseNum": "",      "eventDate": "11/12/2022",      "eventHour": "12:34",      "fromHour": "12:34",      "toHour": "12:40",      "fillByMakatOrAddress": "2",      "makatStation": "",      "lineNumberText": "1",      "lineNumberFromList": {        "dataText": ""      },      "direction": {        "dataCode": 3,        "dataText": "זכרון יעקב-זכרון יעקב"      },      "raisingStation": {        "dataCode": 47340,        "dataText": "גאולים/כנפי נשרים"      },      "applyContent": "תוכן הפנייה",      "busDirectionFrom": "מוצא",      "busDirectionTo": "יעד",      "raisingStationCity": {        "dataText": ""      },      "destinationStationCity": {        "dataText": ""      },      "raisingStationAddress": "",      "cityId": "",      "cityName": "",      "originCityCode": "",      "originCityName": "",      "destinationCityCode": "",      "destinationCityText": "",      "directionCode": "",      "stationName": "",      "lineCode": ""    },    "train": {      "trainType": "1",      "eventDate": "",      "eventHour": "",      "startStation": {        "dataText": ""      },      "destinationStation": {        "dataText": ""      },      "number": "",      "applyContent": ""    },    "requestSubjectCode": "",    "requestTypeCode": "",    "title": "",    "name": "requestDetails",    "state": "completed",    "next": "",    "prev": "",    "isClosed": true  },  "documentAttachment": {    "documentsList": [      {        "attacmentName": ""      }    ],    "name": "documentAttachment",    "state": "notValidated",    "next": "",    "prev": "",    "isClosed": false  },  "followStatus": {    "contactIdList": [      {        "ticketNumber": ""      }    ],    "contactIdResultList": [],    "name": "followStatus",    "state": "notValidated",    "next": "",    "prev": "",    "isClosed": true  },  "containersViewModel": {    "showPrintButton": true,    "isTabsMode": true,    "validatedStatus": true  },  "formInformation": {    "referenceNumber": "1094302",    "stageStatus": "UserToOffice",    "loadingDate": "03/09/2023",    "firstLoadingDate": "",    "isMobile": false,    "language": "hebrew"  }}</dataModelSaver><isMobile>false</isMobile><DeviceType xsi:nil="true"></DeviceType><FirstLoadingDate xsi:nil="true"></FirstLoadingDate><Date>03/09/2023</Date><SelectContactType>1</SelectContactType><FirstName>עגכע</FirstName><LastName>תצתץ</LastName><IDNum>123456789</IDNum><Mobile>050-1234567</Mobile><Phone xsi:nil="true"></Phone><ContactDetails>1</ContactDetails><Email>[email protected]</Email><fax xsi:nil="true"></fax><Settlement text="רמת גן">8600</Settlement><street>רחוב</street><HouseNumber>1234</HouseNumber><Appartment xsi:nil="true"></Appartment><POB xsi:nil="true"></POB><ZipCode xsi:nil="true"></ZipCode><ApplySubject text="אוטובוס">0</ApplySubject><TypeReq text="אי ביצוע נסיעה">2</TypeReq><TrainType>1</TrainType><EventDate2 xsi:nil="true"></EventDate2><EventHour2 xsi:nil="true"></EventHour2><StartStation text="" xsi:nil="true"></StartStation><DestStation text="" xsi:nil="true"></DestStation><TrainNumber xsi:nil="true"></TrainNumber><ApplyContent3 xsi:nil="true"></ApplyContent3><FirstDeclaration>false</FirstDeclaration><SecondDeclaration>false</SecondDeclaration><EventDetails xsi:nil="true"></EventDetails><Invoice xsi:nil="true"></Invoice><Evidence xsi:nil="true"></Evidence><OtherFactors xsi:nil="true"></OtherFactors><ETaxiType>2</ETaxiType><DrivingLicense2 xsi:nil="true"></DrivingLicense2><TaxiCap xsi:nil="true"></TaxiCap><TaxiDriverName xsi:nil="true"></TaxiDriverName><TaxiEventDate xsi:nil="true"></TaxiEventDate><TaxiEventHour xsi:nil="true"></TaxiEventHour><TaxiEventLocation xsi:nil="true"></TaxiEventLocation><ApplyContent xsi:nil="true"></ApplyContent><FinanceRavKav>true</FinanceRavKav><FinanceRavKavNumber xsi:nil="true"></FinanceRavKavNumber><FinanceOther>false</FinanceOther><SingleTrip>false</SingleTrip><LoadTopics>false</LoadTopics><LongWaiting>false</LongWaiting><ExtensionHours>false</ExtensionHours><Operator text="אגד">3</Operator><BusDriverName xsi:nil="true"></BusDriverName><BusLicenseNum xsi:nil="true"></BusLicenseNum><BusEventDate>11/12/2022</BusEventDate><BusEventHour>12:34</BusEventHour><from>12:34</from><by>12:40</by><Reportdate xsi:nil="true"></Reportdate><ReportTime xsi:nil="true"></ReportTime><Stationupdate>2</Stationupdate><NumStation>2</NumStation><LineNumberBoarding>1</LineNumberBoarding><Direction text="זכרון יעקב-זכרון יעקב">3</Direction><BusStationBoard text="גאולים/כנפי נשרים">47340</BusStationBoard><BoardingSettlement text="" xsi:nil="true"></BoardingSettlement><DropStaionAppeal text="" xsi:nil="true"></DropStaionAppeal><Risestationaddress xsi:nil="true"></Risestationaddress><MakatStation xsi:nil="true"></MakatStation><LineNumber text="" xsi:nil="true"></LineNumber><BusDirectionFrom>מוצא</BusDirectionFrom><BusDirectionTo>יעד</BusDirectionTo><Testimony>false</Testimony><Courttestimony>false</Courttestimony><CaseEssence>תוכן הפנייה</CaseEssence><OriginCityCode xsi:nil="true"></OriginCityCode><OriginCityName xsi:nil="true"></OriginCityName><LineCode xsi:nil="true"></LineCode><CityId xsi:nil="true"></CityId><CityName xsi:nil="true"></CityName><StationName xsi:nil="true"></StationName><DirectionCode xsi:nil="true"></DirectionCode><DestinationCityCode xsi:nil="true"></DestinationCityCode><DestinationCityText xsi:nil="true"></DestinationCityText><Title xsi:nil="true"></Title><RequestSubjectCode xsi:nil="true"></RequestSubjectCode><RequestTypeCode xsi:nil="true"></RequestTypeCode><Attacment_Doc><AttachDocument fileName="" /></Attacment_Doc><ContactID><ticketNumber xsi:nil="true"></ticketNumber></ContactID><contactIdResult><ticketNumber xsi:nil="true"></ticketNumber><dateReceived xsi:nil="true"></dateReceived><contactName xsi:nil="true"></contactName><incidentStatus xsi:nil="true"></incidentStatus></contactIdResult></form></root>

Better inputs design

  • fix direction (text direction should be RTL, alignment to right, buttons should be to the left)
  • fix placement - align all inputs to the same column

image

React routing | don't include redundant URL search arguments

when visiting pages in the application, such as the "About" page, our routing component redirects requests such as:
https://open-bus-map-search.hasadna.org.il/about
to ugly URLs such as:
https://open-bus-map-search.hasadna.org.il/about?operatorId=&lineNumber=&routeKey=&timestamp=1696154828313

DOD:

  1. distinguish pages that need those arguments from pages that don't need them
  2. remove redundant arguments from URL when necessary
  3. bonus - re-attach the arguments from local storage when navigating to pages that use the search params

Good luck!
🎈

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.