Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,10 +32,6 @@ st.write("The table below displays the traffic report: ")
|
|
| 32 |
|
| 33 |
incidents_df, speedbands_df = utils.get_lta_data(url_dict)
|
| 34 |
|
| 35 |
-
# Indicate traffic disruption as 1 else 0
|
| 36 |
-
minor_disruption_list = ["Roadwork"]
|
| 37 |
-
incidents_df['Color_Indicator'] = incidents_df['Type'].apply(lambda x: 0 if x in minor_disruption_list else 1)
|
| 38 |
-
|
| 39 |
# Add the 'Issue' column to the front of the DataFrame
|
| 40 |
incidents_df.insert(0, 'Issue', True)
|
| 41 |
|
|
@@ -90,6 +86,10 @@ st.divider()
|
|
| 90 |
|
| 91 |
# code for Google map plotting
|
| 92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
# Pack the coordinates for polygon
|
| 94 |
speedbands_df['polygon'] = speedbands_df.apply(utils.zip_columns, axis=1)
|
| 95 |
|
|
|
|
| 32 |
|
| 33 |
incidents_df, speedbands_df = utils.get_lta_data(url_dict)
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
# Add the 'Issue' column to the front of the DataFrame
|
| 36 |
incidents_df.insert(0, 'Issue', True)
|
| 37 |
|
|
|
|
| 86 |
|
| 87 |
# code for Google map plotting
|
| 88 |
|
| 89 |
+
# Indicate traffic disruption as 1 else 0
|
| 90 |
+
minor_disruption_list = ["Roadwork"]
|
| 91 |
+
incidents_df['Color_Indicator'] = incidents_df['Type'].apply(lambda x: 0 if x in minor_disruption_list else 1)
|
| 92 |
+
|
| 93 |
# Pack the coordinates for polygon
|
| 94 |
speedbands_df['polygon'] = speedbands_df.apply(utils.zip_columns, axis=1)
|
| 95 |
|