Skip to content

Commit

Permalink
Fixed file load so it will happen only once
Browse files Browse the repository at this point in the history
  • Loading branch information
jdesanto committed Sep 19, 2023
1 parent 6b52253 commit b69524f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ads/dataset/sampled_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,9 +704,10 @@ def _visualize_feature_distribution(self, html_widget):
df, geometry=geopandas.points_from_xy(df["lon"], df["lat"])
)

self.world = geopandas.read_file(
geopandas.datasets.get_path("naturalearth_lowres")
)
if not hasattr(self, "world"):
self.world = geopandas.read_file(
geopandas.datasets.get_path("naturalearth_lowres")
)

self.world.plot(
ax=ax, color="lightgrey", linewidth=0.5, edgecolor="white"
Expand Down

0 comments on commit b69524f

Please sign in to comment.