-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add NY Taxi Trips page and enhance payment type handling
- Introduced a new page for NY Taxi Trips with visualizations using Altair. - Updated payment type and rate code mappings in the NYC TLC trips service. - Modified the home page to streamline navigation and search functionality. - Removed unused pages to simplify the project structure. - Adjusted default date range in the date range picker component.
- Loading branch information
Showing
13 changed files
with
98 additions
and
69 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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,28 @@ | ||
import altair as alt | ||
import streamlit as st | ||
|
||
from example.services import nyc_tlc_trips | ||
from example.ui.components import date_range_picker, payment_type_selector | ||
|
||
st.title("NY Taxi Trips") | ||
|
||
st.write("New York City Taxi and Limousine Commission (TLC) trips") | ||
|
||
st.caption("Filters") | ||
|
||
date_range = date_range_picker.show() | ||
payment_type = payment_type_selector.show() | ||
|
||
trips = nyc_tlc_trips.get_trips(date_range, payment_type) | ||
|
||
st.caption("Search results") | ||
st.dataframe(trips) | ||
|
||
trip_count_chart = ( | ||
alt.Chart(trips) | ||
.mark_line() | ||
.encode(x="day:T", y="trip_count:Q", color="rate_code:N") | ||
.properties(title="Trip Count Over Time by Rate Code") | ||
) | ||
|
||
st.altair_chart(trip_count_chart, use_container_width=True) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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 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 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