Spaces:
Sleeping
Sleeping
Charles De Dampierre
commited on
Commit
•
7148cbd
1
Parent(s):
f144f21
add the maps
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- app.py +24 -3
- data/map_figures/map_Arabian peninsula.png +3 -0
- data/map_figures/map_Arabic world.png +3 -0
- data/map_figures/map_Austria.png +3 -0
- data/map_figures/map_Balkans.png +3 -0
- data/map_figures/map_Belgium.png +3 -0
- data/map_figures/map_British Islands.png +3 -0
- data/map_figures/map_Central Europe.png +3 -0
- data/map_figures/map_Chinese world.png +3 -0
- data/map_figures/map_Denmark.png +3 -0
- data/map_figures/map_East Slavic.png +3 -0
- data/map_figures/map_Eastern Europe.png +3 -0
- data/map_figures/map_Finland.png +3 -0
- data/map_figures/map_France.png +3 -0
- data/map_figures/map_German world.png +3 -0
- data/map_figures/map_Germany.png +3 -0
- data/map_figures/map_Greece.png +3 -0
- data/map_figures/map_Greek World.png +3 -0
- data/map_figures/map_Iceland.png +3 -0
- data/map_figures/map_Indian world.png +3 -0
- data/map_figures/map_Ireland.png +3 -0
- data/map_figures/map_Italy.png +3 -0
- data/map_figures/map_Japan.png +3 -0
- data/map_figures/map_Korea.png +3 -0
- data/map_figures/map_Latin World.png +3 -0
- data/map_figures/map_Low countries.png +3 -0
- data/map_figures/map_Muslim world.png +3 -0
- data/map_figures/map_Netherlands.png +3 -0
- data/map_figures/map_Nordic countries.png +3 -0
- data/map_figures/map_Northern China.png +3 -0
- data/map_figures/map_Northern France.png +3 -0
- data/map_figures/map_Northern India.png +3 -0
- data/map_figures/map_Northern Italy.png +3 -0
- data/map_figures/map_Northern Japan.png +3 -0
- data/map_figures/map_Northwestern Europe.png +3 -0
- data/map_figures/map_Norway.png +3 -0
- data/map_figures/map_Ottoman Turkey.png +3 -0
- data/map_figures/map_Ottoman world.png +3 -0
- data/map_figures/map_Persian world.png +3 -0
- data/map_figures/map_Portugal.png +3 -0
- data/map_figures/map_Slav world.png +3 -0
- data/map_figures/map_South East Asia.png +3 -0
- data/map_figures/map_Southern China.png +3 -0
- data/map_figures/map_Southern France.png +3 -0
- data/map_figures/map_Southern India.png +3 -0
- data/map_figures/map_Southern Italy.png +3 -0
- data/map_figures/map_Southern Japan.png +3 -0
- data/map_figures/map_Southwestern Europe.png +3 -0
- data/map_figures/map_Spain.png +3 -0
- data/map_figures/map_Sweden.png +3 -0
app.py
CHANGED
@@ -16,35 +16,41 @@ unseen_capita_index_path = (
|
|
16 |
|
17 |
|
18 |
population_path = "data/population"
|
|
|
19 |
|
20 |
|
21 |
# Update image_paths using global_index_path
|
22 |
index_paths = {
|
23 |
"India": {
|
|
|
24 |
"global_index": f"{global_index_path}/india.png",
|
25 |
"unseen_index": f"{unseen_index_path}/india.png",
|
26 |
"unseen_index_capita": f"{unseen_capita_index_path}/india.png",
|
27 |
"population_index": f"{population_path}/Indian world.png",
|
28 |
},
|
29 |
"Japan": {
|
|
|
30 |
"global_index": f"{global_index_path}/japan.png",
|
31 |
"unseen_index": f"{unseen_index_path}/japan.png",
|
32 |
"unseen_index_capita": f"{unseen_capita_index_path}/Japan.png",
|
33 |
"population_index": f"{population_path}/Japan.png",
|
34 |
},
|
35 |
"France": {
|
|
|
36 |
"global_index": f"{global_index_path}/france.png",
|
37 |
"unseen_index": f"{unseen_index_path}/france.png",
|
38 |
"unseen_index_capita": f"{unseen_capita_index_path}/France.png",
|
39 |
"population_index": f"{population_path}/France.png",
|
40 |
},
|
41 |
"Italy": {
|
|
|
42 |
"global_index": f"{global_index_path}/italy.png",
|
43 |
"unseen_index": f"{unseen_index_path}/italy.png",
|
44 |
"unseen_index_capita": f"{unseen_capita_index_path}/Italy.png",
|
45 |
"population_index": f"{population_path}/Italy.png",
|
46 |
},
|
47 |
"Spain": {
|
|
|
48 |
"global_index": f"{global_index_path}/spain.png",
|
49 |
"unseen_index": f"{unseen_index_path}/spain.png",
|
50 |
"unseen_index_capita": f"{unseen_capita_index_path}/Spain.png",
|
@@ -65,14 +71,29 @@ if selected_region in index_paths:
|
|
65 |
if os.path.exists(path):
|
66 |
if key == "global_index":
|
67 |
st.subheader("Global Index")
|
|
|
|
|
|
|
68 |
elif key == "unseen_index":
|
69 |
st.subheader("Unsee-Species Index")
|
|
|
|
|
|
|
70 |
elif key == "unseen_index_capita":
|
71 |
st.subheader("Unsee-Species per capita Index")
|
|
|
|
|
|
|
72 |
elif key == "population_index":
|
73 |
-
st.subheader("")
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
else:
|
77 |
st.write(f"File for {key.capitalize()} does not exist.")
|
78 |
# Add more information or charts specific to India here
|
|
|
16 |
|
17 |
|
18 |
population_path = "data/population"
|
19 |
+
maps_path = "data/map_figures"
|
20 |
|
21 |
|
22 |
# Update image_paths using global_index_path
|
23 |
index_paths = {
|
24 |
"India": {
|
25 |
+
"map": f"{maps_path}/map_Indian world.png",
|
26 |
"global_index": f"{global_index_path}/india.png",
|
27 |
"unseen_index": f"{unseen_index_path}/india.png",
|
28 |
"unseen_index_capita": f"{unseen_capita_index_path}/india.png",
|
29 |
"population_index": f"{population_path}/Indian world.png",
|
30 |
},
|
31 |
"Japan": {
|
32 |
+
"map": f"{maps_path}/map_Japan.png",
|
33 |
"global_index": f"{global_index_path}/japan.png",
|
34 |
"unseen_index": f"{unseen_index_path}/japan.png",
|
35 |
"unseen_index_capita": f"{unseen_capita_index_path}/Japan.png",
|
36 |
"population_index": f"{population_path}/Japan.png",
|
37 |
},
|
38 |
"France": {
|
39 |
+
"map": f"{maps_path}/map_France.png",
|
40 |
"global_index": f"{global_index_path}/france.png",
|
41 |
"unseen_index": f"{unseen_index_path}/france.png",
|
42 |
"unseen_index_capita": f"{unseen_capita_index_path}/France.png",
|
43 |
"population_index": f"{population_path}/France.png",
|
44 |
},
|
45 |
"Italy": {
|
46 |
+
"map": f"{maps_path}/map_Italy.png",
|
47 |
"global_index": f"{global_index_path}/italy.png",
|
48 |
"unseen_index": f"{unseen_index_path}/italy.png",
|
49 |
"unseen_index_capita": f"{unseen_capita_index_path}/Italy.png",
|
50 |
"population_index": f"{population_path}/Italy.png",
|
51 |
},
|
52 |
"Spain": {
|
53 |
+
"map": f"{maps_path}/map_Spain.png",
|
54 |
"global_index": f"{global_index_path}/spain.png",
|
55 |
"unseen_index": f"{unseen_index_path}/spain.png",
|
56 |
"unseen_index_capita": f"{unseen_capita_index_path}/Spain.png",
|
|
|
71 |
if os.path.exists(path):
|
72 |
if key == "global_index":
|
73 |
st.subheader("Global Index")
|
74 |
+
st.image(
|
75 |
+
Image.open(path), caption=key.capitalize(), use_column_width=True
|
76 |
+
)
|
77 |
elif key == "unseen_index":
|
78 |
st.subheader("Unsee-Species Index")
|
79 |
+
st.image(
|
80 |
+
Image.open(path), caption=key.capitalize(), use_column_width=True
|
81 |
+
)
|
82 |
elif key == "unseen_index_capita":
|
83 |
st.subheader("Unsee-Species per capita Index")
|
84 |
+
st.image(
|
85 |
+
Image.open(path), caption=key.capitalize(), use_column_width=True
|
86 |
+
)
|
87 |
elif key == "population_index":
|
88 |
+
st.subheader("¨Population Index")
|
89 |
+
st.image(
|
90 |
+
Image.open(path), caption=key.capitalize(), use_column_width=True
|
91 |
+
)
|
92 |
+
elif key == "map":
|
93 |
+
st.subheader("Maps")
|
94 |
+
st.sidebar.image(
|
95 |
+
Image.open(path), caption=key.capitalize(), use_column_width=True
|
96 |
+
)
|
97 |
else:
|
98 |
st.write(f"File for {key.capitalize()} does not exist.")
|
99 |
# Add more information or charts specific to India here
|
data/map_figures/map_Arabian peninsula.png
ADDED
Git LFS Details
|
data/map_figures/map_Arabic world.png
ADDED
Git LFS Details
|
data/map_figures/map_Austria.png
ADDED
Git LFS Details
|
data/map_figures/map_Balkans.png
ADDED
Git LFS Details
|
data/map_figures/map_Belgium.png
ADDED
Git LFS Details
|
data/map_figures/map_British Islands.png
ADDED
Git LFS Details
|
data/map_figures/map_Central Europe.png
ADDED
Git LFS Details
|
data/map_figures/map_Chinese world.png
ADDED
Git LFS Details
|
data/map_figures/map_Denmark.png
ADDED
Git LFS Details
|
data/map_figures/map_East Slavic.png
ADDED
Git LFS Details
|
data/map_figures/map_Eastern Europe.png
ADDED
Git LFS Details
|
data/map_figures/map_Finland.png
ADDED
Git LFS Details
|
data/map_figures/map_France.png
ADDED
Git LFS Details
|
data/map_figures/map_German world.png
ADDED
Git LFS Details
|
data/map_figures/map_Germany.png
ADDED
Git LFS Details
|
data/map_figures/map_Greece.png
ADDED
Git LFS Details
|
data/map_figures/map_Greek World.png
ADDED
Git LFS Details
|
data/map_figures/map_Iceland.png
ADDED
Git LFS Details
|
data/map_figures/map_Indian world.png
ADDED
Git LFS Details
|
data/map_figures/map_Ireland.png
ADDED
Git LFS Details
|
data/map_figures/map_Italy.png
ADDED
Git LFS Details
|
data/map_figures/map_Japan.png
ADDED
Git LFS Details
|
data/map_figures/map_Korea.png
ADDED
Git LFS Details
|
data/map_figures/map_Latin World.png
ADDED
Git LFS Details
|
data/map_figures/map_Low countries.png
ADDED
Git LFS Details
|
data/map_figures/map_Muslim world.png
ADDED
Git LFS Details
|
data/map_figures/map_Netherlands.png
ADDED
Git LFS Details
|
data/map_figures/map_Nordic countries.png
ADDED
Git LFS Details
|
data/map_figures/map_Northern China.png
ADDED
Git LFS Details
|
data/map_figures/map_Northern France.png
ADDED
Git LFS Details
|
data/map_figures/map_Northern India.png
ADDED
Git LFS Details
|
data/map_figures/map_Northern Italy.png
ADDED
Git LFS Details
|
data/map_figures/map_Northern Japan.png
ADDED
Git LFS Details
|
data/map_figures/map_Northwestern Europe.png
ADDED
Git LFS Details
|
data/map_figures/map_Norway.png
ADDED
Git LFS Details
|
data/map_figures/map_Ottoman Turkey.png
ADDED
Git LFS Details
|
data/map_figures/map_Ottoman world.png
ADDED
Git LFS Details
|
data/map_figures/map_Persian world.png
ADDED
Git LFS Details
|
data/map_figures/map_Portugal.png
ADDED
Git LFS Details
|
data/map_figures/map_Slav world.png
ADDED
Git LFS Details
|
data/map_figures/map_South East Asia.png
ADDED
Git LFS Details
|
data/map_figures/map_Southern China.png
ADDED
Git LFS Details
|
data/map_figures/map_Southern France.png
ADDED
Git LFS Details
|
data/map_figures/map_Southern India.png
ADDED
Git LFS Details
|
data/map_figures/map_Southern Italy.png
ADDED
Git LFS Details
|
data/map_figures/map_Southern Japan.png
ADDED
Git LFS Details
|
data/map_figures/map_Southwestern Europe.png
ADDED
Git LFS Details
|
data/map_figures/map_Spain.png
ADDED
Git LFS Details
|
data/map_figures/map_Sweden.png
ADDED
Git LFS Details
|