Mohamed90 commited on
Commit
05b8bc9
1 Parent(s): 38a0f38

Upload 23 files

Browse files

Add necessary files

Files changed (24) hide show
  1. .gitattributes +2 -0
  2. Algeria.cpg +1 -0
  3. Algeria.dbf +0 -0
  4. Algeria.prj +1 -0
  5. Algeria.shp +0 -0
  6. Algeria.shx +0 -0
  7. Dockerfile +11 -0
  8. Morocco.cpg +1 -0
  9. Morocco.dbf +0 -0
  10. Morocco.prj +1 -0
  11. Morocco.shp +3 -0
  12. Morocco.shx +0 -0
  13. Tunisia.cpg +1 -0
  14. Tunisia.dbf +0 -0
  15. Tunisia.prj +1 -0
  16. Tunisia.shp +0 -0
  17. Tunisia.shx +0 -0
  18. app.py +73 -0
  19. libya.cpg +1 -0
  20. libya.dbf +0 -0
  21. libya.prj +1 -0
  22. libya.shp +3 -0
  23. libya.shx +0 -0
  24. requirements.txt +3 -0
.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ libya.shp filter=lfs diff=lfs merge=lfs -text
37
+ Morocco.shp filter=lfs diff=lfs merge=lfs -text
Algeria.cpg ADDED
@@ -0,0 +1 @@
 
 
1
+ UTF-8
Algeria.dbf ADDED
Binary file (913 Bytes). View file
 
Algeria.prj ADDED
@@ -0,0 +1 @@
 
 
1
+ GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
Algeria.shp ADDED
Binary file (508 kB). View file
 
Algeria.shx ADDED
Binary file (108 Bytes). View file
 
Dockerfile ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ WORKDIR /test1
4
+
5
+ COPY . /test1
6
+
7
+ RUN pip install --no-cache-dir --upgrade -r /test1/requirements.txt
8
+
9
+ COPY . .
10
+
11
+ CMD ["streamlit", "run", "/test1/app.py", "--address", "0.0.0.0", "--port", "7860"]
Morocco.cpg ADDED
@@ -0,0 +1 @@
 
 
1
+ UTF-8
Morocco.dbf ADDED
Binary file (5.69 kB). View file
 
Morocco.prj ADDED
@@ -0,0 +1 @@
 
 
1
+ GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
Morocco.shp ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:22bc771eafc96dcde87afc6261e8e04361670081f3de605b024dc769443cff95
3
+ size 1098324
Morocco.shx ADDED
Binary file (108 Bytes). View file
 
Tunisia.cpg ADDED
@@ -0,0 +1 @@
 
 
1
+ UTF-8
Tunisia.dbf ADDED
Binary file (5.69 kB). View file
 
Tunisia.prj ADDED
@@ -0,0 +1 @@
 
 
1
+ GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
Tunisia.shp ADDED
Binary file (966 kB). View file
 
Tunisia.shx ADDED
Binary file (108 Bytes). View file
 
app.py ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+ import numpy as np
4
+ import geopandas as gpd
5
+
6
+ import folium
7
+ from folium.plugins import Draw
8
+ from streamlit_folium import st_folium
9
+
10
+ st.title('This is GIS website, WELLCOME!')
11
+
12
+ df1 = gpd.read_file('Algeria.shp')
13
+ df2 = gpd.read_file('Tunisia.shp')
14
+ df3 = gpd.read_file('Libya.shp')
15
+ df4 = gpd.read_file('Morocco.shp')
16
+
17
+ with st.sidebar:
18
+ st.title("Different Map Tiles")
19
+ option = st.selectbox(" ", ("OpenstreetMap", "Stamen Terrain", "Stamen Toner"))
20
+ m = folium.Map(location=[28.0289837, 24.61], tiles=option, zoom_start=4.1)
21
+
22
+ tab1, tab2, tab3, tab4 = st.tabs(['Home', "About", "Contact", "Help"])
23
+
24
+ with tab1:
25
+ st.header("Geographic Map")
26
+ option0 = st.selectbox('which data would you like see ?', ('All', 'Algeria', 'Tunisia', "Libya", "Morocco"))
27
+ if option0 == 'Algeria':
28
+ df1 = df1.to_json()
29
+ df1 = folium.GeoJson(data=df1)
30
+ df1.add_to(m)
31
+ elif option0 == 'Tunisia':
32
+ df2 = df2.to_json()
33
+ df2 = folium.GeoJson(data=df2)
34
+ df2.add_to(m)
35
+ elif option0 == 'Libya':
36
+ df3 = df3.to_json()
37
+ df3 = folium.GeoJson(data=df3)
38
+ df3.add_to(m)
39
+ elif option0 == 'Morocco':
40
+ df4 = df4.to_json()
41
+ df4 = folium.GeoJson(data=df4)
42
+ df4.add_to(m)
43
+ else :
44
+ df1 = df1.to_json()
45
+ df1 = folium.GeoJson(data=df1)
46
+ df1.add_to(m)
47
+ df2 = df2.to_json()
48
+ df2 = folium.GeoJson(data=df2)
49
+ df2.add_to(m)
50
+ df3 = df3.to_json()
51
+ df3 = folium.GeoJson(data=df3)
52
+ df3.add_to(m)
53
+ df4 = df4.to_json()
54
+ df4 = folium.GeoJson(data=df4)
55
+ df4.add_to(m)
56
+
57
+ Draw(export=True).add_to(m)
58
+ output = st_folium(m, width=1300, height=600)
59
+
60
+ with tab2:
61
+ st.header("About")
62
+ st.write("This is GIS website, WELLCOME!")
63
+
64
+ with tab3:
65
+ st.header("Contact")
66
+ st.write("You can contact us by email: mohamedtahar.fortas@gmail.com")
67
+
68
+ with tab4:
69
+ st.header("Streamlit documentation")
70
+ st.help(st)
71
+
72
+
73
+
libya.cpg ADDED
@@ -0,0 +1 @@
 
 
1
+ UTF-8
libya.dbf ADDED
Binary file (5.69 kB). View file
 
libya.prj ADDED
@@ -0,0 +1 @@
 
 
1
+ GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
libya.shp ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:54d0102fe99d82a0bd60d39bc61aeefd7530a9bb6ca8613d0a9687e0aa4949b0
3
+ size 1051920
libya.shx ADDED
Binary file (108 Bytes). View file
 
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ geopandas
2
+ folium
3
+ streamlit_folium