-
Notifications
You must be signed in to change notification settings - Fork 7
Baraah A. #11
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
Open
thebaraah
wants to merge
1
commit into
HackYourAssignment:main
Choose a base branch
from
thebaraah:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Baraah A. #11
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # Metric definitions | ||
|
|
||
| Five fields per metric: Name, Description, Calculation, Data source, Refresh frequency. One block per panel. Copy this file to `metric_definitions.md` inside your `week11-streamlit/` folder and fill it in. | ||
|
|
||
| ## Metabase panels | ||
|
|
||
| <!-- One block per Question: trip count by payment type, average fare per | ||
| mile by dropoff borough, average trip duration by hour of day. --> | ||
|
|
||
| ### Panel 1: Trip Count by Payment Type | ||
|
|
||
| - **Name**: trip_count_by_payment_type | ||
| - **Description**: Total number of taxi trips grouped by payment type. This metric shows which payment methods are most commonly used by passengers. | ||
| - **Calculation**: COUNT(*) grouped by payment_type_label. | ||
| - **Data source**: dev_baraah.fct_trips (dbt mart) | ||
| - **Refresh frequency**: Rebuilt once per day. | ||
|
|
||
| ### Panel 2: Average Fare per Mile by Dropoff Borough | ||
|
|
||
| - **Name**: avg_fare_per_mile_by_dropoff_borough | ||
| - **Description**: Average fare earned per mile for taxi trips grouped by dropoff borough. This metric compares fare efficiency across boroughs. | ||
| - **Calculation**: AVG(fare_per_mile) grouped by dropoff_borough. | ||
| - **Data source**: dev_baraah.fct_trips (dbt mart) | ||
| - **Refresh frequency**: Rebuilt once per day. | ||
|
|
||
| ### Panel 3: Average Trip Duration by Hour of Day | ||
|
|
||
| - **Name**: avg_trip_duration_by_hour | ||
| - **Description**: Average trip duration in minutes grouped by pickup hour. This metric helps identify how trip duration changes throughout the day. | ||
| - **Calculation**: AVG(EXTRACT(EPOCH FROM (dropoff_datetime - pickup_datetime)) / 60) grouped by EXTRACT(HOUR FROM pickup_datetime). | ||
| - **Data source**: dev_baraah.fct_trips (dbt mart) | ||
| - **Refresh frequency**: Rebuilt once per day. | ||
|
|
||
| ## Streamlit panels | ||
|
|
||
| <!-- Headline KPIs panel: total trips, average trip distance, average | ||
| fare per mile. --> | ||
|
|
||
| ### Panel 1: Headline KPIs | ||
|
|
||
| - **Name**: taxi_headline_kpis | ||
| - **Description**: Displays the total trips, average trip distance, and average fare per mile. | ||
| - **Calculation**: COUNT(*), AVG(trip_distance), and AVG(fare_per_mile). | ||
| - **Data source**: dev_baraah.fct_trips (dbt mart) | ||
| - **Refresh frequency**: Rebuilt once per day. | ||
|
|
||
|
|
||
| ### Panel 2: Trips by Hour of Day | ||
|
|
||
| - **Name**: trips_by_hour | ||
| - **Description**: Shows the number of taxi trips for each pickup hour. | ||
| - **Calculation**: COUNT(*) grouped by EXTRACT(HOUR FROM pickup_datetime). | ||
| - **Data source**: dev_baraah.fct_trips (dbt mart) | ||
| - **Refresh frequency**: Rebuilt once per day. | ||
|
|
||
| ### Panel 3: Data Freshness | ||
|
|
||
| - **Name**: taxi_data_freshness | ||
| - **Description**: Shows the total number of rows and the latest pickup datetime to verify that the data is current. | ||
| - **Calculation**: COUNT(*) and MAX(pickup_datetime). | ||
| - **Data source**: dev_baraah.fct_trips (dbt mart) | ||
| - **Refresh frequency**: Rebuilt once per day. | ||
|
|
||
|
|
||
|
|
||
| <!-- Add more ### Panel blocks under either section if you build more (the Required tier adds | ||
| an hour-of-day trend and a freshness panel to Streamlit; a Metabase date filter is Extra, | ||
| bonus credit, not required). --> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think something went wrong with your last graph, both axis have the same label and there is a linear line (probably plotting pickup hour vs pickup hour)