giswqs commited on
Commit
7adfad6
1 Parent(s): 9852f2b

Updated README

Browse files
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
  title: GSWIS
3
- emoji: 🌍
4
  colorFrom: green
5
  colorTo: red
6
  sdk: docker
 
1
  ---
2
  title: GSWIS
3
+ emoji: 🌊
4
  colorFrom: green
5
  colorTo: red
6
  sdk: docker
pages/00_home.py CHANGED
@@ -2,24 +2,25 @@ import solara
2
 
3
  @solara.component
4
  def Page():
 
 
 
 
 
5
 
6
- markdown = """
7
- ## Solara for Geospatial Applications
8
-
9
- ### Introduction
10
 
11
- **A collection of [Solara](https://github.com/widgetti/solara) web apps for geospatial applications.**
 
12
 
13
- Just a proof-of-concept for now. Not all features are working yet. More features will be added in the future. Click on the menu above to see the other pages.
14
 
15
- - Web App: <https://giswqs-solara-geospatial.hf.space>
16
- - GitHub: <https://github.com/opengeos/solara-geospatial>
17
- - Hugging Face: <https://huggingface.co/spaces/giswqs/solara-geospatial>
18
 
19
- ### Demos
20
 
21
- ![](https://i.imgur.com/4uIEnAJ.gif)
22
 
23
- """
24
-
25
- solara.Markdown(markdown)
 
2
 
3
  @solara.component
4
  def Page():
5
+ with solara.Column(align="center"):
6
+ markdown = """
7
+ ## Global Surface Water Information System (GSWIS)
8
+
9
+ ### Introduction
10
 
11
+ We have used 5 global datasets viz., ESA, ESRI, JRC, OSM and HydroLAKES,
12
+ to generate a processed multi-band gridded GSWE dataset at 10 m spatial
13
+ resolution, with each band corresponding to one of the 5 datasets used.
14
+ The dataset comprises of a total of 5153 grids, each grid having a 2°×2° dimension.
15
 
16
+ - Web App: <https://giswqs-gswis.hf.space>
17
+ - Hugging Face: <https://huggingface.co/spaces/giswqs/solara-gswis>
18
 
19
+ ### Demos
20
 
21
+ ![](https://i.imgur.com/4uIEnAJ.gif)
 
 
22
 
23
+ """
24
 
25
+ solara.Markdown(markdown)
26
 
 
 
 
pages/{02_geemap.py → 01_gswis.py} RENAMED
File without changes
pages/01_leafmap.py DELETED
@@ -1,35 +0,0 @@
1
- import leafmap
2
- import solara
3
- from leafmap.toolbar import change_basemap
4
-
5
- zoom = solara.reactive(2)
6
- center = solara.reactive((20, 0))
7
-
8
-
9
- class Map(leafmap.Map):
10
- def __init__(self, **kwargs):
11
- super().__init__(**kwargs)
12
- # Add what you want below
13
- self.add_basemap("OpenTopoMap")
14
- change_basemap(self)
15
-
16
-
17
- @solara.component
18
- def Page():
19
- with solara.Column(style={"min-width": "500px"}):
20
- # solara components support reactive variables
21
- # solara.SliderInt(label="Zoom level", value=zoom, min=1, max=20)
22
- # using 3rd party widget library require wiring up the events manually
23
- # using zoom.value and zoom.set
24
- Map.element( # type: ignore
25
- zoom=zoom.value,
26
- on_zoom=zoom.set,
27
- center=center.value,
28
- on_center=center.set,
29
- scroll_wheel_zoom=True,
30
- toolbar_ctrl=False,
31
- data_ctrl=False,
32
-
33
- )
34
- solara.Text(f"Zoom: {zoom.value}")
35
- solara.Text(f"Center: {center.value}")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
pages/03_mapbox.py DELETED
@@ -1,25 +0,0 @@
1
-
2
- import mapwidget.mapbox as mapwidget
3
-
4
- import solara
5
-
6
- zoom = solara.reactive(2)
7
- center = solara.reactive((20, 0))
8
-
9
-
10
- @solara.component
11
- def Page():
12
- with solara.Column(style={"min-width": "500px", "height": "500px"}):
13
- solara.Text("Not fully working yet. Try resizing the window to use the full width.")
14
- # solara components support reactive variables
15
- solara.SliderInt(label="Zoom level", value=zoom, min=1, max=20)
16
- # using 3rd party widget library require wiring up the events manually
17
- # using zoom.value and zoom.set
18
- mapwidget.Map.element( # type: ignore
19
- zoom=zoom.value,
20
- center=center.value,
21
- height='600px',
22
- width="100%"
23
- )
24
- solara.Text(f"Zoom: {zoom.value}")
25
- solara.Text(f"Center: {center.value}")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
pages/04_cesium.py DELETED
@@ -1,28 +0,0 @@
1
-
2
- import os
3
- import mapwidget.cesium as mapwidget
4
-
5
- import solara
6
-
7
- altitude = solara.reactive(400)
8
- center = solara.reactive((37.655, -122.4175))
9
-
10
- if os.environ.get('CESIUM_TOKEN') is None:
11
- token = 'YOUR-CESIUM-TOKEN'
12
- else:
13
- token = os.environ.get('CESIUM_TOKEN')
14
-
15
- @solara.component
16
- def Page():
17
- with solara.Column(style={"min-width": "500px", "height": "500px"}):
18
- # solara components support reactive variables
19
- solara.SliderInt(label="Zoom level", value=altitude, min=1, max=1000)
20
- # using 3rd party widget library require wiring up the events manually
21
- # using zoom.value and zoom.set
22
- mapwidget.Map.element( # type: ignore
23
- center=center.value,
24
- altitude=altitude.value,
25
- height='600px',
26
- width="100%"
27
- )
28
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
pages/05_maplibre.py DELETED
@@ -1,26 +0,0 @@
1
-
2
- import mapwidget.maplibre as mapwidget
3
-
4
- import solara
5
-
6
- zoom = solara.reactive(2)
7
- center = solara.reactive((20, 0))
8
-
9
-
10
- @solara.component
11
- def Page():
12
- with solara.Column(style={"min-width": "500px", "height": "500px"}):
13
- solara.Text("Not fully working yet. Try resizing the window to use the full width.")
14
-
15
- # solara components support reactive variables
16
- solara.SliderInt(label="Zoom level", value=zoom, min=1, max=20)
17
- # using 3rd party widget library require wiring up the events manually
18
- # using zoom.value and zoom.set
19
- mapwidget.Map.element( # type: ignore
20
- zoom=zoom.value,
21
- center=center.value,
22
- height='600px',
23
- width="100%"
24
- )
25
- solara.Text(f"Zoom: {zoom.value}")
26
- solara.Text(f"Center: {center.value}")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
pages/06_openlayers.py DELETED
@@ -1,24 +0,0 @@
1
-
2
- import mapwidget.openlayers as mapwidget
3
-
4
- import solara
5
-
6
- zoom = solara.reactive(5)
7
- center = solara.reactive((53.2305799, 6.5323552))
8
-
9
-
10
- @solara.component
11
- def Page():
12
- with solara.Column(style={"min-width": "500px", "height": "500px"}):
13
- # solara components support reactive variables
14
- solara.SliderInt(label="Zoom level", value=zoom, min=1, max=20)
15
- # using 3rd party widget library require wiring up the events manually
16
- # using zoom.value and zoom.set
17
- mapwidget.Map.element( # type: ignore
18
- zoom=zoom.value,
19
- center=center.value,
20
- height='600px',
21
- width="100%"
22
- )
23
- # solara.Text(f"Zoom: {zoom.value}")
24
- # solara.Text(f"Center: {center.value}")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
pages/07_ipyleaflet.py DELETED
@@ -1,44 +0,0 @@
1
- import ipyleaflet
2
- import solara
3
- import ipywidgets as widgets
4
-
5
- zoom = solara.reactive(2)
6
- center = solara.reactive((20, 0))
7
-
8
-
9
- class Map(ipyleaflet.Map):
10
- def __init__(self, **kwargs):
11
- super().__init__(**kwargs)
12
- self.layout.height = '600px'
13
- # Add what you want below
14
-
15
- label = widgets.Label('Clicked location')
16
- output = widgets.Output()
17
- widget = widgets.VBox([label, output])
18
- control = ipyleaflet.WidgetControl(widget=widget, position='bottomright')
19
- self.add_control(control)
20
-
21
- def handle_interaction(**kwargs):
22
- latlon = kwargs.get("coordinates")
23
- if kwargs.get("type") == "click":
24
- with output:
25
- output.clear_output()
26
- print(latlon)
27
-
28
- self.on_interaction(handle_interaction)
29
-
30
-
31
- @solara.component
32
- def Page():
33
- with solara.Column(style={"min-width": "500px"}):
34
- solara.SliderInt(label="Zoom level", value=zoom, min=1, max=20)
35
- Map.element(
36
- zoom=zoom.value,
37
- on_zoom=zoom.set,
38
- center=center.value,
39
- on_center=center.set,
40
- scroll_wheel_zoom=True,
41
-
42
- )
43
- solara.Text(f"Zoom: {zoom.value}")
44
- solara.Text(f"Center: {center.value}")