Charles De Dampierre commited on
Commit
f144f21
1 Parent(s): 5251d02

add population files when it is here

Browse files
app.py CHANGED
@@ -1,58 +1,80 @@
1
  import streamlit as st
2
  from PIL import Image
 
3
 
4
- # Set the layout to wide mode
5
- # st.set_page_config(layout="wide")
6
-
7
- # Title and description
8
- st.title("Immaterial Index Data Dashboard")
9
-
10
- # Create a sidebar on the left
11
- st.sidebar.title("Select a Region")
12
-
13
- image_paths = {
14
- "Ancient_Med": "data/immaterial_index/figures_trends_R/results/ancient_med.png",
15
- "Byzance": "data/immaterial_index/figures_trends_R/results/byzance.png",
16
- "China": "data/immaterial_index/figures_trends_R/results/china.png",
17
- "China_North_South": "data/immaterial_index/figures_trends_R/results/china_north_south.png",
18
- "Europe_North_South": "data/immaterial_index/figures_trends_R/results/europe_north_south.png",
19
- "France": "data/immaterial_index/figures_trends_R/results/france.png",
20
- "Greek": "data/immaterial_index/figures_trends_R/results/greek.png",
21
- "Greek_Enriched": "data/immaterial_index/figures_trends_R/results/greek_enriched.png",
22
- "Greek_Italy": "data/immaterial_index/figures_trends_R/results/greek_italy.png",
23
- "Greek_World": "data/immaterial_index/figures_trends_R/results/greek_world.png",
24
- "India": "data/immaterial_index/figures_trends_R/results/india.png",
25
- "India_North_South": "data/immaterial_index/figures_trends_R/results/india_north_south.png",
26
- "Italy": "data/immaterial_index/figures_trends_R/results/italy.png",
27
- "Italy_Enriched": "data/immaterial_index/figures_trends_R/results/italy_enriched.png",
28
- "Japan": "data/immaterial_index/figures_trends_R/results/japan.png",
29
- "Japan_North_South": "data/immaterial_index/figures_trends_R/results/japan_north_south.png",
30
- "Latin_World": "data/immaterial_index/figures_trends_R/results/latin_world.png",
31
- "Low_Countries": "data/immaterial_index/figures_trends_R/results/low_countries.png",
32
- "MENA": "data/immaterial_index/figures_trends_R/results/mena.png",
33
- "MENA_Persian_Arab": "data/immaterial_index/figures_trends_R/results/mena_persian_arab.png",
34
- "Nordic_Countries": "data/immaterial_index/figures_trends_R/results/nordic_countries.png",
35
- "Slavic_World": "data/immaterial_index/figures_trends_R/results/slavic_world.png",
36
- "Spain": "data/immaterial_index/figures_trends_R/results/spain.png",
37
- "United_Kingdom": "data/immaterial_index/figures_trends_R/results/united_kingdom.png",
38
- "Western_Europe": "data/immaterial_index/figures_trends_R/results/western_europe.png",
39
- "Yangtze": "data/immaterial_index/figures_trends_R/results/yangtze.png",
 
 
 
 
 
 
 
 
 
 
 
 
40
  }
41
 
42
- # Get the region names (keys) from the image_paths dictionary
43
- regions = list(image_paths.keys())
 
44
 
45
  # Allow the user to select a region
46
  selected_region = st.sidebar.selectbox("Region:", regions)
47
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
- # Display the selected region's image and information
50
- if selected_region in image_paths:
51
- image = Image.open(image_paths[selected_region])
52
- st.image(image, caption=f"{selected_region} Overview", use_column_width=True)
53
- # Add more information or charts specific to the selected region here
54
  else:
55
- st.write("Please select a region from the sidebar on the left.")
56
-
57
- # You can add more content and visualizations for the selected region below
58
- # For example, charts, statistics, and other relevant data
 
1
  import streamlit as st
2
  from PIL import Image
3
+ import os
4
 
5
+
6
+ st.title("Our History in Data")
7
+
8
+ # Set the global index path
9
+ global_index_path = "data/immaterial_index/figures_trends_R/results"
10
+ unseen_index_path = (
11
+ "data/immaterial_index/figures_trends_R/figures_unseen/results_unseen"
12
+ )
13
+ unseen_capita_index_path = (
14
+ "data/immaterial_index/figures_trends_R/figures_unseen/results_unseen/per_capita"
15
+ )
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",
51
+ "population_index": f"{population_path}/Spain.png",
52
+ },
53
  }
54
 
55
+
56
+ # Get the region names (keys) from the index_paths dictionary
57
+ regions = list(index_paths.keys())
58
 
59
  # Allow the user to select a region
60
  selected_region = st.sidebar.selectbox("Region:", regions)
61
 
62
+ # Display the selected region's images vertically
63
+ if selected_region in index_paths:
64
+ for key, path in index_paths[selected_region].items():
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
+ st.image(Image.open(path), caption=key.capitalize(), use_column_width=True)
76
+ else:
77
+ st.write(f"File for {key.capitalize()} does not exist.")
78
+ # Add more information or charts specific to India here
 
79
  else:
80
+ st.write("Please select India as the region from the sidebar on the left.")
 
 
 
data/population/Arabic world.png ADDED

Git LFS Details

  • SHA256: 7dc71dd9901028b9ac8c03990b9fcaef05dbfbdab1ec4035dad49330180b8fb9
  • Pointer size: 130 Bytes
  • Size of remote file: 43.2 kB
data/population/Balkans.png ADDED

Git LFS Details

  • SHA256: a86edec7d431cd220b7a88abc40b522d3daa9ebc7d4a2b2760a7dff4b33a7589
  • Pointer size: 130 Bytes
  • Size of remote file: 39.9 kB
data/population/British Islands.png ADDED

Git LFS Details

  • SHA256: 6505a4cad73a7e784b838a33c1fc329693eb56b8337ddd42e66a77989a3aecec
  • Pointer size: 130 Bytes
  • Size of remote file: 36.2 kB
data/population/Central Europe.png ADDED

Git LFS Details

  • SHA256: 82ba29176b875589efc5cb1ba5c23320283a2fb320a5bf503a38b66f236edbfd
  • Pointer size: 130 Bytes
  • Size of remote file: 38 kB
data/population/Chinese world.png ADDED

Git LFS Details

  • SHA256: f8842e989c26007177fddb9b784557464518fbc8d7bbef25d932c76cf57550ca
  • Pointer size: 130 Bytes
  • Size of remote file: 42.9 kB
data/population/Eastern Europe.png ADDED

Git LFS Details

  • SHA256: 4af50be15d0bb53eba3e1d0671674334201f536cc5edc9e527c58329f9c457d6
  • Pointer size: 130 Bytes
  • Size of remote file: 38.5 kB
data/population/France.png ADDED

Git LFS Details

  • SHA256: 40990666b64ffe0a96841f39372ddb9cd8d44322bde37a91c125ce4f151d90c7
  • Pointer size: 130 Bytes
  • Size of remote file: 38.7 kB
data/population/German world.png ADDED

Git LFS Details

  • SHA256: a2ad9660f758938313d15776bca8b08ec4bbf8637d3e983941994acfbbedd661
  • Pointer size: 130 Bytes
  • Size of remote file: 37.7 kB
data/population/Greek World.png ADDED

Git LFS Details

  • SHA256: 14997a29e61b22672b7a3c5e7027442f486e6c72897d7eb13807cbb643a53ac9
  • Pointer size: 130 Bytes
  • Size of remote file: 40.3 kB
data/population/Indian world.png ADDED

Git LFS Details

  • SHA256: e9ae35689f11916721ae3c26814c289893d3f45c4e5c2635e0b5f9a2bcf374fd
  • Pointer size: 130 Bytes
  • Size of remote file: 36.9 kB
data/population/Italy.png ADDED

Git LFS Details

  • SHA256: 8131474e7fa385da0081fe5273269ce924e827877dd3eb0742ccbd30693391f2
  • Pointer size: 130 Bytes
  • Size of remote file: 44.2 kB
data/population/Japan.png ADDED

Git LFS Details

  • SHA256: 5c4b0e41739e47ecc8e5db3254c81ca3f948c11c2ec7691f8ea83c543aa57187
  • Pointer size: 130 Bytes
  • Size of remote file: 35.6 kB
data/population/Korea.png ADDED

Git LFS Details

  • SHA256: 794e55ded41b22f047152efa2083c3b541a1c2ec25e811572ae5b41453bfc389
  • Pointer size: 130 Bytes
  • Size of remote file: 36.1 kB
data/population/Latin World.png ADDED

Git LFS Details

  • SHA256: c2964ac5e0fefba2eb1220ccf08630f303b9ebc50e73f0facf6255851b91ffbe
  • Pointer size: 130 Bytes
  • Size of remote file: 39.1 kB
data/population/Low countries.png ADDED

Git LFS Details

  • SHA256: 4f248aa88f05aad11cb20f88b9988f6b91d125cbb6d2f63ec5aa3fdf49fee15d
  • Pointer size: 130 Bytes
  • Size of remote file: 35.7 kB
data/population/Muslim world.png ADDED

Git LFS Details

  • SHA256: 4b744ab027e743d3b2acd20132e58080b59e613214b8a0f041368467180b17ea
  • Pointer size: 130 Bytes
  • Size of remote file: 44.8 kB
data/population/Nordic countries.png ADDED

Git LFS Details

  • SHA256: 28935a51702062d0835dbf71545b18d61f0ab1b52932de959b2aba5b245ae800
  • Pointer size: 130 Bytes
  • Size of remote file: 40.2 kB
data/population/Ottoman Turkey.png ADDED

Git LFS Details

  • SHA256: 1ff51ac2b30264542632e37daa4ca1f2b6589701cc5fcb2e880512ca90d73e7e
  • Pointer size: 130 Bytes
  • Size of remote file: 49.6 kB
data/population/Persian world.png ADDED

Git LFS Details

  • SHA256: 68b5e45d118421516597222d3f6789703cde873d5b5ed2c23c3f599d78fc26ca
  • Pointer size: 130 Bytes
  • Size of remote file: 43.2 kB
data/population/Portugal.png ADDED

Git LFS Details

  • SHA256: 448de8e89747ee04d64cded56532ec4f7728f6550280f0b7101cf4422a3328ab
  • Pointer size: 130 Bytes
  • Size of remote file: 36.5 kB
data/population/Southwestern Europe.png ADDED

Git LFS Details

  • SHA256: 2f87518c71896c88b26946d821de28cfd9b54598ea8a9da8d3c8956318a2ba94
  • Pointer size: 130 Bytes
  • Size of remote file: 44.9 kB
data/population/Spain.png ADDED

Git LFS Details

  • SHA256: 6c0a93e94e7253f8c11eb98b095e76e2066cc71ba41bb026429b6847ce920640
  • Pointer size: 130 Bytes
  • Size of remote file: 40.9 kB
data/population/United Kingdom.png ADDED

Git LFS Details

  • SHA256: 0a355b319c52728c2cbe5fb1006235e4bb58519a313d8e50d8b3266d745da439
  • Pointer size: 130 Bytes
  • Size of remote file: 36.2 kB
data/population/Western Europe.png ADDED

Git LFS Details

  • SHA256: 37247c72fc1766775a391fbc0c0a07a6c2337e12f3a15ab1ae631491595712f3
  • Pointer size: 130 Bytes
  • Size of remote file: 40.6 kB
moving_pictures.sh CHANGED
@@ -2,3 +2,7 @@
2
  cp -r ../immaterial_index data/
3
  find data/immaterial_index -type f ! -name "*.png" -exec rm {} \;
4
 
 
 
 
 
 
2
  cp -r ../immaterial_index data/
3
  find data/immaterial_index -type f ! -name "*.png" -exec rm {} \;
4
 
5
+
6
+ cp -r ../figures_notebooks/figures/environment/population data/
7
+ find data/population -type f ! -name "*.png" -exec rm {} \;
8
+
todo.md CHANGED
@@ -1,7 +1,7 @@
1
  # ToDo List Cultura
2
 
3
- - [] Faire une commande qui bouge les fichiers dans le nouveau répo
4
- - [] Afficher la première région avec le plus d'informations possibles (GDP per capita, CPi, CPi per capita, unseen, unseen per capita, population)
5
  - []
6
  - []
7
  - []
 
1
  # ToDo List Cultura
2
 
3
+ - [x] Faire une commande qui bouge les fichiers dans le nouveau répo
4
+ - [x] Afficher la première région avec le plus d'informations possibles pour un Use case (GDP per capita, CPi, CPi per capita, unseen, unseen per capita, population)
5
  - []
6
  - []
7
  - []