Skip to content

Commit

Permalink
Change road completeness percentage logic
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitijrajsharma committed Feb 1, 2024
1 parent 8742fee commit de4ecbd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,13 @@ def get_summary_stats(self):
)

combined_data["osm_roads_completeness_percentage"] = (
100 - combined_data["osmRoadGapsPercentage"]
100
if combined_data["osm_highway_length"] == 0
and combined_data["ai_highway_length"] == 0
else (
combined_data["osm_highway_length"] / combined_data["ai_highway_length"]
)
* 100
)

combined_data["averageEditTime"] = datetime.fromtimestamp(
Expand Down

0 comments on commit de4ecbd

Please sign in to comment.