Skip to content

Commit 55081c7

Browse files
committed
adding map
1 parent 1512e99 commit 55081c7

File tree

7 files changed

+831
-172
lines changed

7 files changed

+831
-172
lines changed

gtfs_digest/27_fct_monthly_schedule_route_direction_summary.ipynb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,13 @@
12741274
"execution_count": 48,
12751275
"id": "be5a3d9c-aaac-49fe-9eee-124325782c24",
12761276
"metadata": {
1277-
"tags": []
1277+
"editable": true,
1278+
"slideshow": {
1279+
"slide_type": ""
1280+
},
1281+
"tags": [
1282+
"parameters"
1283+
]
12781284
},
12791285
"outputs": [],
12801286
"source": [

gtfs_digest/31_download_prep_data.ipynb

Lines changed: 77 additions & 122 deletions
Large diffs are not rendered by default.

gtfs_digest/32_districts.ipynb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1889,7 +1889,15 @@
18891889
"cell_type": "code",
18901890
"execution_count": 76,
18911891
"id": "1439705e-d3b5-4036-8719-62725c257d1f",
1892-
"metadata": {},
1892+
"metadata": {
1893+
"editable": true,
1894+
"slideshow": {
1895+
"slide_type": ""
1896+
},
1897+
"tags": [
1898+
"parameters"
1899+
]
1900+
},
18931901
"outputs": [],
18941902
"source": [
18951903
"monthly_routes_gdf = gpd.read_parquet(monthly_routes_url,storage_options={\"token\": credentials.token})"

gtfs_digest/_new_operator_report_utils.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def create_text_table(df: pd.DataFrame) -> pd.DataFrame:
4242
text_table_df["Direction"] = text_table_df.Direction.astype(str)
4343

4444
return text_table_df
45+
4546

4647
"""
4748
Charts
@@ -143,7 +144,7 @@ def create_hourly_summary(df: pd.DataFrame, day_type: str):
143144
scale=alt.LegendResolveMap(color=alt.ResolveMode("independent"))
144145
)
145146
)
146-
chart = _report_operator_visuals.configure_chart(
147+
chart = _portfolio_charts.configure_chart(
147148
chart,
148149
width=400,
149150
height=250,
@@ -166,6 +167,7 @@ def create_route_dropdown(df: pd.DataFrame):
166167
)
167168
return xcol_param
168169

170+
169171
def create_scheduled_minutes(df: pd.DataFrame):
170172
df2 = df.loc[df["Day Type"] == "Weekday"]
171173
chart_dict = readable_dict.avg_scheduled_minutes
@@ -219,6 +221,7 @@ def create_scheduled_minutes(df: pd.DataFrame):
219221
chart = alt.hconcat(dir_0_chart, dir_1_chart)
220222
return chart
221223

224+
222225
def create_scheduled_trips(df: pd.DataFrame):
223226
df2 = df.loc[df["Day Type"] == "Weekday"]
224227
chart_dict = readable_dict.scheduled
@@ -272,6 +275,7 @@ def create_scheduled_trips(df: pd.DataFrame):
272275
chart = alt.hconcat(dir_0_chart, dir_1_chart)
273276
return chart
274277

278+
275279
def create_frequency(df: pd.DataFrame):
276280
df2 = df.loc[df["Day Type"] == "Weekday"]
277281
chart_dict = readable_dict.frequency
@@ -325,6 +329,20 @@ def create_frequency(df: pd.DataFrame):
325329
chart = alt.hconcat(dir_0_chart, dir_1_chart)
326330
return chart
327331

332+
333+
def text_table(df: pd.DataFrame) -> alt.Chart:
334+
335+
# Create the chart
336+
text_chart = (
337+
alt.Chart(df)
338+
.mark_text()
339+
.encode(x=alt.X("Zero:Q", axis=None), y=alt.Y("combo_col", axis=None))
340+
)
341+
342+
text_chart = text_chart.encode(text="combo_col:N")
343+
return text_chart
344+
345+
328346
def create_text_graph(df: pd.DataFrame):
329347
chart_dict = readable_dict.avg_scheduled_minutes
330348

@@ -361,5 +379,5 @@ def create_text_graph(df: pd.DataFrame):
361379
.add_params(selection)
362380
.transform_filter(selection)
363381
)
364-
365-
return chart
382+
return chart
383+

gtfs_digest/new_readable.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ hourly_summary:
1515
subtitle: "Use the legend to highlight a particular month and hover over the line for additional information."
1616
tooltip: ["Date", 'Departure Hour', "N Trips"]
1717
colors: []
18+
background_graph:
19+
colors: ${color_palettes.full_color_scale}
1820

1921
# fct_monthly_operator_summary
2022
trip_updates_minute:

gtfs_digest/report_new_operator.ipynb

Lines changed: 706 additions & 44 deletions
Large diffs are not rendered by default.

gtfs_digest/report_operator.ipynb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44
"cell_type": "code",
55
"execution_count": 1,
66
"id": "89102e7d-7aa7-4897-ba5d-e09d0bd08fac",
7-
"metadata": {},
7+
"metadata": {
8+
"editable": true,
9+
"slideshow": {
10+
"slide_type": ""
11+
},
12+
"tags": [
13+
"parameters"
14+
]
15+
},
816
"outputs": [],
917
"source": [
1018
"%%capture\n",

0 commit comments

Comments
 (0)