danielle-losos commited on
Commit
c61f98e
·
verified ·
1 Parent(s): 9f10e60

Create Home.py

Browse files
Files changed (1) hide show
  1. pages/Home.py +39 -0
pages/Home.py ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import leafmap.foliumap as leafmap
3
+
4
+ st.set_page_config(layout="wide")
5
+
6
+ # Customize the sidebar
7
+ markdown = """
8
+ A Streamlit map template
9
+ <https://github.com/opengeos/streamlit-map-template>
10
+ """
11
+
12
+ st.sidebar.title("About")
13
+ st.sidebar.info(markdown)
14
+ logo = "https://i.imgur.com/UbOXYAU.png"
15
+ st.sidebar.image(logo)
16
+
17
+ # Customize page title
18
+ st.title("Streamlit for Geospatial Applications")
19
+
20
+ st.markdown(
21
+ """
22
+ This multipage app template demonstrates various interactive web apps created using [streamlit](https://streamlit.io) and [leafmap](https://leafmap.org). It is an open-source project and you are very welcome to contribute to the [GitHub repository](https://github.com/opengeos/streamlit-map-template).
23
+ """
24
+ )
25
+
26
+ st.header("Instructions")
27
+
28
+ markdown = """
29
+ 1. For the [GitHub repository](https://github.com/opengeos/streamlit-map-template) or [use it as a template](https://github.com/opengeos/streamlit-map-template/generate) for your own project.
30
+ 2. Customize the sidebar by changing the sidebar text and logo in each Python files.
31
+ 3. Find your favorite emoji from https://emojipedia.org.
32
+ 4. Add a new app to the `pages/` directory with an emoji in the file name, e.g., `1_🚀_Chart.py`.
33
+ """
34
+
35
+ st.markdown(markdown)
36
+
37
+ m = leafmap.Map(minimap_control=True)
38
+ m.add_basemap("OpenTopoMap")
39
+ m.to_streamlit(height=500)