Skip to content

Commit

Permalink
Add data repository
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Oct 25, 2024
1 parent 64189ed commit f37a8ac
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
1 change: 1 addition & 0 deletions pages/00_home.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def Page():
- Web App: <https://giswqs-solara-maxar.hf.space>
- GitHub: <https://github.com/opengeos/solara-maxar>
- Hugging Face: <https://huggingface.co/spaces/giswqs/solara-maxar>
- Data Repository: <https://github.com/opengeos/maxar-open-data>
"""

Expand Down
6 changes: 3 additions & 3 deletions pages/01_morocco.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def reset_map(change):
reset.value = False
date_picker.value = pd.to_datetime("2021-01-01").date()
m.remove_layer(m.find_layer("Footprint"))
m.controls = m.controls[:-1]

m.add_gdf(
m.footprint,
layer_name="Footprint",
Expand All @@ -120,7 +120,7 @@ def reset_map(change):
def change_dataset(change):
default_geojson = f"{url}/datasets/{change.new}_union.geojson"
m.layers = m.layers[:2]
m.controls = m.controls[:-1]

basename = os.path.basename(default_geojson)
tempdir = tempfile.gettempdir()
tmp_geojson = os.path.join(tempdir, basename)
Expand All @@ -142,7 +142,7 @@ def change_date(change):
sub_catalog_ids = sub_gdf["catalog_id"].values.tolist()
image.options = sub_catalog_ids
m.remove_layer(m.find_layer("Footprint"))
m.controls = m.controls[:-1]

m.add_gdf(
sub_gdf,
layer_name="Footprint",
Expand Down
6 changes: 3 additions & 3 deletions pages/02_libya.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def reset_map(change):
reset.value = False
date_picker.value = pd.to_datetime("2021-01-01").date()
m.remove_layer(m.find_layer("Footprint"))
m.controls = m.controls[:-1]

m.add_gdf(
m.footprint,
layer_name="Footprint",
Expand All @@ -120,7 +120,7 @@ def reset_map(change):
def change_dataset(change):
default_geojson = f"{url}/datasets/{change.new}_union.geojson"
m.layers = m.layers[:2]
m.controls = m.controls[:-1]

basename = os.path.basename(default_geojson)
tempdir = tempfile.gettempdir()
tmp_geojson = os.path.join(tempdir, basename)
Expand All @@ -142,7 +142,7 @@ def change_date(change):
sub_catalog_ids = sub_gdf["catalog_id"].values.tolist()
image.options = sub_catalog_ids
m.remove_layer(m.find_layer("Footprint"))
m.controls = m.controls[:-1]

m.add_gdf(
sub_gdf,
layer_name="Footprint",
Expand Down
6 changes: 3 additions & 3 deletions pages/03_maui.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def reset_map(change):
reset.value = False
date_picker.value = pd.to_datetime("2021-01-01").date()
m.remove_layer(m.find_layer("Footprint"))
m.controls = m.controls[:-1]

m.add_gdf(
m.footprint,
layer_name="Footprint",
Expand All @@ -120,7 +120,7 @@ def reset_map(change):
def change_dataset(change):
default_geojson = f"{url}/datasets/{change.new}_union.geojson"
m.layers = m.layers[:2]
m.controls = m.controls[:-1]

basename = os.path.basename(default_geojson)
tempdir = tempfile.gettempdir()
tmp_geojson = os.path.join(tempdir, basename)
Expand All @@ -142,7 +142,7 @@ def change_date(change):
sub_catalog_ids = sub_gdf["catalog_id"].values.tolist()
image.options = sub_catalog_ids
m.remove_layer(m.find_layer("Footprint"))
m.controls = m.controls[:-1]

m.add_gdf(
sub_gdf,
layer_name="Footprint",
Expand Down
6 changes: 3 additions & 3 deletions pages/04_helen.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def reset_map(change):
reset.value = False
date_picker.value = pd.to_datetime("2021-01-01").date()
m.remove_layer(m.find_layer("Footprint"))
m.controls = m.controls[:-1]

m.add_gdf(
m.footprint,
layer_name="Footprint",
Expand All @@ -120,7 +120,7 @@ def reset_map(change):
def change_dataset(change):
default_geojson = f"{url}/datasets/{change.new}_union.geojson"
m.layers = m.layers[:2]
m.controls = m.controls[:-1]

basename = os.path.basename(default_geojson)
tempdir = tempfile.gettempdir()
tmp_geojson = os.path.join(tempdir, basename)
Expand All @@ -142,7 +142,7 @@ def change_date(change):
sub_catalog_ids = sub_gdf["catalog_id"].values.tolist()
image.options = sub_catalog_ids
m.remove_layer(m.find_layer("Footprint"))
m.controls = m.controls[:-1]

m.add_gdf(
sub_gdf,
layer_name="Footprint",
Expand Down
7 changes: 3 additions & 4 deletions pages/05_milton.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def reset_map(change):
reset.value = False
date_picker.value = pd.to_datetime("2021-01-01").date()
m.remove_layer(m.find_layer("Footprint"))
m.controls = m.controls[:-1]

m.add_gdf(
m.footprint,
layer_name="Footprint",
Expand All @@ -120,7 +120,7 @@ def reset_map(change):
def change_dataset(change):
default_geojson = f"{url}/datasets/{change.new}_union.geojson"
m.layers = m.layers[:2]
m.controls = m.controls[:-1]

basename = os.path.basename(default_geojson)
tempdir = tempfile.gettempdir()
tmp_geojson = os.path.join(tempdir, basename)
Expand All @@ -142,8 +142,7 @@ def change_date(change):
sub_catalog_ids = sub_gdf["catalog_id"].values.tolist()
image.options = sub_catalog_ids
m.remove_layer(m.find_layer("Footprint"))
m.controls = m.controls[:-1]
m.controls = m.controls[:-1]

m.add_gdf(
sub_gdf,
layer_name="Footprint",
Expand Down

0 comments on commit f37a8ac

Please sign in to comment.