VicGerardoPR commited on
Commit
09b150d
1 Parent(s): b9aa7ea

Upload 3 files

Browse files
Files changed (3) hide show
  1. README.md +38 -0
  2. app.py +3 -1
  3. requirements.txt +2 -1
README.md CHANGED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: "Alaska Lightning Strikes Visualization"
3
+ emoji: "⚡"
4
+ colorFrom: "blue"
5
+ colorTo: "purple"
6
+ sdk: "streamlit"
7
+ sdk_version: "1.9.0"
8
+ app_file: app.py
9
+ pinned: false
10
+ ---
11
+
12
+ # Alaska Lightning Strikes Visualization
13
+
14
+ This project visualizes lightning strikes in Alaska using `geopandas` and `contextily` to plot the data on an interactive map in a Streamlit application.
15
+
16
+ ## Description
17
+
18
+ This application reads lightning strike data from a shapefile, projects it to a different coordinate reference system, and plots it on an interactive map with a basemap for better visualization. The data is plotted using `geopandas` and the basemap is added using `contextily`.
19
+
20
+ ## Setup
21
+
22
+ To run this application, you need the following dependencies:
23
+
24
+ - `streamlit`
25
+ - `geopandas`
26
+ - `contextily`
27
+ - `matplotlib`
28
+
29
+ These dependencies are listed in the `requirements.txt` file and will be automatically installed when you deploy this application on Hugging Face Spaces.
30
+
31
+ ## Usage
32
+
33
+ To use the application:
34
+
35
+ 1. Input the shapefile path to load the data.
36
+ 2. The application will process the data and visualize it on a map.
37
+
38
+
app.py CHANGED
@@ -8,6 +8,7 @@ import requests
8
  import folium
9
  import zipfile
10
  from streamlit.components.v1 import html
 
11
 
12
  # Función para descargar y descomprimir el archivo
13
  def download_and_extract_data():
@@ -19,7 +20,7 @@ def download_and_extract_data():
19
  # Descargar y descomprimir los datos
20
  st.title('Alaska Lightning Detection Network Analysis')
21
 
22
- st.subheader('How its works: Explorar y comprender mejor la actividad de los rayos. ')
23
 
24
  with st.spinner('Downloading and extracting data...'):
25
  download_and_extract_data()
@@ -132,3 +133,4 @@ ax.set_xlabel('Date')
132
  ax.set_ylabel('Count')
133
  ax.grid(True)
134
  st.pyplot(fig)
 
 
8
  import folium
9
  import zipfile
10
  from streamlit.components.v1 import html
11
+ import contextily as cx
12
 
13
  # Función para descargar y descomprimir el archivo
14
  def download_and_extract_data():
 
20
  # Descargar y descomprimir los datos
21
  st.title('Alaska Lightning Detection Network Analysis')
22
 
23
+ st.subheader('Verificar los rayos. ')
24
 
25
  with st.spinner('Downloading and extracting data...'):
26
  download_and_extract_data()
 
133
  ax.set_ylabel('Count')
134
  ax.grid(True)
135
  st.pyplot(fig)
136
+
requirements.txt CHANGED
@@ -7,4 +7,5 @@ requests
7
  folium
8
  matplotlib
9
  mapclassify
10
- streamlit-folium
 
 
7
  folium
8
  matplotlib
9
  mapclassify
10
+ streamlit-folium
11
+ contextily