Skip to content

Commit

Permalink
build: update dependencies lock file
Browse files Browse the repository at this point in the history
  • Removing contextlib2 (21.6.0)
  • Updating exceptiongroup (1.2.0 -> 1.2.1)
  • Updating idna (3.6 -> 3.7)
  • Updating pyparsing (3.1.1 -> 3.1.2)
  • Updating sniffio (1.3.0 -> 1.3.1)
  • Updating typing-extensions (4.9.0 -> 4.11.0)
  • Updating anyio (4.2.0 -> 4.3.0)
  • Updating filelock (3.13.1 -> 3.14.0)
  • Updating joblib (1.3.2 -> 1.4.2)
  • Updating packaging (23.2 -> 24.0)
  • Updating platformdirs (4.2.0 -> 4.2.1)
  • Updating pluggy (1.4.0 -> 1.5.0)
  • Updating pycparser (2.21 -> 2.22)
  • Updating pydantic-core (2.16.2 -> 2.18.2)
  • Updating scipy (1.12.0 -> 1.13.0)
  • Updating setuptools (69.0.3 -> 69.5.1)
  • Updating threadpoolctl (3.2.0 -> 3.5.0)
  • Updating coverage (7.4.1 -> 7.5.1)
  • Updating fiona (1.9.5 -> 1.9.6)
  • Updating identify (2.5.33 -> 2.5.36)
  • Updating jinja2 (3.1.3 -> 3.1.4)
  • Updating pydantic (2.6.1 -> 2.7.1)
  • Updating rasterio (1.3.9 -> 1.3.10)
  • Updating shapely (2.0.2 -> 2.0.4)
  • Updating tenacity (8.2.3 -> 8.3.0)
  • Updating urllib3 (2.2.0 -> 2.2.1)
  • Updating virtualenv (20.25.0 -> 20.26.1)
  • Updating plotly (5.18.0 -> 5.22.0)
  • Updating pre-commit (3.6.0 -> 3.7.0)
  • Updating pytest-mock (3.12.0 -> 3.14.0)
  • Updating python-dateutil (2.8.2 -> 2.9.0.post0)
  • Updating rpy2 (3.5.15 -> 3.5.16)
  • Updating schema (0.7.5 -> 0.7.7)

Closes #779
Closes #782
  • Loading branch information
matthiasschaub committed May 8, 2024
1 parent 8dc55d2 commit 9c62b0b
Show file tree
Hide file tree
Showing 3 changed files with 383 additions and 382 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
### Other Changes

- build: update dependencies (`rpy2` and `fastapi`) ([#775])
- update dependencies ([#785])

[#768]: https://github.com/GIScience/ohsome-quality-api/pull/768
[#778]: https://github.com/GIScience/ohsome-quality-api/issues/778
[#775]: https://github.com/GIScience/ohsome-quality-api/pull/775
[#777]: https://github.com/GIScience/ohsome-quality-api/issues/777
[#778]: https://github.com/GIScience/ohsome-quality-api/issues/778
[#785]: https://github.com/GIScience/ohsome-quality-api/pull/785
[#786]: https://github.com/GIScience/ohsome-quality-api/issues/786
[#787]: https://github.com/GIScience/ohsome-quality-api/issues/787

Expand Down
30 changes: 21 additions & 9 deletions ohsome_quality_api/indicators/road_comparison/indicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def create_figure(self) -> None:
pgo.Bar(
x=[name],
y=[ratio],
name=f"{name} matched with OSM",
name=f"{round((ratio * 100), 1)}% of {name} are matched by OSM",
marker=dict(color="black", line=dict(color="black", width=1)),
width=0.4,
hovertext=f"OSM Covered: {(self.length_matched[name]/1000):.2f} km"
Expand All @@ -202,26 +202,38 @@ def create_figure(self) -> None:
pgo.Bar(
x=[name],
y=[1 - ratio],
name=f"{name} not matched with OSM",
name="{0}% of {1} are not matched by OSM".format(
round((100 - ratio * 100), 1),
name,
),
marker=dict(
color="rgba(0,0,0,0)", line=dict(color="black", width=1)
),
width=0.4,
hovertext=f"Not OSM Covered: {length_difference_km:.2f} km "
f"({date:%b %d, %Y})",
hoverinfo="text",
text=[f"{round((ratio * 100), 2)} % of Roads covered by OSM"],
textposition="outside",
)
)

# Update layout
fig.update_layout(
barmode="stack",
title="Road Comparison",
xaxis=dict(title="Reference Dataset"),
yaxis=dict(title="Ratio of matched road length"),
fig.update_layout(
barmode="stack",
title="Road Comparison",
xaxis=dict(title="Reference Dataset"),
yaxis=dict(title="Ratio of matched road length"),
)

fig.update_layout(
legend=dict(
orientation="h",
entrywidth=270,
yanchor="bottom",
y=1.02,
xanchor="center",
x=0.5,
)
)

raw = fig.to_dict()
raw["layout"].pop("template") # remove boilerplate
Expand Down

0 comments on commit 9c62b0b

Please sign in to comment.