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

feat: GTFS Schedule Analytics UI #653

Merged
merged 10 commits into from
Aug 29, 2024
Merged

feat: GTFS Schedule Analytics UI #653

merged 10 commits into from
Aug 29, 2024

Conversation

cka-y
Copy link
Contributor

@cka-y cka-y commented Aug 2, 2024

Summary:

Closes #651 by implementing a user-friendly UI for the GTFS schedule feeds analytics project. The changes include:

  • Development of a front-end interface that allows users to filter, visualize, and analyze GTFS schedule feeds data.
  • Implementation of features that enable users to answer key questions.
  • Addition of functionality to track trends in the adoption of GTFS features over time.
  • Enhanced accessibility for various user roles, allowing ad-hoc data retrieval and analysis through the UI.

This UI is designed to provide insights into the data’s quality, distribution, and changes over time, making GTFS schedule feeds data more accessible and actionable.

Expected behavior:

Upon deployment and testing of this PR, the UI should:

  1. Allow users to filter and visualize GTFS schedule feeds data based on specific metrics like feed features, validation notices, and metadata.
  2. Enable users to answer key analytics questions, such as:
    • How many feeds have Headsigns implemented?
    • How many feeds support time-based Fares, and which ones?
    • What are the trends in the adoption of GTFS features over time?
  3. Support ad-hoc data retrieval and provide a seamless experience for users of varying roles to access and analyze the data.

Testing tips:

  • Login with your mobilitydata.org email as the Metrics view is currently disabled to the public
  • You can verify the expected behavior by interacting with the new UI, ensuring that the filtering and visualization functionalities work as intended and that the key questions can be effectively answered using the provided data.

image

Testers are invited to follow the tips AND to try anything they deem relevant outside the bounds of the testing tips.

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with ./scripts/api-tests.sh to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

Copy link

github-actions bot commented Aug 2, 2024

Preview Firebase Hosting URL: https://mobility-feeds-dev--pr-653-dtxmp9ro.web.app

@cka-y cka-y linked an issue Aug 2, 2024 that may be closed by this pull request
@isabelle-dr
Copy link

First things first: WOW! This is truly incredible @cka-y 🥳🥳🥳

Small feedback on my end after looking at the analytics UI:

  • it's not super straight-forward to find the number of feeds that have a particular feature or notice: I should be able to see it in the main UI right after filtering. It could be by adding a "total number of feeds" at the bottom next to the "average number of".
  • I don't think we need dataset_ID given we have feed_ID

@cka-y
Copy link
Contributor Author

cka-y commented Aug 2, 2024

@isabelle-dr thank you for the feedback! Let's address each of your points:

  1. You can easily see the number of feeds through the feed page at the bottom of the table, as shown below:
    Screenshot 2024-08-02 at 11 36 10 AM

    Alternatively, you can use the notice page to see the information, as displayed here:

    Screenshot 2024-08-02 at 11 28 41 AM

  2. Since we have analytics for different months, the dataset ID is more descriptive than the feed ID for identifying which dataset was used to generate the validation report. As datasets change and we check for updates twice a week, it is helpful to know exactly from which dataset the report originates. While it's currently a disabled column, I can remove it completely if you think it might be confusing or if you don't see value in it.

Copy link
Member

@davidgamez davidgamez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a general comment, as we are adding a new screen in this PR, I suggest adding the labels/text to the internationalization files.

web-app/src/app/components/Header.tsx Outdated Show resolved Hide resolved
@isabelle-dr
Copy link

You can easily see the number of feeds through the feed page at the bottom of the table, as shown below

Thank you for clarifying! I ended up figuring that this was how to find the number, but still, it wasn't super clear at first glance if this was the number of pages or feeds, and I ended-up looking for a csv export so I could count and be 100% sure 🙈

Copy link

Preview Firebase Hosting URL: https://mobility-feeds-dev--pr-653-rh3m6ztt.web.app

),
});

// TODO improve this code
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be addressed as part of a separate issue

return <div>Loading...</div>;
}

// TODO improve this code
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This as well

@cka-y cka-y changed the title Analytics/UI feat: GTFS Schedule Analytics UI Aug 27, 2024
@cka-y cka-y marked this pull request as ready for review August 27, 2024 16:10
@davidgamez
Copy link
Member

I'm ok with this PR; I'll let @Alessandro100 give the final approval

@cka-y cka-y requested a review from Alessandro100 August 29, 2024 12:51
import { getLocationName } from '../../services/feeds/utils';
import { getAnalyticsBucketEndpoint } from '../../screens/Analytics/GTFSFeedAnalytics';

function* fetchFeedMetricsSaga(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[small optimization] Since both calls are independent of each other

const [response1, response2] = yield all([
...
])

would speed up the endpoint. As both of these calls are quite quick, it's not a show stopper or can be done in another ticket

Copy link
Contributor

@Alessandro100 Alessandro100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very very impressive, it works well and is very insightful. I left small comments but nothing show stopping. I learned about material-react-table and it's incredibly powerful. Overall this is really cool to have ✅

@emmambd
Copy link
Contributor

emmambd commented Aug 29, 2024

Thanks for making all my dreams come true @cka-y 🙏 And @davidgamez and @Alessandro100 for these thorough reviews! (I've been stalking the back and forth)

@cka-y cka-y merged commit d4c9b1a into main Aug 29, 2024
4 checks passed
@cka-y cka-y deleted the analytics/ui branch August 29, 2024 20:20
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

Successfully merging this pull request may close these issues.

Analytics UI - GTFS Schedule
5 participants