Rahka commited on
Commit
0988abd
1 Parent(s): ce4f3b8

upload version 2

Browse files
Files changed (43) hide show
  1. .gitattributes +2 -0
  2. .streamlit/config.toml +7 -0
  3. README.md +10 -8
  4. data/example_prompts/example_prompts_inc.json +14 -0
  5. data/example_prompts/example_prompts_knowledge_hub.json +14 -0
  6. data/raw/authors_state_associations.json +108 -0
  7. data/raw/inc_df.csv +0 -0
  8. data/taxonomies/authors_filter.json +518 -0
  9. data/taxonomies/authors_taxonomy.json +520 -0
  10. data/taxonomies/draftcat_taxonomy_filter.json +64 -0
  11. data/taxonomies/organization.json +94 -0
  12. data/taxonomies/region.json +29 -0
  13. data/taxonomies/type_of_document.json +11 -0
  14. poetry.lock +0 -0
  15. pyproject.toml +27 -0
  16. requirements.txt +9 -0
  17. src/__init__py +0 -0
  18. src/application/.streamlit/config.toml +7 -0
  19. src/application/__init__.py +0 -0
  20. src/application/app.py +349 -0
  21. src/application/views/__init__.py +0 -0
  22. src/application/views/inc_page.py +453 -0
  23. src/application/views/knowledge_hub_page.py +470 -0
  24. src/document_store/__init__.py +0 -0
  25. src/document_store/get_index.py +17 -0
  26. src/rag/__init__.py +0 -0
  27. src/rag/pipeline.py +112 -0
  28. src/rag/prompt_templates/inc_template.txt +14 -0
  29. src/rag/prompt_templates/knowledge_hub.txt +14 -0
  30. src/settings.py +26 -0
  31. src/utils/__init__.py +0 -0
  32. src/utils/data.py +19 -0
  33. src/utils/writer.py +32 -0
  34. static/images/banner.jpg +3 -0
  35. static/images/choropleth_round_1.png +0 -0
  36. static/images/choropleth_round_2.png +0 -0
  37. static/images/choropleth_round_3.png +0 -0
  38. static/images/choropleth_round_4.png +0 -0
  39. static/images/logo.jpg +0 -0
  40. static/images/logo.png +0 -0
  41. static/images/rag.png +0 -0
  42. static/images/wordcloud.png +3 -0
  43. style/style.css +127 -0
.gitattributes ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ static/images/banner.jpg filter=lfs diff=lfs merge=lfs -text
2
+ static/images/wordcloud.png filter=lfs diff=lfs merge=lfs -text
.streamlit/config.toml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ [theme]
2
+ base = "light"
3
+ primaryColor = "#077493"
4
+ backgroundColor = "#FFFFFF"
5
+ secondaryBackgroundColor = "#F0F0F0"
6
+ textColor = "#31333F"
7
+ font = "sans serif"
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: "NegotiateAI"
3
- emoji: "🌍"
4
- colorFrom: "blue"
5
- colorTo: "green"
6
- sdk: "streamlit"
7
- sdk_version: 1.40.1
8
- short_description: Access information on INC and query country positions
9
  pinned: false
10
- ---
 
 
 
 
 
1
  ---
2
+ title: Giz Test Space
3
+ emoji: 📉
4
+ colorFrom: blue
5
+ colorTo: gray
6
+ sdk: streamlit
 
 
7
  pinned: false
8
+ sdk_version: 1.40.1
9
+ app_file: src/application/app.py
10
+ ---
11
+
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
data/example_prompts/example_prompts_inc.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "id": 1,
4
+ "question": "What is Malysia's position on chemicals and polymers of concern?"
5
+ },
6
+ {
7
+ "id": 2,
8
+ "question": "Compare Indias and New Zealands position on just transition."
9
+ },
10
+ {
11
+ "id": 3,
12
+ "question": "Do the selected countries prefer a top-down instrument?"
13
+ }
14
+ ]
data/example_prompts/example_prompts_knowledge_hub.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "id": 1,
4
+ "question": "What can be done to improve tracking and management of non-packaging plastic waste to support better environmental policies?"
5
+ },
6
+ {
7
+ "id": 2,
8
+ "question": "How can Pacific Island policy frameworks be improved to address the full life cycle impacts of plastics on the environment and public health?"
9
+ },
10
+ {
11
+ "id": 3,
12
+ "question": "Are industry-promoted solutions like recycling and burning plastic effective in addressing the plastics crisis?"
13
+ }
14
+ ]
data/raw/authors_state_associations.json ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "Asia-Pacific States": ["Australia", "Bangladesh", "Bhutan", "Brunei Darussalam", "Cambodia", "China",
3
+ "Fiji", "India", "Indonesia", "Japan", "Kazakhstan", "Kiribati", "Maldives",
4
+ "Mongolia", "Myanmar", "Nepal", "New Zealand", "Pakistan", "Papua New Guinea",
5
+ "Philippines", "Republic of Korea", "Samoa", "Singapore", "Solomon Islands",
6
+ "Sri Lanka", "Thailand", "Timor-Leste", "Tonga", "Tuvalu", "Vanuatu", "Vietnam"
7
+ ],
8
+ "European Union (EU) And Its 27 Member States": [
9
+ "Austria", "Belgium", "Bulgaria", "Croatia", "Cyprus", "Czech Republic", "Denmark",
10
+ "Estonia", "Finland", "France", "Germany", "Greece", "Hungary", "Ireland",
11
+ "Italy", "Latvia", "Lithuania", "Luxembourg", "Malta", "Netherlands",
12
+ "Poland", "Portugal", "Romania", "Slovakia", "Slovenia", "Spain", "Sweden"
13
+ ],
14
+ "Federated States Of Micronesia": [
15
+ "Micronesia", "Pohnpei", "Chuuk", "Yap", "Kosrae"
16
+ ],
17
+
18
+ "Gulf Cooperation Council": [
19
+ "Saudi Arabia", "United Arab Emirates", "Kuwait", "Qatar", "Bahrain", "Oman"
20
+ ],
21
+
22
+ "High Ambition Coalition": [
23
+ "Angola", "Benin", "Botswana", "Burkina Faso", "Cape Verde", "Chad", "Comoros", "Congo",
24
+ "Côte d'Ivoire", "Democratic Republic of the Congo", "Egypt", "Ethiopia", "Gabon", "Gambia",
25
+ "Ghana", "Guinea", "Guinea Bissau", "Kenya", "Liberia", "Madagascar", "Malawi", "Mali",
26
+ "Mauritania", "Morocco", "Mozambique", "Niger", "Nigeria", "Rwanda", "Senegal", "Seychelles",
27
+ "Sierra Leone", "Somalia", "Togo", "Zambia",
28
+
29
+
30
+ "Antigua and Barbuda", "Cuba", "Dominica", "Dominican Republic", "Grenada", "Jamaica",
31
+ "Saint Lucia", "Saint Vincent and the Grenadines", "Trinidad and Tobago",
32
+
33
+ "Canada", "Mexico", "United States",
34
+
35
+
36
+ "Belize", "Costa Rica", "El Salvador", "Guatemala", "Honduras", "Nicaragua", "Panama",
37
+
38
+
39
+ "Chile", "Colombia", "Ecuador", "Peru", "Venezuela",
40
+
41
+
42
+ "Bangladesh", "Bhutan", "Cambodia", "China", "India", "Japan", "Kazakhstan", "Maldives",
43
+ "Mongolia", "Nepal", "Pakistan", "Philippines", "South Korea", "Sri Lanka", "Thailand",
44
+ "Timor-Leste",
45
+
46
+
47
+ "Albania", "Armenia", "Austria", "Belgium", "Bulgaria", "Croatia", "Cyprus", "Czech Republic",
48
+ "Denmark", "Estonia", "European Commission", "Finland", "France", "Georgia", "Germany",
49
+ "Greece", "Ireland", "Italy", "Luxembourg", "Monaco", "Montenegro", "Netherlands",
50
+ "North Macedonia", "Norway", "Portugal", "Romania", "Serbia", "Slovakia", "Slovenia",
51
+ "Spain", "Sweden", "Switzerland", "United Kingdom",
52
+ "Bahrain", "Israel", "Jordan", "United Arab Emirates", "Australia", "Cook Islands", "Marshall Islands", "Micronesia", "Palau", "Papua New Guinea",
53
+ "Samoa", "Tonga", "Vanuatu"
54
+ ],
55
+
56
+ "Latin American And Caribbean Group (GRULAC)":[
57
+ "Argentina", "Bolivia", "Brazil", "Chile", "Colombia", "Ecuador", "Guyana", "Paraguay", "Peru", "Suriname", "Uruguay", "Venezuela",
58
+
59
+ "Belize", "Costa Rica", "El Salvador", "Guatemala", "Honduras", "Nicaragua", "Panama",
60
+
61
+
62
+ "Antigua and Barbuda", "Bahamas", "Barbados", "Cuba", "Dominica", "Dominican Republic", "Grenada", "Haiti", "Jamaica",
63
+ "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent and the Grenadines", "Trinidad and Tobago"],
64
+
65
+ "Like Minded Countries": [
66
+ "Algeria", "Argentina", "Belize", "Bolivia", "China", "Cuba", "Dominica", "Ecuador", "Egypt",
67
+ "El Salvador", "India", "Iran", "Iraq", "Malaysia", "Nicaragua", "Pakistan", "Philippines",
68
+ "Qatar", "Saudi Arabia", "Sri Lanka", "Sudan", "Syria", "Venezuela", "Vietnam", "Zimbabwe"
69
+ ],
70
+
71
+ "Pacific Small Island Developing States (PSIDS)": [
72
+ "Fiji", "Tuvalu", "Kiribati", "Marshall Islands", "Palau", "Nauru", "Samoa",
73
+ "Solomon Islands", "Tonga", "Vanuatu", "Papua New Guinea", "Micronesia", "Cook Islands",
74
+ "Niue", "Tokelau"
75
+ ],
76
+
77
+ "Alliance Of Small Island States (AOSIS)": [
78
+ "Antigua and Barbuda", "Bahamas", "Barbados", "Belize", "Comoros", "Cuba", "Dominica",
79
+ "Dominican Republic", "Fiji", "Grenada", "Guyana", "Haiti", "Jamaica", "Kiribati",
80
+ "Maldives", "Marshall Islands", "Mauritius", "Micronesia", "Nauru", "Palau",
81
+ "Papua New Guinea", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent and the Grenadines",
82
+ "Samoa", "Seychelles", "Singapore", "Solomon Islands", "Suriname", "Timor-Leste",
83
+ "Tonga", "Trinidad and Tobago", "Tuvalu", "Vanuatu"
84
+ ],
85
+
86
+ "The Group Of African States": [
87
+ "Algeria", "Angola", "Benin", "Botswana", "Burkina Faso", "Burundi", "Cabo Verde","Cameroon",
88
+ "Central African Republic", "Chad", "Comoros", "Congo", "Democratic Republic of the Congo",
89
+ "Djibouti", "Egypt", "Equatorial Guinea", "Eritrea", "Eswatini", "Ethiopia", "Gabon",
90
+ "Gambia", "Ghana", "Guinea", "Guinea-Bissau", "Ivory Coast", "Kenya", "Lesotho",
91
+ "Liberia", "Libya", "Madagascar", "Malawi", "Mali", "Mauritania", "Mauritius",
92
+ "Morocco", "Mozambique", "Namibia", "Niger", "Nigeria", "Rwanda", "Sao Tome and Principe",
93
+ "Senegal", "Seychelles", "Sierra Leone", "Somalia", "South Africa", "South Sudan","Sudan",
94
+ "Togo", "Tunisia", "Uganda", "United Republic of Tanzania", "Zambia", "Zimbabwe"
95
+ ],
96
+
97
+ "Western European And Other States": [
98
+ "Andorra", "Australia", "Austria", "Belgium", "Canada", "Croatia", "Cyprus",
99
+ "Czech Republic", "Denmark", "Estonia", "Finland", "France", "Germany", "Greece", "Iceland", "Ireland", "Italy", "Latvia",
100
+ "Lithuania", "Luxembourg", "Malta", "Monaco", "Netherlands", "New Zealand", "Norway", "Portugal",
101
+ "San Marino", "Slovakia", "Slovenia", "Spain", "Sweden", "Switzerland", "United Kingdom", "United States"
102
+ ],
103
+
104
+ "Coordinating Body on the Seas of East Asia (COBSEA)": [
105
+ "Cambodia", "China", "Indonesia", "Malaysia", "Philippines", "Republic of Korea (South Korea)",
106
+ "Singapore", "Thailand", "Viet Nam"
107
+ ]
108
+ }
data/raw/inc_df.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/taxonomies/authors_filter.json ADDED
@@ -0,0 +1,518 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "Members - Countries": [
3
+ "Algeria",
4
+ "Angola",
5
+ "Antigua And Barbuda",
6
+ "Argentina",
7
+ "Armenia",
8
+ "Australia",
9
+ "Azerbaijan",
10
+ "Bahrain",
11
+ "Bangladesh",
12
+ "Barbados",
13
+ "Benin",
14
+ "Bosnia And Herzegovina",
15
+ "Brazil",
16
+ "Burkina Faso",
17
+ "Cambodia",
18
+ "Cameroon",
19
+ "Canada",
20
+ "Chile",
21
+ "China",
22
+ "Colombia",
23
+ "Comoros",
24
+ "Cook Islands",
25
+ "Costa Rica",
26
+ "Cuba",
27
+ "Cote DIvoire",
28
+ "Democratic Republic Of The Congo",
29
+ "Dominican Republic",
30
+ "Ecuador",
31
+ "Egypt",
32
+ "El Salvador",
33
+ "Equatorial Guinea",
34
+ "Eritrea",
35
+ "Eswatini",
36
+ "Ethiopia",
37
+ "Fiji",
38
+ "France",
39
+ "Gabon",
40
+ "Gambia",
41
+ "Georgia",
42
+ "Germany",
43
+ "Ghana",
44
+ "Grenada",
45
+ "Guatemala",
46
+ "Guinea",
47
+ "Guinea Bissau",
48
+ "Honduras",
49
+ "Iceland",
50
+ "India",
51
+ "Indonesia",
52
+ "Iraq",
53
+ "Islamic Republic Of Iran",
54
+ "Israel",
55
+ "Italy",
56
+ "Jamaica",
57
+ "Japan",
58
+ "Jordan",
59
+ "Kazakhstan",
60
+ "Kenya",
61
+ "Kiribati",
62
+ "Kuwait",
63
+ "Libya",
64
+ "Madagascar",
65
+ "Malawi",
66
+ "Malaysia",
67
+ "Maldives",
68
+ "Mali",
69
+ "Marshall Islands",
70
+ "Mauritius",
71
+ "Mexico",
72
+ "Micronesia",
73
+ "Moldova",
74
+ "Monaco",
75
+ "Mongolia",
76
+ "Montenegro",
77
+ "Morocco",
78
+ "Nauru",
79
+ "Nepal",
80
+ "New Zealand",
81
+ "Niger",
82
+ "Nigeria",
83
+ "North Macedonia",
84
+ "Norway",
85
+ "Oman",
86
+ "Pakistan",
87
+ "Palau",
88
+ "Panama",
89
+ "Papua New Guinea",
90
+ "Paraguay",
91
+ "Peru",
92
+ "Philippines",
93
+ "Qatar",
94
+ "Republic Of Congo",
95
+ "Republic Of Korea",
96
+ "Republic Of Moldova",
97
+ "Romania",
98
+ "Russian Federation",
99
+ "Rwanda",
100
+ "Samoa",
101
+ "Saudi Arabia",
102
+ "Senegal",
103
+ "Seychelles",
104
+ "Sierra Leone",
105
+ "Singapore",
106
+ "Solomon Islands",
107
+ "Somalia",
108
+ "South Africa",
109
+ "Sri Lanka",
110
+ "State Of Palestine",
111
+ "Switzerland",
112
+ "Syrian Arab Republic",
113
+ "Thailand",
114
+ "Timor-Leste",
115
+ "Togo",
116
+ "Tonga",
117
+ "Trinidad And Tobago",
118
+ "Tunisia",
119
+ "Turkey",
120
+ "Tuvalu",
121
+ "Uganda",
122
+ "Ukraine",
123
+ "United Arab Emirates",
124
+ "United Kingdom Of Great Britain And Northern Ireland",
125
+ "United Republic Of Tanzania",
126
+ "United States Of America",
127
+ "Uruguay",
128
+ "Venezuela",
129
+ "Vietnam",
130
+ "Yemen",
131
+ "Zambia",
132
+ "Zimbabwe"
133
+ ],
134
+ "Members - International and Regional State Associations": [
135
+ "Asia-Pacific States",
136
+ "European Union (EU) And Its 27 Member States",
137
+ "Federated States Of Micronesia",
138
+ "Gulf Cooperation Council",
139
+ "High Ambition Coalition",
140
+ "Latin American And Caribbean Group (GRULAC)",
141
+ "Like Minded Countries",
142
+ "Pacific Small Island Developing States (PSIDS)",
143
+ "Alliance Of Small Island States (AOSIS)",
144
+ "The Federated States Of Micronesia",
145
+ "The Group Of African States",
146
+ "Western European And Other States",
147
+ "Coordinating Body on the Seas of East Asia (COBSEA)"
148
+ ],
149
+ "Intergovernmental Negotiation Committee": [
150
+ "Executive Secretary Of The INC",
151
+ "Intergovernmental Negotiation Committee"
152
+ ],
153
+ "Observers and Other Participants": [
154
+ "10YFP Secretariat (One Planet Network)",
155
+ "ABIPLAST - Brazilian Association Of The Plastic Industry",
156
+ "ACTS Organization",
157
+ "ASTM International (ASTM)",
158
+ "AWTAD Anti-Corruption Organization",
159
+ "Aaina",
160
+ "Action Et Education Pour Tous (AEPT)",
161
+ "Action On Smoking And Health (ASH)",
162
+ "Africa Climate And Environment Foundation (ACEF)",
163
+ "African Alliance For Health Research Economic Development",
164
+ "African Environmental Network",
165
+ "African Petroleum Producers\u2019 Organization (APPO)",
166
+ "Aguaclara",
167
+ "Alianza Basura Cero",
168
+ "Alianza Latinoamericana De Asociaciones De La Industria De Alimentos Y Bebidas (ALAIAB)",
169
+ "All-China Environment Federation",
170
+ "Alliance Panafricaine Multi-Acteurs Sur La Pollution Plastique",
171
+ "Alliance Pour Le Controle Du Tabac En Afrique (ACTA)",
172
+ "American Chemistry Council",
173
+ "American Fuel and Petrochemical Manufacturers (AFPM)",
174
+ "And Colectivo Jaguares De Nuestra Madre Tierra",
175
+ "Aotearoa Plastic Pollution Alliance (APPA)",
176
+ "Arctic Monitoring And Assessment Programme (AMAP)",
177
+ "Armenian Women For Health And Healthy Environment",
178
+ "Arnika",
179
+ "Asia Indigenous Peoples Pact And Indigenous Peoples",
180
+ "Asian Marine Conservation Association",
181
+ "Asociaci\u00f3n Ecol\u00f3gica Santo Tom\u00e1s",
182
+ "Asociaci\u00f3n Sustentar",
183
+ "Association For Promoting Sustainability In Campuses And Communities (APSCC)",
184
+ "Association For Rural Area Social Modification, Improvement And Nestling (ARASMIN)",
185
+ "Association For Supporting The SDGs For The United Nations",
186
+ "Association Institute Of Total Environment (INTEV)",
187
+ "Association Nationale Du Civisme",
188
+ "Association Of Leadership You-Lean",
189
+ "Association Of Plastic Recyclers",
190
+ "Association Of Solidarity Through Humanitarian Imperative Actions International (ASHIA)",
191
+ "Association Pour L'Integration Et La Developpement Durable Au Burundi",
192
+ "Australian Packaging Covenant Organisation (APCO)",
193
+ "Azul",
194
+ "BAN Toxics",
195
+ "BVRio",
196
+ "Barranquilla + 20",
197
+ "Basel Action Network (BAN)",
198
+ "Beijing Greenovation Institute For Public Welfare Development (GHub)",
199
+ "Brazilian Chemical Industry Association",
200
+ "Break Free From Plastic",
201
+ "Breathe Free Detroit",
202
+ "Bridgers Association Cameroon",
203
+ "Bureau Of International Recycling",
204
+ "Business And Industry Major Group Presented By World Business Council For Sustainable Development",
205
+ "Business Coalition For A Global Plastics Treaty Convened By The Ellen MacArthur Foundation And WWF, In Collaboration With Aligned Businesses And Financial Institutions, And Supported By NGO Partners",
206
+ "CAIRPLAS, C\u00e1mara Argentina De La Industria De Reciclados Plasticos",
207
+ "CDP",
208
+ "CEMPRE Colombia \u2013 Compromiso Empresarial Para El Reciclaje",
209
+ "CESTA",
210
+ "Carrizo Comecrudo Tribe",
211
+ "Center For Biological Diversity",
212
+ "Center For Coalfield Justice",
213
+ "Center For International Environmental Law (CIEL)",
214
+ "Center For International Law And Governance",
215
+ "Center For Islamic Studies Of Universitas Nasional, Jakarta",
216
+ "Center For Oceanic Awareness, Research, And Education (COARE)",
217
+ "Center For Public Health And Environmental Development (CEPHED)",
218
+ "Centre De Recherche Et D\u2019Education Pour Le D\u00e9veloppement (CREPD)",
219
+ "Centre D\u2019Accompagnement Des Alternatives Locales De D\u00e9veloppement (Caald)",
220
+ "Centre For Environmental Justice",
221
+ "Centre For Human Rights And Climate Change Research",
222
+ "Centre For Science And Environment (CSE)",
223
+ "Centre International De Droit Compar\u00e9 De L\u2019environnement",
224
+ "Centre International De Droit Compar\u00e9 De L\u2019environnement",
225
+ "Chemical And Allied Industries\u2019 Association (CAIA)",
226
+ "Chia Funkuin Foundation",
227
+ "Children And Youth Major Group (CYMG)",
228
+ "Children\u2019s Environmental Health Foundation",
229
+ "China Biodiversity Conservation And Green Development Foundation (CBCGDF)",
230
+ "Circular Economy For Flexible Packaging In Europe Initiative (CEFLEX)",
231
+ "Citeo",
232
+ "Citizen Consumer And Civic Action Group (CAG)",
233
+ "Civil Society And Rights Holder Coalition",
234
+ "Civil Society Organizations In Africa",
235
+ "Civil Society Organizations In Asia Pacific",
236
+ "Civil Society Organizations In Latin America",
237
+ "Co-habiter",
238
+ "Comision Centro Americana",
239
+ "Comit\u00e9 National Contre Le Tabagisme",
240
+ "Community Action Against Plastic Waste (CAPws)",
241
+ "Congregations Of St Joseph",
242
+ "Consciente Colectivo",
243
+ "Consumer Goods Forum",
244
+ "Consumers International",
245
+ "Contact Group 1",
246
+ "Contact Group 2",
247
+ "Convention On Biological Diversity (CBD)",
248
+ "Corporate Accountability",
249
+ "Council For Scientific And Industrial Research",
250
+ "C\u00e1mara De La Industria Qu\u00edmica Y Petroqu\u00edmica (CIQyP\u00ae), Miembro Del Concejo Internacional De Asociaciones Qu\u00edmicas (ICCA) Y EURECA",
251
+ "Danimer Scientific",
252
+ "EDANA And INDA",
253
+ "EPS Branchen-en Del Af Plastindustrien (Denmark)",
254
+ "EPS Industry Alliance",
255
+ "EURECA",
256
+ "Earth Day",
257
+ "Earth Law Center",
258
+ "Ecoplas",
259
+ "Ecoproject Partnership",
260
+ "Ellen MacArthur Foundation",
261
+ "Endocrine Society",
262
+ "Engineers Australia",
263
+ "Entidad Especializada En Pl\u00e1sticos Y Medio Ambiente Para Una Econom\u00eda Circular (ECOPLAS)",
264
+ "Entidades Unidas Reafirmando La Econom\u00eda Circular En Argentina (EURECA)",
265
+ "Environmental And Social Development Organization (ESDO)",
266
+ "Environmental Coalition On Standards (ECOS)",
267
+ "Environmental Development Association (FASEEL)",
268
+ "Environmental Investigation Agency",
269
+ "European Bioplastics (EUBP)",
270
+ "European Manufacturers Of EPS",
271
+ "European Manufacturers Of Expanded Polystyrene (EUMEPS)",
272
+ "Expanded Polystyrene Australia",
273
+ "Fauna and Flora International",
274
+ "Fauna and Flora International And Zoological Society Of London (ZSL)",
275
+ "Fenceline Watch",
276
+ "First Modern Agro Tools Common Initiative Group ( FI.MO.AT.C.I.G)",
277
+ "Fondation De La Mer",
278
+ "Food And Agriculture Organization Of The United Nations (FAO)",
279
+ "Food And Livestock Initiative (FLI Asbl)",
280
+ "Forum On Trade, Environment and The SDGs (TESS)",
281
+ "Foundation Of Fokus Nexus Tiga (Nexus3 Foundation)",
282
+ "French Water Partnership (Partenariat Fran\u00e7ais Pour L\u2019eau)",
283
+ "Friends World Committee For Consultation (FWCC)",
284
+ "Fronteras Comunes",
285
+ "Fundacion Avina",
286
+ "Fundaci\u00f3n Ambiente Y Recursos Naturales",
287
+ "Fundaci\u00f3n Interamericana Del Coraz\u00f3n (FIC)",
288
+ "GRID-Arendal",
289
+ "Galapagos Conservation Trust",
290
+ "Gallifrey Foundation",
291
+ "Geneva Cities Hub (GCH)",
292
+ "Gerakan Indonesia Diet Kantong Plastik (GIDKP) - The Indonesia Plastic Bag Diet Movement",
293
+ "Global Alliance For Incinerator Alternatives (GAIA)",
294
+ "Global Alliance On Health And Pollution (GAHP)",
295
+ "Global Cement And Concrete Association",
296
+ "Global Council For Science And The Environment (GCSE)",
297
+ "Global Plastics Policy Centre, University Of Portsmouth",
298
+ "Global Youth Coalition On Plastic Pollution (GYCPP)",
299
+ "Green Africa Youth Organization",
300
+ "Greenpeace International",
301
+ "GroundWork South Africa (GroundWorkSA)",
302
+ "Haitelmex Foundation",
303
+ "Hasiru Dala In Collaboration With Eleven Other Civil Society Organizations",
304
+ "Health And Environment Justice Support (HEJSupport)",
305
+ "Health Care Without Harm (HCWH)",
306
+ "Healthy Hospitals Project - PHS",
307
+ "Human Rights Watch",
308
+ "ICLEI - Local Governments For Sustainability",
309
+ "India Institute For Critical Action Centre In Movement (CACIM)",
310
+ "India Water Foundation",
311
+ "India Youth For Society",
312
+ "Indigenous Caucus",
313
+ "Indigenous Peoples And Their Communities Major Group",
314
+ "Indigenous Peoples Representatives",
315
+ "Indonesian Centre For Environmental Law (ICEL)",
316
+ "Innovazing Vision",
317
+ "Institute For Sustainable Development And Research (ISDR)",
318
+ "Integrated Strategies Forum",
319
+ "Interamerican Heart Foundation",
320
+ "International Air Transport Association",
321
+ "International Alliance Of Waste Pickers (IAWP)",
322
+ "International Alliance Of Waste-pickers",
323
+ "International Atomic Energy Agency (IAEA)",
324
+ "International Center Of Comparative Environmental Law (CIDCE)",
325
+ "International Centre For Environmental Education And Community Development (ICENECDEV)",
326
+ "International Chamber Of Commerce (ICC)",
327
+ "International Council Of Beverages Associations (ICBA)",
328
+ "International Council Of Chemical Associations (ICCA)",
329
+ "International Knowledge Hub Against Plastic Pollution (IKHAPP)",
330
+ "International Labour Office",
331
+ "International Labour Organization (ILO)",
332
+ "International Maritime Organization (IMO)",
333
+ "International Medical Crisis Response Alliance (IMCRA)",
334
+ "International Movement For Advancement Of Education Culture Social and Economic Development (IMAESED)",
335
+ "International Network For Bamboo And Rattan (INBAR)",
336
+ "International Organization For Standardization (ISO)",
337
+ "International Pollutants Elimination Network (IPEN)",
338
+ "International Science Council (ISC)",
339
+ "International Society Of Doctors For The Environment (ISDE)",
340
+ "International Solid Waste Association (ISWA)",
341
+ "International Trade Union Confederation (ITUC)",
342
+ "International Union For Conservation Of Nature And Natural Resources (IUCN)",
343
+ "Inuit Circumpolar Council (ICC)",
344
+ "Japan Clean Ocean Material Alliance (CLOMA)",
345
+ "King Abdullah Petroleum Studies And Research Center (KAPSARC)",
346
+ "Krityanand UNESCO Club, Jamshedpur",
347
+ "La Grande Puissance De Dieu",
348
+ "Latin American Organizations - Alianza Basura Cero",
349
+ "Ligue Camerounaise Des Droits De L'Homme",
350
+ "Litter4tokens South Africa NPO",
351
+ "Local And Subnational Government Working Group",
352
+ "Local Authorities",
353
+ "Loop",
354
+ "Major Alliance Education Centre (MAEC)",
355
+ "Major Group For Children And Youth",
356
+ "MarViva",
357
+ "Marine Ecosystems Protected Areas (MEPA) Trust",
358
+ "Members Of Microplastics Working Group",
359
+ "Mexican Network Of Ecological Action",
360
+ "Minderoo Foundation",
361
+ "Ministry Of Environment And Wildlife - Southwest State Of Somalia",
362
+ "Moms Clean Air Force",
363
+ "Multifaith Action Group On Pollution",
364
+ "NGO Major Group",
365
+ "NORCE On Behalf Of The North Atlantic Microplastic Centre (NAMC)",
366
+ "National Old Folks Of Liberia (NOFOL)",
367
+ "National Retail Association (NRA)",
368
+ "Natural Resources Defense Council (NRDC)",
369
+ "Neste",
370
+ "Nexus For Health, Environment, And Development (Nexus3) Foundation",
371
+ "Nipe Fagio",
372
+ "No Balloon Release Australia",
373
+ "No More Butts",
374
+ "Norwegian Academy Of International Law (NAIL)",
375
+ "Norwegian Institute For Water Research",
376
+ "Norwegian Institute For Water Research (NIVA)",
377
+ "Norwegian Research Centre (NORCE)",
378
+ "ONG Jeunesse Active De Guin\u00e9e (JAG)",
379
+ "Occidental Arts And Ecology Center (OAEC)",
380
+ "Ocean Conservancy",
381
+ "Ocean Recovery Alliance",
382
+ "Ocean. Now",
383
+ "OceanCare",
384
+ "OceanCare Global Ghost Gear Initiative",
385
+ "Office Of The UN High Commissioner For Human Rights (OHCHR)",
386
+ "OpenOceans Global",
387
+ "Organisation For Economic Co-operation And Development (OECD)",
388
+ "Organization Of Arab Petroleum Exporting Countries (OAPEC)",
389
+ "Organization Of The Petroleum Exporting Countries (OPEC)",
390
+ "Our Sea Of East Asia Network (OSEAN)",
391
+ "Out For Sustainability",
392
+ "PCX Solutions (HOPEx Environment Group, Inc)",
393
+ "Pacific Environment And Resources Center (Pacific Environment)",
394
+ "Pan American Neuroendocrine Society",
395
+ "Partnerships For Change",
396
+ "Paryavaran Mitra",
397
+ "PetStar",
398
+ "Planeteer Alliance And Captain Planet Foundation",
399
+ "Plastalliance - Alliance Plasturgie Et Composites Du Futur",
400
+ "Plastic Change",
401
+ "Plastic Free Foundation",
402
+ "Plastic Free Future",
403
+ "Plastic Oceans Australasia",
404
+ "Plastic Pollution Coalition",
405
+ "Plastics Federation Of South Africa",
406
+ "Plastics Industry Association",
407
+ "PlasticsEurope",
408
+ "Plasticulture",
409
+ "ProDelphinus",
410
+ "Public Services International (PSI)",
411
+ "RAPAL",
412
+ "Rapal Uruguay",
413
+ "Recycling Partnership",
414
+ "Red De Acci\u00f3n Ecol\u00f3gica De M\u00e9xico",
415
+ "Red De Acci\u00f3n Por Los Derechos Ambientales",
416
+ "Red Mexicana De Accion Ecologica (Accion Ecologica)",
417
+ "Regions4 Sustainable Development",
418
+ "Reloop Platform",
419
+ "Resolve",
420
+ "Royal Society Of Chemistry",
421
+ "Samo Foundation",
422
+ "Sanid Organization For Relief And Development (SORD)",
423
+ "Sasakawa Peace Foundation",
424
+ "Saudi Green Building Forum",
425
+ "Sciaena",
426
+ "Scientists\u2019 Coalition For An Effective Plastics Treaty (Scientists\u2019 Coalition)",
427
+ "Secretariat For The Pacific Regional Environment Programme",
428
+ "Secretariat Of The Basel, Rotterdam And Stockholm Conventions",
429
+ "Secretariat Of The Convention On The Protection And Use Of Transboundary Watercourses And International Lakes (Water Convention)",
430
+ "Secretariat Of The Pacific Regional Environment Programme (SPREP)",
431
+ "Secretariat Of The WHO Framework Convention On Tobacco Control",
432
+ "Secretariats Of The Basel, Rotterdam And Stockholm Conventions",
433
+ "Shenzhen Zero Waste",
434
+ "Smoke Free Partnership, A Member Of The Stop Tobacco Pollution Alliance (STPA)",
435
+ "Sociedad Peruana De Derecho Ambiental (Peruvian Society Of Environmental Law)",
436
+ "Somali Sustainable Development Organisation (SOSDO)",
437
+ "Somali Youth Development Foundation (SYDF)",
438
+ "South Asia Cooperative Environment Programme",
439
+ "Stand Earth",
440
+ "Stevenson Holistic Care Foundation (SHCF)",
441
+ "Stichting CEFLEX \u2013 The Circular Economy For Flexible Packaging Initiative",
442
+ "Stiftelsen Stockholm International Water Institute",
443
+ "Styrenics Industry",
444
+ "Sustainable Coastlines Charitable Trust",
445
+ "Sustainable Environment Food And Agriculture Initiative",
446
+ "Swedish Society For Nature Conservation (SSNC)",
447
+ "Systemiq",
448
+ "T/A Plastics SA",
449
+ "Take 3 For The Sea",
450
+ "Taller Ecologista",
451
+ "Tangaroa Blue Foundation",
452
+ "Tearfund",
453
+ "Thailand",
454
+ "The Australian Marine Conservation Society",
455
+ "The Center For Oceanic Awareness, Research, And Education (COARE)",
456
+ "The Descendants Project",
457
+ "The Fletcher School",
458
+ "The Global Organization For PHA (GO!PHA)",
459
+ "The Nature Conservancy",
460
+ "The Ocean Cleanup",
461
+ "The Pew Charitable Trusts",
462
+ "The Sea Cleaners",
463
+ "The Society Of Native Nations",
464
+ "The Terracycle Foundation",
465
+ "The Vinyl Institute",
466
+ "Toxics Link",
467
+ "Toxisphera, Mingas Por El Mar",
468
+ "Trade Unions Major Group",
469
+ "Trash Hero World",
470
+ "Trash4tokens NGO",
471
+ "Tufts University",
472
+ "U.S. Council For International Business (USCIB)",
473
+ "UN Women\u2019s Major Group",
474
+ "UNESCO Association - Guwahati",
475
+ "UNESCO Chair For Ocean Sustainability",
476
+ "Udisha",
477
+ "Unbutton Fashion",
478
+ "Unions Workers And Wastepickers",
479
+ "United Nations Association of Spain and the Government of Catalonia",
480
+ "United Nations Conference On Trade And Development (UNCTAD)",
481
+ "United Nations Development Programme (UNDP)",
482
+ "United Nations Economic Commission For Europe (UNECE)",
483
+ "United Nations Global Compact",
484
+ "United Nations Human Settlements Programme (UN-Habitat)",
485
+ "United Nations Industrial Development Organization (UNIDO)",
486
+ "United Nations Institute For Training And Research (UNITAR)",
487
+ "United Nations Office For Disaster Risk Reduction (UNDRR)",
488
+ "United Nations Office On Drugs And Crime (UNODC)",
489
+ "United States Council For Business (USCIB)",
490
+ "University Of Wollongong",
491
+ "Unplastify",
492
+ "Verra",
493
+ "Vital Strategies",
494
+ "WWF-Australia",
495
+ "Waste Free Oceans",
496
+ "Whole World",
497
+ "William Ruto",
498
+ "Women In Informal Employment Globalizing And Organizing (WIEGO)",
499
+ "Women Working Group",
500
+ "Wonjin Institute For Occupational And Environmental Health (WIOEH)",
501
+ "Workers And Trade Unions Major Group",
502
+ "Working Group On Marine Litter (WGML) Of Coordinating Body On The Seas Of East Asia (COBSEA)",
503
+ "World Against Single Use Plastic (WASUP)",
504
+ "World Business Council For Sustainable Development (WBCSD)",
505
+ "World Economic Forum And Global Plastic Action Partnership (GPAP)",
506
+ "World Health Organisation",
507
+ "World Health Organization, Including The Secretariat Of The WHO Framework Convention On Tobacco Control",
508
+ "World Plastics Council (WPC)",
509
+ "World Welfare Association",
510
+ "World Wide Fund For Nature (WWF)",
511
+ "Wrap",
512
+ "Youth Alive Uganda",
513
+ "Youth Focus Group",
514
+ "Yunus Environment Hub",
515
+ "Zero Waste Europe",
516
+ "Zoological Society Of London (ZSL)"
517
+ ]
518
+ }
data/taxonomies/authors_taxonomy.json ADDED
@@ -0,0 +1,520 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "Members": {
3
+ "Countries": [
4
+ "Algeria",
5
+ "Angola",
6
+ "Antigua And Barbuda",
7
+ "Argentina",
8
+ "Armenia",
9
+ "Australia",
10
+ "Azerbaijan",
11
+ "Bahrain",
12
+ "Bangladesh",
13
+ "Barbados",
14
+ "Benin",
15
+ "Bosnia And Herzegovina",
16
+ "Brazil",
17
+ "Burkina Faso",
18
+ "Cambodia",
19
+ "Cameroon",
20
+ "Canada",
21
+ "Chile",
22
+ "China",
23
+ "Colombia",
24
+ "Comoros",
25
+ "Cook Islands",
26
+ "Costa Rica",
27
+ "Cuba",
28
+ "Cote DIvoire",
29
+ "Democratic Republic Of The Congo",
30
+ "Dominican Republic",
31
+ "Ecuador",
32
+ "Egypt",
33
+ "El Salvador",
34
+ "Equatorial Guinea",
35
+ "Eritrea",
36
+ "Eswatini",
37
+ "Ethiopia",
38
+ "Fiji",
39
+ "France",
40
+ "Gabon",
41
+ "Gambia",
42
+ "Georgia",
43
+ "Germany",
44
+ "Ghana",
45
+ "Grenada",
46
+ "Guatemala",
47
+ "Guinea",
48
+ "Guinea Bissau",
49
+ "Honduras",
50
+ "Iceland",
51
+ "India",
52
+ "Indonesia",
53
+ "Iraq",
54
+ "Islamic Republic Of Iran",
55
+ "Israel",
56
+ "Italy",
57
+ "Jamaica",
58
+ "Japan",
59
+ "Jordan",
60
+ "Kazakhstan",
61
+ "Kenya",
62
+ "Kiribati",
63
+ "Kuwait",
64
+ "Libya",
65
+ "Madagascar",
66
+ "Malawi",
67
+ "Malaysia",
68
+ "Maldives",
69
+ "Mali",
70
+ "Marshall Islands",
71
+ "Mauritius",
72
+ "Mexico",
73
+ "Micronesia",
74
+ "Moldova",
75
+ "Monaco",
76
+ "Mongolia",
77
+ "Montenegro",
78
+ "Morocco",
79
+ "Nauru",
80
+ "Nepal",
81
+ "New Zealand",
82
+ "Niger",
83
+ "Nigeria",
84
+ "North Macedonia",
85
+ "Norway",
86
+ "Oman",
87
+ "Pakistan",
88
+ "Palau",
89
+ "Panama",
90
+ "Papua New Guinea",
91
+ "Paraguay",
92
+ "Peru",
93
+ "Philippines",
94
+ "Qatar",
95
+ "Republic Of Congo",
96
+ "Republic Of Korea",
97
+ "Republic Of Moldova",
98
+ "Romania",
99
+ "Russian Federation",
100
+ "Rwanda",
101
+ "Samoa",
102
+ "Saudi Arabia",
103
+ "Senegal",
104
+ "Seychelles",
105
+ "Sierra Leone",
106
+ "Singapore",
107
+ "Solomon Islands",
108
+ "Somalia",
109
+ "South Africa",
110
+ "Sri Lanka",
111
+ "State Of Palestine",
112
+ "Switzerland",
113
+ "Syrian Arab Republic",
114
+ "Thailand",
115
+ "Timor-Leste",
116
+ "Togo",
117
+ "Tonga",
118
+ "Trinidad And Tobago",
119
+ "Tunisia",
120
+ "Turkey",
121
+ "Tuvalu",
122
+ "Uganda",
123
+ "Ukraine",
124
+ "United Arab Emirates",
125
+ "United Kingdom Of Great Britain And Northern Ireland",
126
+ "United Republic Of Tanzania",
127
+ "United States Of America",
128
+ "Uruguay",
129
+ "Venezuela",
130
+ "Vietnam",
131
+ "Yemen",
132
+ "Zambia",
133
+ "Zimbabwe"
134
+ ],
135
+ "International and Regional State Associations": [
136
+ "Asia-Pacific States",
137
+ "European Union (EU) And Its 27 Member States",
138
+ "Federated States Of Micronesia",
139
+ "Gulf Cooperation Council",
140
+ "High Ambition Coalition",
141
+ "Latin American And Caribbean Group (GRULAC)",
142
+ "Like Minded Countries",
143
+ "Pacific Small Island Developing States (PSIDS)",
144
+ "Alliance Of Small Island States (AOSIS)",
145
+ "The Federated States Of Micronesia",
146
+ "The Group Of African States",
147
+ "Western European And Other States",
148
+ "Coordinating Body on the Seas of East Asia (COBSEA)"
149
+ ]
150
+ },
151
+ "Intergovernmental Negotiation Committee": [
152
+ "Executive Secretary Of The INC",
153
+ "Intergovernmental Negotiation Committee"
154
+ ],
155
+ "Observers and Other Participants": [
156
+ "10YFP Secretariat (One Planet Network)",
157
+ "ABIPLAST - Brazilian Association Of The Plastic Industry",
158
+ "ACTS Organization",
159
+ "ASTM International (ASTM)",
160
+ "AWTAD Anti-Corruption Organization",
161
+ "Aaina",
162
+ "Action Et Education Pour Tous (AEPT)",
163
+ "Action On Smoking And Health (ASH)",
164
+ "Africa Climate And Environment Foundation (ACEF)",
165
+ "African Alliance For Health Research Economic Development",
166
+ "African Environmental Network",
167
+ "African Petroleum Producers\u2019 Organization (APPO)",
168
+ "Aguaclara",
169
+ "Alianza Basura Cero",
170
+ "Alianza Latinoamericana De Asociaciones De La Industria De Alimentos Y Bebidas (ALAIAB)",
171
+ "All-China Environment Federation",
172
+ "Alliance Panafricaine Multi-Acteurs Sur La Pollution Plastique",
173
+ "Alliance Pour Le Controle Du Tabac En Afrique (ACTA)",
174
+ "American Chemistry Council",
175
+ "American Fuel and Petrochemical Manufacturers (AFPM)",
176
+ "And Colectivo Jaguares De Nuestra Madre Tierra",
177
+ "Aotearoa Plastic Pollution Alliance (APPA)",
178
+ "Arctic Monitoring And Assessment Programme (AMAP)",
179
+ "Armenian Women For Health And Healthy Environment",
180
+ "Arnika",
181
+ "Asia Indigenous Peoples Pact And Indigenous Peoples",
182
+ "Asian Marine Conservation Association",
183
+ "Asociaci\u00f3n Ecol\u00f3gica Santo Tom\u00e1s",
184
+ "Asociaci\u00f3n Sustentar",
185
+ "Association For Promoting Sustainability In Campuses And Communities (APSCC)",
186
+ "Association For Rural Area Social Modification, Improvement And Nestling (ARASMIN)",
187
+ "Association For Supporting The SDGs For The United Nations",
188
+ "Association Institute Of Total Environment (INTEV)",
189
+ "Association Nationale Du Civisme",
190
+ "Association Of Leadership You-Lean",
191
+ "Association Of Plastic Recyclers",
192
+ "Association Of Solidarity Through Humanitarian Imperative Actions International (ASHIA)",
193
+ "Association Pour L'Integration Et La Developpement Durable Au Burundi",
194
+ "Australian Packaging Covenant Organisation (APCO)",
195
+ "Azul",
196
+ "BAN Toxics",
197
+ "BVRio",
198
+ "Barranquilla + 20",
199
+ "Basel Action Network (BAN)",
200
+ "Beijing Greenovation Institute For Public Welfare Development (GHub)",
201
+ "Brazilian Chemical Industry Association",
202
+ "Break Free From Plastic",
203
+ "Breathe Free Detroit",
204
+ "Bridgers Association Cameroon",
205
+ "Bureau Of International Recycling",
206
+ "Business And Industry Major Group Presented By World Business Council For Sustainable Development",
207
+ "Business Coalition For A Global Plastics Treaty Convened By The Ellen MacArthur Foundation And WWF, In Collaboration With Aligned Businesses And Financial Institutions, And Supported By NGO Partners",
208
+ "CAIRPLAS, C\u00e1mara Argentina De La Industria De Reciclados Plasticos",
209
+ "CDP",
210
+ "CEMPRE Colombia \u2013 Compromiso Empresarial Para El Reciclaje",
211
+ "CESTA",
212
+ "Carrizo Comecrudo Tribe",
213
+ "Center For Biological Diversity",
214
+ "Center For Coalfield Justice",
215
+ "Center For International Environmental Law (CIEL)",
216
+ "Center For International Law And Governance",
217
+ "Center For Islamic Studies Of Universitas Nasional, Jakarta",
218
+ "Center For Oceanic Awareness, Research, And Education (COARE)",
219
+ "Center For Public Health And Environmental Development (CEPHED)",
220
+ "Centre De Recherche Et D\u2019Education Pour Le D\u00e9veloppement (CREPD)",
221
+ "Centre D\u2019Accompagnement Des Alternatives Locales De D\u00e9veloppement (Caald)",
222
+ "Centre For Environmental Justice",
223
+ "Centre For Human Rights And Climate Change Research",
224
+ "Centre For Science And Environment (CSE)",
225
+ "Centre International De Droit Compar\u00e9 De L\u2019environnement",
226
+ "Centre International De Droit Compar\u00e9 De L\u2019environnement",
227
+ "Chemical And Allied Industries\u2019 Association (CAIA)",
228
+ "Chia Funkuin Foundation",
229
+ "Children And Youth Major Group (CYMG)",
230
+ "Children\u2019s Environmental Health Foundation",
231
+ "China Biodiversity Conservation And Green Development Foundation (CBCGDF)",
232
+ "Circular Economy For Flexible Packaging In Europe Initiative (CEFLEX)",
233
+ "Citeo",
234
+ "Citizen Consumer And Civic Action Group (CAG)",
235
+ "Civil Society And Rights Holder Coalition",
236
+ "Civil Society Organizations In Africa",
237
+ "Civil Society Organizations In Asia Pacific",
238
+ "Civil Society Organizations In Latin America",
239
+ "Co-habiter",
240
+ "Comision Centro Americana",
241
+ "Comit\u00e9 National Contre Le Tabagisme",
242
+ "Community Action Against Plastic Waste (CAPws)",
243
+ "Congregations Of St Joseph",
244
+ "Consciente Colectivo",
245
+ "Consumer Goods Forum",
246
+ "Consumers International",
247
+ "Contact Group 1",
248
+ "Contact Group 2",
249
+ "Convention On Biological Diversity (CBD)",
250
+ "Corporate Accountability",
251
+ "Council For Scientific And Industrial Research",
252
+ "C\u00e1mara De La Industria Qu\u00edmica Y Petroqu\u00edmica (CIQyP\u00ae), Miembro Del Concejo Internacional De Asociaciones Qu\u00edmicas (ICCA) Y EURECA",
253
+ "Danimer Scientific",
254
+ "EDANA And INDA",
255
+ "EPS Branchen-en Del Af Plastindustrien (Denmark)",
256
+ "EPS Industry Alliance",
257
+ "EURECA",
258
+ "Earth Day",
259
+ "Earth Law Center",
260
+ "Ecoplas",
261
+ "Ecoproject Partnership",
262
+ "Ellen MacArthur Foundation",
263
+ "Endocrine Society",
264
+ "Engineers Australia",
265
+ "Entidad Especializada En Pl\u00e1sticos Y Medio Ambiente Para Una Econom\u00eda Circular (ECOPLAS)",
266
+ "Entidades Unidas Reafirmando La Econom\u00eda Circular En Argentina (EURECA)",
267
+ "Environmental And Social Development Organization (ESDO)",
268
+ "Environmental Coalition On Standards (ECOS)",
269
+ "Environmental Development Association (FASEEL)",
270
+ "Environmental Investigation Agency",
271
+ "European Bioplastics (EUBP)",
272
+ "European Manufacturers Of EPS",
273
+ "European Manufacturers Of Expanded Polystyrene (EUMEPS)",
274
+ "Expanded Polystyrene Australia",
275
+ "Fauna and Flora International",
276
+ "Fauna and Flora International And Zoological Society Of London (ZSL)",
277
+ "Fenceline Watch",
278
+ "First Modern Agro Tools Common Initiative Group ( FI.MO.AT.C.I.G)",
279
+ "Fondation De La Mer",
280
+ "Food And Agriculture Organization Of The United Nations (FAO)",
281
+ "Food And Livestock Initiative (FLI Asbl)",
282
+ "Forum On Trade, Environment and The SDGs (TESS)",
283
+ "Foundation Of Fokus Nexus Tiga (Nexus3 Foundation)",
284
+ "French Water Partnership (Partenariat Fran\u00e7ais Pour L\u2019eau)",
285
+ "Friends World Committee For Consultation (FWCC)",
286
+ "Fronteras Comunes",
287
+ "Fundacion Avina",
288
+ "Fundaci\u00f3n Ambiente Y Recursos Naturales",
289
+ "Fundaci\u00f3n Interamericana Del Coraz\u00f3n (FIC)",
290
+ "GRID-Arendal",
291
+ "Galapagos Conservation Trust",
292
+ "Gallifrey Foundation",
293
+ "Geneva Cities Hub (GCH)",
294
+ "Gerakan Indonesia Diet Kantong Plastik (GIDKP) - The Indonesia Plastic Bag Diet Movement",
295
+ "Global Alliance For Incinerator Alternatives (GAIA)",
296
+ "Global Alliance On Health And Pollution (GAHP)",
297
+ "Global Cement And Concrete Association",
298
+ "Global Council For Science And The Environment (GCSE)",
299
+ "Global Plastics Policy Centre, University Of Portsmouth",
300
+ "Global Youth Coalition On Plastic Pollution (GYCPP)",
301
+ "Green Africa Youth Organization",
302
+ "Greenpeace International",
303
+ "GroundWork South Africa (GroundWorkSA)",
304
+ "Haitelmex Foundation",
305
+ "Hasiru Dala In Collaboration With Eleven Other Civil Society Organizations",
306
+ "Health And Environment Justice Support (HEJSupport)",
307
+ "Health Care Without Harm (HCWH)",
308
+ "Healthy Hospitals Project - PHS",
309
+ "Human Rights Watch",
310
+ "ICLEI - Local Governments For Sustainability",
311
+ "India Institute For Critical Action Centre In Movement (CACIM)",
312
+ "India Water Foundation",
313
+ "India Youth For Society",
314
+ "Indigenous Caucus",
315
+ "Indigenous Peoples And Their Communities Major Group",
316
+ "Indigenous Peoples Representatives",
317
+ "Indonesian Centre For Environmental Law (ICEL)",
318
+ "Innovazing Vision",
319
+ "Institute For Sustainable Development And Research (ISDR)",
320
+ "Integrated Strategies Forum",
321
+ "Interamerican Heart Foundation",
322
+ "International Air Transport Association",
323
+ "International Alliance Of Waste Pickers (IAWP)",
324
+ "International Alliance Of Waste-pickers",
325
+ "International Atomic Energy Agency (IAEA)",
326
+ "International Center Of Comparative Environmental Law (CIDCE)",
327
+ "International Centre For Environmental Education And Community Development (ICENECDEV)",
328
+ "International Chamber Of Commerce (ICC)",
329
+ "International Council Of Beverages Associations (ICBA)",
330
+ "International Council Of Chemical Associations (ICCA)",
331
+ "International Knowledge Hub Against Plastic Pollution (IKHAPP)",
332
+ "International Labour Office",
333
+ "International Labour Organization (ILO)",
334
+ "International Maritime Organization (IMO)",
335
+ "International Medical Crisis Response Alliance (IMCRA)",
336
+ "International Movement For Advancement Of Education Culture Social and Economic Development (IMAESED)",
337
+ "International Network For Bamboo And Rattan (INBAR)",
338
+ "International Organization For Standardization (ISO)",
339
+ "International Pollutants Elimination Network (IPEN)",
340
+ "International Science Council (ISC)",
341
+ "International Society Of Doctors For The Environment (ISDE)",
342
+ "International Solid Waste Association (ISWA)",
343
+ "International Trade Union Confederation (ITUC)",
344
+ "International Union For Conservation Of Nature And Natural Resources (IUCN)",
345
+ "Inuit Circumpolar Council (ICC)",
346
+ "Japan Clean Ocean Material Alliance (CLOMA)",
347
+ "King Abdullah Petroleum Studies And Research Center (KAPSARC)",
348
+ "Krityanand UNESCO Club, Jamshedpur",
349
+ "La Grande Puissance De Dieu",
350
+ "Latin American Organizations - Alianza Basura Cero",
351
+ "Ligue Camerounaise Des Droits De L'Homme",
352
+ "Litter4tokens South Africa NPO",
353
+ "Local And Subnational Government Working Group",
354
+ "Local Authorities",
355
+ "Loop",
356
+ "Major Alliance Education Centre (MAEC)",
357
+ "Major Group For Children And Youth",
358
+ "MarViva",
359
+ "Marine Ecosystems Protected Areas (MEPA) Trust",
360
+ "Members Of Microplastics Working Group",
361
+ "Mexican Network Of Ecological Action",
362
+ "Minderoo Foundation",
363
+ "Ministry Of Environment And Wildlife - Southwest State Of Somalia",
364
+ "Moms Clean Air Force",
365
+ "Multifaith Action Group On Pollution",
366
+ "NGO Major Group",
367
+ "NORCE On Behalf Of The North Atlantic Microplastic Centre (NAMC)",
368
+ "National Old Folks Of Liberia (NOFOL)",
369
+ "National Retail Association (NRA)",
370
+ "Natural Resources Defense Council (NRDC)",
371
+ "Neste",
372
+ "Nexus For Health, Environment, And Development (Nexus3) Foundation",
373
+ "Nipe Fagio",
374
+ "No Balloon Release Australia",
375
+ "No More Butts",
376
+ "Norwegian Academy Of International Law (NAIL)",
377
+ "Norwegian Institute For Water Research",
378
+ "Norwegian Institute For Water Research (NIVA)",
379
+ "Norwegian Research Centre (NORCE)",
380
+ "ONG Jeunesse Active De Guin\u00e9e (JAG)",
381
+ "Occidental Arts And Ecology Center (OAEC)",
382
+ "Ocean Conservancy",
383
+ "Ocean Recovery Alliance",
384
+ "Ocean. Now",
385
+ "OceanCare",
386
+ "OceanCare Global Ghost Gear Initiative",
387
+ "Office Of The UN High Commissioner For Human Rights (OHCHR)",
388
+ "OpenOceans Global",
389
+ "Organisation For Economic Co-operation And Development (OECD)",
390
+ "Organization Of Arab Petroleum Exporting Countries (OAPEC)",
391
+ "Organization Of The Petroleum Exporting Countries (OPEC)",
392
+ "Our Sea Of East Asia Network (OSEAN)",
393
+ "Out For Sustainability",
394
+ "PCX Solutions (HOPEx Environment Group, Inc)",
395
+ "Pacific Environment And Resources Center (Pacific Environment)",
396
+ "Pan American Neuroendocrine Society",
397
+ "Partnerships For Change",
398
+ "Paryavaran Mitra",
399
+ "PetStar",
400
+ "Planeteer Alliance And Captain Planet Foundation",
401
+ "Plastalliance - Alliance Plasturgie Et Composites Du Futur",
402
+ "Plastic Change",
403
+ "Plastic Free Foundation",
404
+ "Plastic Free Future",
405
+ "Plastic Oceans Australasia",
406
+ "Plastic Pollution Coalition",
407
+ "Plastics Federation Of South Africa",
408
+ "Plastics Industry Association",
409
+ "PlasticsEurope",
410
+ "Plasticulture",
411
+ "ProDelphinus",
412
+ "Public Services International (PSI)",
413
+ "RAPAL",
414
+ "Rapal Uruguay",
415
+ "Recycling Partnership",
416
+ "Red De Acci\u00f3n Ecol\u00f3gica De M\u00e9xico",
417
+ "Red De Acci\u00f3n Por Los Derechos Ambientales",
418
+ "Red Mexicana De Accion Ecologica (Accion Ecologica)",
419
+ "Regions4 Sustainable Development",
420
+ "Reloop Platform",
421
+ "Resolve",
422
+ "Royal Society Of Chemistry",
423
+ "Samo Foundation",
424
+ "Sanid Organization For Relief And Development (SORD)",
425
+ "Sasakawa Peace Foundation",
426
+ "Saudi Green Building Forum",
427
+ "Sciaena",
428
+ "Scientists\u2019 Coalition For An Effective Plastics Treaty (Scientists\u2019 Coalition)",
429
+ "Secretariat For The Pacific Regional Environment Programme",
430
+ "Secretariat Of The Basel, Rotterdam And Stockholm Conventions",
431
+ "Secretariat Of The Convention On The Protection And Use Of Transboundary Watercourses And International Lakes (Water Convention)",
432
+ "Secretariat Of The Pacific Regional Environment Programme (SPREP)",
433
+ "Secretariat Of The WHO Framework Convention On Tobacco Control",
434
+ "Secretariats Of The Basel, Rotterdam And Stockholm Conventions",
435
+ "Shenzhen Zero Waste",
436
+ "Smoke Free Partnership, A Member Of The Stop Tobacco Pollution Alliance (STPA)",
437
+ "Sociedad Peruana De Derecho Ambiental (Peruvian Society Of Environmental Law)",
438
+ "Somali Sustainable Development Organisation (SOSDO)",
439
+ "Somali Youth Development Foundation (SYDF)",
440
+ "South Asia Cooperative Environment Programme",
441
+ "Stand Earth",
442
+ "Stevenson Holistic Care Foundation (SHCF)",
443
+ "Stichting CEFLEX \u2013 The Circular Economy For Flexible Packaging Initiative",
444
+ "Stiftelsen Stockholm International Water Institute",
445
+ "Styrenics Industry",
446
+ "Sustainable Coastlines Charitable Trust",
447
+ "Sustainable Environment Food And Agriculture Initiative",
448
+ "Swedish Society For Nature Conservation (SSNC)",
449
+ "Systemiq",
450
+ "T/A Plastics SA",
451
+ "Take 3 For The Sea",
452
+ "Taller Ecologista",
453
+ "Tangaroa Blue Foundation",
454
+ "Tearfund",
455
+ "Thailand",
456
+ "The Australian Marine Conservation Society",
457
+ "The Center For Oceanic Awareness, Research, And Education (COARE)",
458
+ "The Descendants Project",
459
+ "The Fletcher School",
460
+ "The Global Organization For PHA (GO!PHA)",
461
+ "The Nature Conservancy",
462
+ "The Ocean Cleanup",
463
+ "The Pew Charitable Trusts",
464
+ "The Sea Cleaners",
465
+ "The Society Of Native Nations",
466
+ "The Terracycle Foundation",
467
+ "The Vinyl Institute",
468
+ "Toxics Link",
469
+ "Toxisphera, Mingas Por El Mar",
470
+ "Trade Unions Major Group",
471
+ "Trash Hero World",
472
+ "Trash4tokens NGO",
473
+ "Tufts University",
474
+ "U.S. Council For International Business (USCIB)",
475
+ "UN Women\u2019s Major Group",
476
+ "UNESCO Association - Guwahati",
477
+ "UNESCO Chair For Ocean Sustainability",
478
+ "Udisha",
479
+ "Unbutton Fashion",
480
+ "Unions Workers And Wastepickers",
481
+ "United Nations Association of Spain and the Government of Catalonia",
482
+ "United Nations Conference On Trade And Development (UNCTAD)",
483
+ "United Nations Development Programme (UNDP)",
484
+ "United Nations Economic Commission For Europe (UNECE)",
485
+ "United Nations Global Compact",
486
+ "United Nations Human Settlements Programme (UN-Habitat)",
487
+ "United Nations Industrial Development Organization (UNIDO)",
488
+ "United Nations Institute For Training And Research (UNITAR)",
489
+ "United Nations Office For Disaster Risk Reduction (UNDRR)",
490
+ "United Nations Office On Drugs And Crime (UNODC)",
491
+ "United States Council For Business (USCIB)",
492
+ "University Of Wollongong",
493
+ "Unplastify",
494
+ "Verra",
495
+ "Vital Strategies",
496
+ "WWF-Australia",
497
+ "Waste Free Oceans",
498
+ "Whole World",
499
+ "William Ruto",
500
+ "Women In Informal Employment Globalizing And Organizing (WIEGO)",
501
+ "Women Working Group",
502
+ "Wonjin Institute For Occupational And Environmental Health (WIOEH)",
503
+ "Workers And Trade Unions Major Group",
504
+ "Working Group On Marine Litter (WGML) Of Coordinating Body On The Seas Of East Asia (COBSEA)",
505
+ "World Against Single Use Plastic (WASUP)",
506
+ "World Business Council For Sustainable Development (WBCSD)",
507
+ "World Economic Forum And Global Plastic Action Partnership (GPAP)",
508
+ "World Health Organisation",
509
+ "World Health Organization, Including The Secretariat Of The WHO Framework Convention On Tobacco Control",
510
+ "World Plastics Council (WPC)",
511
+ "World Welfare Association",
512
+ "World Wide Fund For Nature (WWF)",
513
+ "Wrap",
514
+ "Youth Alive Uganda",
515
+ "Youth Focus Group",
516
+ "Yunus Environment Hub",
517
+ "Zero Waste Europe",
518
+ "Zoological Society Of London (ZSL)"
519
+ ]
520
+ }
data/taxonomies/draftcat_taxonomy_filter.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "Part I": [ "part i: general",
3
+ "preamble",
4
+ "objective",
5
+ "definition",
6
+ "principles",
7
+ "scope"
8
+ ],
9
+ "Part II": ["part ii: general",
10
+ "primary plastic polymers",
11
+ "chemicals and polymers of concern",
12
+ "problematic and avoidable plastic products, including short-lived and single-use plastic products and intentionally added microplastics",
13
+ "problematic and avoidable plastic products, including short-lived and single-use plastic products",
14
+ "intentionally added microplastics",
15
+ "micro- and nanoplastics",
16
+ "exemptions available to a party upon request",
17
+ "dedicated programmes of work",
18
+ "product design, composition and performance",
19
+ "product design and performance",
20
+ "reduce, reuse, refill and repair of plastics and plastic products",
21
+ "use of recycled plastic contents",
22
+ "alternative plastics and plastic products",
23
+ "non-plastic substitutes",
24
+ "extended producer responsibility",
25
+ "emissions and releases of plastic throughout its life cycle",
26
+ "waste management",
27
+ "waste management",
28
+ "fishing gear",
29
+ "trade in listed chemicals, polymers and products, and in plastic waste",
30
+ "trade in listed chemicals, polymers and products",
31
+ "transboundary movement of plastic waste",
32
+ "existing plastic pollution, including in the marine environment",
33
+ "just transition",
34
+ "transparency, tracking, monitoring and labeling",
35
+ "overarching provision related to part ii"
36
+ ],
37
+ "Part III": ["part iii: general",
38
+ "financing",
39
+ "capacity-building, technical assistance and technology transfer"
40
+ ],
41
+ "Part IV": ["part iv: general",
42
+ "national plans",
43
+ "implementation and compliance",
44
+ "reporting on progress",
45
+ "periodic assessment and monitoring of the progress of implementation of the instrument* and effectiveness evaluation",
46
+ "assessment and monitoring",
47
+ "effectiveness evaluation",
48
+ "review of chemicals and polymers of concern, microplastics and problematic and avoidable products",
49
+ "international cooperation",
50
+ "information exchange",
51
+ "awareness-raising, education and research",
52
+ "stakeholder engagement",
53
+ "health aspects"
54
+ ],
55
+ "Part V": [ "part v: general",
56
+ "institutional arrangements",
57
+ "governing body",
58
+ "subsidiary bodies",
59
+ "secretariat"
60
+ ],
61
+ "Part VI": [ "part vi: general",
62
+ "final provisions"
63
+ ]
64
+ }
data/taxonomies/organization.json ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ "5 Gyres",
3
+ "ACAT",
4
+ "Acat",
5
+ "Annuals of Global Health",
6
+ "Arnika",
7
+ "As You Sow",
8
+ "BEUC",
9
+ "BRS Convention",
10
+ "BUND",
11
+ "Bennington College",
12
+ "Berkeley Lab",
13
+ "Beyond Plastics",
14
+ "Break free from Plastics",
15
+ "CIEL",
16
+ "COBSEA",
17
+ "Center for Climate Integrity",
18
+ "Changing markets",
19
+ "Client Earth",
20
+ "Deutsche Umwelthilfe",
21
+ "EIP",
22
+ "EcoWaste Coalition",
23
+ "Ecos",
24
+ "Ecoton",
25
+ "Ellen MacArthur Foundation",
26
+ "Endocrine Society",
27
+ "Environmental Investigation Agency",
28
+ "Environmental investigation agency",
29
+ "Eunomia",
30
+ "European Environment Agency",
31
+ "European Environmental Bureau",
32
+ "Exit Plastic DE",
33
+ "Fair Circularity Initiative",
34
+ "FairFin",
35
+ "Fracktracker",
36
+ "GAIA",
37
+ "GIZ",
38
+ "Genossenschaft Deutscher Brunnen",
39
+ "Global Green and Healthy Hospitals",
40
+ "Global Plastics Policy Centre",
41
+ "Greenpeace",
42
+ "Grid Arendal",
43
+ "Health Care Without Harm",
44
+ "HealthCare Without Harm",
45
+ "Heinrich Boell Stiftung",
46
+ "Human Rights Watch",
47
+ "IKHAPP",
48
+ "IPEN",
49
+ "ISWA",
50
+ "ISWA WOW",
51
+ "IUCN",
52
+ "International Pellet Watch",
53
+ "Lund University",
54
+ "Microplastics Research Group",
55
+ "Minderoo Foundation",
56
+ "Moore Institute for Plastic Pollution Research",
57
+ "NIVA",
58
+ "NTN",
59
+ "National Institutes of Health",
60
+ "National Toxics Network",
61
+ "Nexus3",
62
+ "Nordic Council of Ministers",
63
+ "OECD",
64
+ "Ocean Care",
65
+ "Oceana",
66
+ "PGL",
67
+ "PlastChem",
68
+ "Prevent Waste Alliance",
69
+ "Profundo",
70
+ "Quaker United Nations Office",
71
+ "RSVP",
72
+ "Reloop",
73
+ "Rethink Plastics Alliance",
74
+ "Science",
75
+ "Seas at Risk",
76
+ "Serious Business",
77
+ "Shenzen Zero Waste",
78
+ "Surfrider",
79
+ "Systemiq",
80
+ "Tearfund",
81
+ "The Last Beach Cleanup",
82
+ "UN",
83
+ "UN-Habitat",
84
+ "UNEP",
85
+ "University of Gothenburg",
86
+ "WBCSD",
87
+ "WCEL",
88
+ "WECF",
89
+ "WWF",
90
+ "We choose reuse",
91
+ "World Resource Institute",
92
+ "Zero Waste Europe",
93
+ "Zero Waste Germany"
94
+ ]
data/taxonomies/region.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ "ASEAN",
3
+ "Africa",
4
+ "Arctic",
5
+ "Australia",
6
+ "Canada",
7
+ "China",
8
+ "East Africa",
9
+ "East Asia",
10
+ "Europe",
11
+ "European Union",
12
+ "Germany",
13
+ "Ghana",
14
+ "Global",
15
+ "Indonesia",
16
+ "Islands",
17
+ "Malaysia",
18
+ "Netherlands",
19
+ "Norway",
20
+ "Pacific",
21
+ "Russia",
22
+ "SIDS",
23
+ "Scandinavia",
24
+ "South America",
25
+ "Southeast Asia",
26
+ "Turkey",
27
+ "United States of America",
28
+ "Vietnam"
29
+ ]
data/taxonomies/type_of_document.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ "Book",
3
+ "Case Study",
4
+ "Fact Sheet",
5
+ "Peer-reviewed",
6
+ "Policy Brief",
7
+ "Report",
8
+ "Think Piece",
9
+ "Toolbox",
10
+ "Working Paper"
11
+ ]
poetry.lock ADDED
The diff for this file is too large to render. See raw diff
 
pyproject.toml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [tool.poetry]
2
+ name = "negotiateai2"
3
+ version = "0.1.0"
4
+ description = ""
5
+ authors = ["Rahkakavee Baskaran <rahkakavee.baskaran@cause-effect.io>"]
6
+ readme = "README.md"
7
+
8
+ [tool.poetry.dependencies]
9
+ python = "^3.11"
10
+ haystack-ai = "^2.6.1"
11
+ qdrant-haystack = "^6.0.0"
12
+ pydantic-settings = "^2.6.0"
13
+ qdrant-client = "^1.12.0"
14
+ langchain = "^0.3.4"
15
+ langchain-community = "^0.3.3"
16
+ sentence-transformers = "^3.2.1"
17
+ streamlit = "^1.39.0"
18
+ pypdf = "^5.1.0"
19
+ extra-streamlit-components = "^0.1.71"
20
+ streamlit-lottie = "^0.0.5"
21
+ pdfminer-six = "^20240706"
22
+ plotly = "^5.24.1"
23
+
24
+
25
+ [build-system]
26
+ requires = ["poetry-core"]
27
+ build-backend = "poetry.core.masonry.api"
requirements.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ haystack-ai==2.6.1
2
+ qdrant-haystack==6.0.0
3
+ pydantic-settings==2.6.0
4
+ qdrant-client==1.12.0
5
+ sentence-transformers==3.2.1
6
+ streamlit==1.39.0
7
+ pypdf==5.1.0
8
+ extra-streamlit-components==0.1.71
9
+ plotly==5.24.0
src/__init__py ADDED
File without changes
src/application/.streamlit/config.toml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ [theme]
2
+ base = "light"
3
+ primaryColor = "#077493"
4
+ backgroundColor = "#FFFFFF"
5
+ secondaryBackgroundColor = "#F0F0F0"
6
+ textColor = "#31333F"
7
+ font = "sans serif"
src/application/__init__.py ADDED
File without changes
src/application/app.py ADDED
@@ -0,0 +1,349 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import base64
2
+ from pathlib import Path
3
+
4
+ import extra_streamlit_components as stx
5
+ import streamlit as st
6
+
7
+ from src.application.views.inc_page import init_inc_page
8
+ from src.application.views.knowledge_hub_page import init_knowledge_hub_page
9
+ from src.utils.data import load_css
10
+
11
+
12
+ # Function to load and encode the image
13
+ def get_base64_image(image_path):
14
+ with open(image_path, "rb") as img_file:
15
+ return base64.b64encode(img_file.read()).decode()
16
+
17
+
18
+ @st.cache_data
19
+ def load_css_style() -> None:
20
+ load_css(Path(__file__).parent.parent.parent / "style" / "style.css")
21
+
22
+
23
+ banner = get_base64_image("static/images/banner.jpg")
24
+
25
+ st.set_page_config(layout="wide")
26
+
27
+ # Load the custom CSS
28
+ load_css_style()
29
+
30
+
31
+ if "active_tab" not in st.session_state:
32
+ st.session_state.active_tab = "1"
33
+
34
+
35
+ # Function to change active tab
36
+ def set_active_tab(tab_id):
37
+ st.session_state.active_tab = tab_id
38
+
39
+
40
+ # Use session state to set the default tab in the tab bar
41
+ chosen_id = stx.tab_bar(
42
+ data=[
43
+ stx.TabBarItemData(
44
+ id=1,
45
+ title="Welcome to NegotiateAI",
46
+ description="",
47
+ ),
48
+ stx.TabBarItemData(
49
+ id=2,
50
+ title="Interactive Treaty Assistant",
51
+ description="",
52
+ ),
53
+ stx.TabBarItemData(
54
+ id=3,
55
+ title="Plastic Knowledge Hub",
56
+ description="",
57
+ ),
58
+ ],
59
+ default=st.session_state.active_tab, # Use the active tab from session state
60
+ )
61
+
62
+
63
+ if chosen_id == "1":
64
+ # Load the map
65
+ st.html(
66
+ """
67
+ <style>
68
+ /* Container holding the image and the text */
69
+ .container {
70
+ position: relative;
71
+ text-align: center;
72
+ }
73
+
74
+ </style>
75
+ </style>
76
+ """
77
+ )
78
+
79
+ st.markdown(
80
+ f"""
81
+ <div class="container">
82
+ <img src="data:image/png;base64,{banner}" alt="Image" style="width:100%; opacity: 0.9;">
83
+ </div>
84
+ """,
85
+ unsafe_allow_html=True,
86
+ )
87
+
88
+ st.write("")
89
+ st.write("")
90
+
91
+ st.header("About")
92
+
93
+ about_col_1, _, _ = st.columns(spec=[1, 0.1, 1])
94
+
95
+ with about_col_1:
96
+ st.markdown(
97
+ """
98
+ <p class="description">
99
+ The NegotiateAI app is designed to streamline access to critical information on the UN Plastic Treaty Negotiations to develop a legally binding instrument on plastic pollution, including the marine environment. It offers a comprehensive, centralized database of documents submitted by member countries available here, along with an extensive collection of supporting resources, including reports, research papers, and policy briefs. You can find more information
100
+ about the NegotiateAI project on our <a href="https://www.blog-datalab.com/home/negotiateai/">website</a>.
101
+ """,
102
+ unsafe_allow_html=True,
103
+ )
104
+
105
+ st.markdown(
106
+ """<hr style="height:2px;border:none;color:#077493;background-color:#077493;" /> """,
107
+ unsafe_allow_html=True,
108
+ )
109
+
110
+ inc_col_description, _, knowledge_hub_description = st.columns(spec=[1, 0.1, 1])
111
+ # Buttons to trigger tab switch
112
+ with inc_col_description:
113
+ st.header("Interactive Treaty Assistant")
114
+ st.markdown(
115
+ """
116
+ <p class="description">
117
+ The Interactive Treaty Assistant simplifies the search and analysis of documents by INC members, enabling negotiators and other interested parties to quickly pinpoint crucial information. With an intuitive interface, The Interactive Treaty Assistant supports treaty-specific queries and provides direct links to relevant documents for deeper research.
118
+ </p>
119
+ """,
120
+ unsafe_allow_html=True,
121
+ )
122
+
123
+ if st.button(
124
+ "INC Plastic Pollution Country Profile Analysis",
125
+ icon=":material/exit_to_app:",
126
+ type="primary",
127
+ ):
128
+ set_active_tab("2")
129
+ st.rerun()
130
+
131
+ with knowledge_hub_description:
132
+ st.header("Plastic Knowledge Hub")
133
+
134
+ st.markdown(
135
+ """
136
+ <p class="description"> Amid growing global efforts to curb plastic pollution, the Plastic Knowledge Hub provides access to a vast array of resources, including reports, policy briefs, and research papers from NGOs, research institutions, and other organizations. These documents offer insights from local to global perspectives, helping users understand and address the complexities of plastic waste.
137
+ </p>
138
+ """,
139
+ unsafe_allow_html=True,
140
+ )
141
+
142
+ if st.button(
143
+ "Knowledge Hub App", icon=":material/exit_to_app:", type="primary"
144
+ ):
145
+ set_active_tab("3")
146
+ st.rerun()
147
+
148
+ st.write("\n")
149
+ st.write("\n")
150
+
151
+ inc_col_data, _, knowledge_hub_data = st.columns(spec=[1, 0.1, 1])
152
+
153
+ with inc_col_data:
154
+ st.subheader("Treaty Assistant Data")
155
+ st.markdown(
156
+ """
157
+ <p class="description">
158
+ The dataset is based on official documents available on the <a href="https://www.unep.org/inc-plastic-pollution"> INC homepage </a>. It includes all documents submitted by INC members, such as written statements and in-session documents, from both individual members and groups of states, covering all sessions held to date. Documents submitted by observers are currently not included but may be added in the future. We welcome feedback to continuously improve both the app and the dataset.
159
+ </p>
160
+ """,
161
+ unsafe_allow_html=True,
162
+ )
163
+
164
+ st.caption(
165
+ """<p style="font-size: 18px; font-weight: bold; color: black"> Data Insight: Number of Submissions by Country </p>""",
166
+ help="The map shows the number of submissions by countries. Darker blue represent a higher number of submissions.",
167
+ unsafe_allow_html=True,
168
+ )
169
+
170
+ round_visualization = st.segmented_control(
171
+ "Select Round",
172
+ ["Round 1", "Round 2", "Round 3", "Round 4"],
173
+ selection_mode="single",
174
+ default="Round 4",
175
+ )
176
+
177
+ if round_visualization == "Round 1":
178
+ st.image("static/images/choropleth_round_1.png")
179
+ if round_visualization == "Round 2":
180
+ st.image("static/images/choropleth_round_2.png")
181
+ if round_visualization == "Round 3":
182
+ st.image("static/images/choropleth_round_3.png")
183
+ if round_visualization == "Round 4":
184
+ st.image("static/images/choropleth_round_4.png")
185
+
186
+ st.write(
187
+ """<p class="description">
188
+ <i>You can go to full screen by hovering over the maps and clicking the full screen icons.<i></p>""",
189
+ unsafe_allow_html=True,
190
+ )
191
+
192
+ st.write(
193
+ """<p class="description">
194
+ Source: <a href='https://www.unep.org/inc-plastic-pollution' target='_blank'>
195
+ Intergovernmental Negotiating Committee on Plastic Pollution</a><br> </p>""",
196
+ unsafe_allow_html=True,
197
+ )
198
+
199
+ with knowledge_hub_data:
200
+ st.subheader("Knowledge Hub Data")
201
+
202
+ st.markdown(
203
+ """
204
+ <p class="description"> The dataset has been manually selected and is not exhaustive. It represents a curated selection of documents deemed relevant but does not guarantee completeness. The database includes reports, policy briefs, and research papers from NGOs, research institutions, and organizations such as UNEP. The database can be expanded at any time. We welcome contributions and feedback to continuously improve both the app and the dataset. </p>
205
+ """,
206
+ unsafe_allow_html=True,
207
+ )
208
+
209
+ st.caption(
210
+ """<p style="font-size: 18px; font-weight: bold; color: black"> Data Insight: Most common Keywords in the Knowledge Hub</p>""",
211
+ help="The word cloud shows the most common keywords extracted from the documents based on a sample",
212
+ unsafe_allow_html=True,
213
+ )
214
+
215
+ st.markdown(
216
+ """
217
+ <p style="font-size: 15px; text-align: justify;">The size and color of each word reflects the frequency of its occurrence as a keyword. These keywords were extracted using a natural language processing model. For each document, the five most commonly occurring words were considered. </p>
218
+ """,
219
+ unsafe_allow_html=True,
220
+ )
221
+
222
+ st.image("static/images/wordcloud.png")
223
+
224
+ st.write(
225
+ """<p class="description">
226
+ <i>You can go to full screen by hovering over the wordcloud and clicking the full screen icon.<i></p>""",
227
+ unsafe_allow_html=True,
228
+ )
229
+
230
+ st.markdown(
231
+ """<hr style="height:2px;border:none;color:#077493;background-color:#077493;" /> """,
232
+ unsafe_allow_html=True,
233
+ )
234
+
235
+ un_description, _, vision = st.columns(spec=[1, 0.1, 1])
236
+
237
+ with un_description:
238
+ st.header("Intergovernmental Negotiating Committee (INC) on Plastic Pollution")
239
+ st.markdown(
240
+ """<p font-size: 10px> Plastic Pollution | Legally Binding Treaty | UN-Negotiations</p>""",
241
+ unsafe_allow_html=True,
242
+ )
243
+ st.markdown(
244
+ """
245
+ <p class="description"> The United Nations have embarked on a monumental task: Negotiating a legally binding agreement to tackle the global plastic pollution crisis. The goal is to establish a robust framework that ends plastic pollution and promotes sustainable production and consumption of plastic worldwide. Representatives from around 180 countries are involved in this extensive process. The resolution to elaborate such a legally binding instrument was adopted in March 2022 at the UN Environment Assembly (UNEA-5.2) in Nairobi. In April 2024, the fourth of five negotiation rounds was completed, bringing the finalization of a comprehensive draft closer to the fifth and final session in November 2024 in Busan, Republic of Korea. <br> <br>
246
+ The urgent need for a treaty arises from the estimated 4.8 to 12.7 million tons of plastic entering oceans yearly and predictions of global plastic waste production nearly tripling by 2060 without intervention, as an OECD study predicts. Plastic production, heavily reliant on fossil fuels and toxic additives, threatens both the environment and human health, with microplastics found in the human body, even in unborn babies.
247
+ """,
248
+ unsafe_allow_html=True,
249
+ )
250
+
251
+ with vision:
252
+ st.header("Vision")
253
+ st.markdown(
254
+ """<p font-size: 10px> Treaty Implementation Assistant | Nation Action Plans | Tailored Recommendations</p>""",
255
+ unsafe_allow_html=True,
256
+ )
257
+ st.markdown(
258
+ """
259
+ <p class="description" > NegotiateAI has shown promising potential to improve negotiation processes and has paved the way for wider adoption and scaling. Building on this foundation, our vision now focuses on creating a contract implementation assistant. Our goal is to support planning in countries, facilitate the implementation of treaty commitments and ensure compliance with reporting and monitoring requirements, especially for the upcoming plastics agreement.
260
+ The planned assistant aims to offer tailored recommendations for implementation plans that are in line with treaty provisions and enable tracking of progress by identifying gaps and addressing challenges to support effective implementation. <br> <br>
261
+ Collaboration and feedback from users and partners are essential as we refine the tool for its next iteration. Our priority is to make the app as valuable and helpful as possible for the target group by tailoring features to their specific needs and addressing real-world challenges they face. Links for providing feedback are included at the bottom of the page.
262
+ </p>
263
+ """,
264
+ unsafe_allow_html=True,
265
+ )
266
+
267
+ st.markdown(
268
+ """<hr style="height:2px;border:none;color:#077493;background-color:#077493;" /> """,
269
+ unsafe_allow_html=True,
270
+ )
271
+
272
+ st.header("Technological Approach")
273
+ st.markdown(
274
+ """<p font-size: 10px> Retrieval Augmented Generation (RAG) | Semantic Search | Limitations</p>""",
275
+ unsafe_allow_html=True,
276
+ )
277
+
278
+ rag_image, _, tech_description = st.columns(
279
+ spec=[1, 0.1, 1], vertical_alignment="center"
280
+ )
281
+
282
+ with tech_description:
283
+ st.markdown(
284
+ """
285
+ <p class="description"> The generative component of both applications is based on Retrieval Augmented Generation (RAG) to combine query-based methods with generative AI models. While query-based models extract information from various sources such as PDFs, websites, news articles, online databases, etc., they lack the ability to provide semantic answers in natural language. Conversely, generative models can generate answers independently, but these can be inaccurate. RAG mitigates these problems by leveraging the strengths of both models and minimizing their weaknesses. <br> <br>
286
+ With Retrieval-Augmented Generation (RAG), relevant passages are first filtered from the documents using a machine learning model based on a user query. The context found is then sent to a Generative AI model (in our case OpenAI GPT-4) with the user query. This ensures that the answers are both accurate and easy to understand, offering the best of both worlds: reliable information presented in an entertaining way. <br> <br>
287
+ In line with our efforts to be transparent, we acknowledge certain limitations of our current system. In line with our transparency efforts, we acknowledge certain limitations of our current system. Without filters, the system may have performance issues, resulting in slower response times and less accurate answers, especially for complex questions. These challenges are due in part to resource constraints in the prototype app, which affect both data processing and overall performance.
288
+ """,
289
+ unsafe_allow_html=True,
290
+ )
291
+
292
+ with rag_image:
293
+ st.image("static/images/rag.png", use_container_width=True)
294
+
295
+ st.markdown(
296
+ """<hr style="height:2px;border:none;color:#077493;background-color:#077493;" /> """,
297
+ unsafe_allow_html=True,
298
+ )
299
+
300
+ st.header("Want to support us?")
301
+ col_support, _, _ = st.columns(spec=[1, 0.1, 1])
302
+ with col_support:
303
+ st.write(
304
+ "Our priority is to make the app as valuable and helpful as possible for the target group by tailoring features to their specific needs and addressing real-world challenges they face. We, therefore, would appreciate your feedback and support to improve the app. You can fill out a quick feedback form (maximal 5 minutes) or use the in-depth survey (maximal 15 minutes)."
305
+ )
306
+ review, in_depth_review, _ = st.columns(spec=[0.7, 1.0, 4], gap="large")
307
+ with review:
308
+ st.link_button(
309
+ label="Feedback",
310
+ url="https://forms.gle/PPT5g558utGDUAGh6",
311
+ icon=":material/reviews:",
312
+ )
313
+ with in_depth_review:
314
+ st.link_button(
315
+ label="Survey",
316
+ url="https://docs.google.com/forms/d/1-WNS0ZdAuystajf2i6iSR5HpRfvV1LYq_TcQfaIMvkA",
317
+ icon=":material/rate_review:",
318
+ )
319
+
320
+ logo = get_base64_image("static/images/logo.png")
321
+
322
+ st.write("\n")
323
+ st.write("\n")
324
+ st.write("\n")
325
+
326
+ st.markdown(
327
+ f"""<div class="footer">
328
+ <h3>About</h3>
329
+ <div class="content">
330
+ The Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH <br>
331
+ is a globally active service provider dedicated to international cooperation <br>
332
+ for sustainable development and it’s active in over 120 countries. <br> <br>
333
+ The GIZ Data Lab specializes in harnessing data for development, <br>
334
+ driving innovative solutions in international cooperation
335
+ to address <br> real-world challenges. <br> <br>
336
+ Our work on NegotiateAI started in 2023. You can find more information <br>
337
+ about the NegotiateAI project on our <a href="https://www.blog-datalab.com/home/negotiateai/">website</a>.
338
+ </div>
339
+ <img src="data:image/png;base64,{logo}" class="logo" />
340
+ </div>
341
+ """,
342
+ unsafe_allow_html=True,
343
+ )
344
+
345
+ if chosen_id == "2":
346
+ init_inc_page()
347
+
348
+ if chosen_id == "3":
349
+ init_knowledge_hub_page()
src/application/views/__init__.py ADDED
File without changes
src/application/views/inc_page.py ADDED
@@ -0,0 +1,453 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import base64
2
+ import time
3
+ from pathlib import Path
4
+
5
+ import pandas as pd
6
+ import streamlit as st
7
+ from haystack_integrations.document_stores.qdrant import QdrantDocumentStore
8
+
9
+ from src.document_store.get_index import get_index
10
+ from src.rag.pipeline import RAGPipeline
11
+ from src.utils.data import load_css, load_json
12
+ from src.utils.writer import typewriter
13
+
14
+ DATA_BASE_PATH = Path(__file__).parent.parent.parent.parent / "data"
15
+
16
+
17
+ # Function to load and encode the image
18
+ def get_base64_image(image_path):
19
+ with open(image_path, "rb") as img_file:
20
+ return base64.b64encode(img_file.read()).decode()
21
+
22
+
23
+ @st.cache_data
24
+ def load_css_style() -> None:
25
+ load_css(Path(__file__).parent.parent.parent.parent / "style" / "style.css")
26
+
27
+
28
+ @st.cache_data
29
+ def load_template() -> str:
30
+ path = (
31
+ Path(__file__).parent.parent.parent
32
+ / "rag"
33
+ / "prompt_templates"
34
+ / "inc_template.txt"
35
+ )
36
+ with open(path, "r") as file:
37
+ template = file.read()
38
+ return template
39
+
40
+
41
+ @st.cache_resource
42
+ def load_inc_pipeline(template: str) -> tuple[QdrantDocumentStore, RAGPipeline]:
43
+ inc_index = get_index(index="inc_data")
44
+ inc_rag = RAGPipeline(document_store=inc_index, top_k=7, template=template)
45
+ return inc_index, inc_rag
46
+
47
+
48
+ @st.cache_data
49
+ def get_authors_taxonomy() -> list[str]:
50
+ taxonomy = load_json(DATA_BASE_PATH / "taxonomies" / "authors_taxonomy.json")
51
+ countries = []
52
+ members = taxonomy["Members"]
53
+ for key, value in members.items():
54
+ if key == "Countries" or key == "International and Regional State Associations":
55
+ countries.extend(value)
56
+ return countries
57
+
58
+
59
+ @st.cache_data
60
+ def get_draft_cat_taxonomy() -> dict[str, list[str]]:
61
+ taxonomy = load_json(
62
+ DATA_BASE_PATH / "taxonomies" / "draftcat_taxonomy_filter.json"
63
+ )
64
+ draft_labels = []
65
+ for _, subpart in taxonomy.items():
66
+ for label in subpart:
67
+ draft_labels.append(label)
68
+ return draft_labels
69
+
70
+
71
+ @st.cache_data
72
+ def get_negotiations_rounds() -> list[int]:
73
+ return [1, 2, 3, 4]
74
+
75
+
76
+ @st.cache_data
77
+ def get_example_prompts() -> list[str]:
78
+ return [
79
+ example["question"]
80
+ for example in load_json(
81
+ DATA_BASE_PATH / "example_prompts" / "example_prompts_inc.json"
82
+ )
83
+ ]
84
+
85
+
86
+ @st.cache_data
87
+ def set_trigger_state_values() -> tuple[bool, bool]:
88
+ trigger_filter_inc = st.session_state.setdefault("trigger_inc", False)
89
+ trigger_ask_inc = st.session_state.setdefault("trigger_inc", False)
90
+ return trigger_filter_inc, trigger_ask_inc
91
+
92
+
93
+ @st.cache_data
94
+ def load_app_init() -> None:
95
+ description_inc_col_1, _ = st.columns([0.66, 1])
96
+ with description_inc_col_1:
97
+ with st.expander("About", icon=":material/info:"):
98
+ st.markdown(
99
+ """
100
+ <p class="description"> The Interactive Treaty Assistant will support you on your research and analysis of documents submitted by INC members in the previous rounds to quickly pinpoint crucial information. Together with treaty-specific queries make use of the filters to get more precise responses. Along with the answer, the Chatbot also provides you with direct links to relevant documents enabling a deeper examination. <br>
101
+ The tool excels at providing targeted information on countries and their positions in negotiations. Filter options by author and sections of the negotiation draft enhance accuracy, while direct links to filtered documents ensure quick access to detailed information. While the generated answers take into account up to eight documents at a time due to technical limitations, users can still access the full set of filtered documents via direct links for comprehensive exploration. </p>
102
+ """,
103
+ unsafe_allow_html=True,
104
+ )
105
+ st.write("\n")
106
+ st.write("\n")
107
+
108
+
109
+ @st.cache_data
110
+ def about_inc() -> None:
111
+ st.markdown("""<p class="header"> Help us Improve! </p>""", unsafe_allow_html=True)
112
+ st.markdown(
113
+ """<p class="description"> We would appreciate your feedback and support to improve the app. You can fill out a quick feedback form (maximal 5 minutes) or use the in-depth survey (maximal 15 minutes). </p>""",
114
+ unsafe_allow_html=True,
115
+ )
116
+ review, in_depth_review, _ = st.columns(spec=[0.7, 1.0, 4], gap="large")
117
+ with review:
118
+ st.link_button(
119
+ label="Feedback",
120
+ url="https://forms.gle/PPT5g558utGDUAGh6",
121
+ icon=":material/reviews:",
122
+ )
123
+ with in_depth_review:
124
+ st.link_button(
125
+ label="Survey",
126
+ url="https://docs.google.com/forms/d/1-WNS0ZdAuystajf2i6iSR5HpRfvV1LYq_TcQfaIMvkA",
127
+ icon=":material/rate_review:",
128
+ )
129
+
130
+ logo = get_base64_image("static/images/logo.png")
131
+
132
+ st.write("\n")
133
+ st.write("\n")
134
+ st.write("\n")
135
+
136
+ st.markdown(
137
+ f"""<div class="footer">
138
+ <h3>About</h3>
139
+ <div class="content">
140
+ The Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH <br>
141
+ is a globally active service provider dedicated to international cooperation <br>
142
+ for sustainable development and it’s active in over 120 countries. <br> <br>
143
+ The GIZ Data Lab specializes in harnessing data for development, <br>
144
+ driving innovative solutions in international cooperation
145
+ to address <br> real-world challenges. <br> <br>
146
+ Our work on NegotiateAI started in 2023. You can find more information <br>
147
+ about the NegotiateAI project on our <a href="https://www.blog-datalab.com/home/negotiateai/">website</a>.
148
+ </div>
149
+ <img src="data:image/png;base64,{logo}" class="logo" />
150
+ </div>
151
+ """,
152
+ unsafe_allow_html=True,
153
+ )
154
+
155
+
156
+ def init_inc_page():
157
+ load_css_style()
158
+ load_app_init()
159
+
160
+ # Load Cache Data and Resources
161
+ authors = get_authors_taxonomy()
162
+ draft_labs = get_draft_cat_taxonomy()
163
+ negotiation_rounds = get_negotiations_rounds()
164
+ example_prompts = get_example_prompts()
165
+ template = load_template()
166
+ trigger_filter_inc, trigger_ask_inc = set_trigger_state_values()
167
+ inc_index, inc_rag = load_inc_pipeline(template=template)
168
+
169
+ # Application Column
170
+ application_col_inc = st.columns(1)
171
+
172
+ with application_col_inc[0]:
173
+ st.markdown(
174
+ """
175
+ <p class="header" style="display: flex; align-items: center;">
176
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" style="margin-right: 10px;">
177
+ <circle cx="16" cy="16" r="15" fill="none" stroke="#077493" stroke-width="2"/>
178
+ <text x="16" y="21" text-anchor="middle" font-size="16" font-family="Arial" font-weight="bold" fill="#077493">1</text>
179
+ </svg> Select Filters</span>
180
+ </p>
181
+ """,
182
+ unsafe_allow_html=True,
183
+ )
184
+ text_design_col_1, textext_design_col_2 = st.columns([1, 1])
185
+ with text_design_col_1:
186
+ st.markdown(
187
+ """<p class="description"> Selecting at least one filter is mandatory, because otherwise the model would have to analyze all available documents which results in inaccurate answers and long processing times. Please select at least one filter. We especially recommend to select countries you are interested in. """,
188
+ unsafe_allow_html=True,
189
+ )
190
+ st.write("\n")
191
+
192
+ col_1, col_2, col_3 = st.columns([1, 1, 1])
193
+
194
+ with col_1:
195
+ selected_authors_inc = st.multiselect(
196
+ label="Countries or Associations",
197
+ options=authors,
198
+ label_visibility="visible",
199
+ placeholder="Select",
200
+ key="selected_authors_inc",
201
+ help="Please select the countries of interest. Your selection will refine the database to include documents submitted by these countries or recognized groupings such as Small Developing States, the African States Group, etc.",
202
+ )
203
+
204
+ with col_2:
205
+ selected_rounds_inc = st.multiselect(
206
+ label="Session",
207
+ options=negotiation_rounds,
208
+ label_visibility="visible",
209
+ placeholder="Select",
210
+ key="selected_rounds_inc",
211
+ help="Please select the countries of interest. Your selection will refine the database to include documents submitted by these countries or recognized groupings such as Small Developing States, the African States Group, etc. </p>",
212
+ )
213
+
214
+ with col_3:
215
+ selected_draft_cats_inc = st.multiselect(
216
+ label="Draft Categories",
217
+ options=draft_labs,
218
+ label_visibility="visible",
219
+ placeholder="Select",
220
+ key="selected_draft_cats",
221
+ help=" Please select the parts of the negotiation draft of interest. The negotiation draft can be accessed (https://www.unep.org/inc-plastic-pollution/session-4/documents)",
222
+ )
223
+
224
+ st.write("\n")
225
+ st.write("\n")
226
+
227
+ st.markdown(
228
+ """
229
+ <p class="header" style="display: flex; align-items: center;">
230
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" style="margin-right: 10px;">
231
+ <circle cx="16" cy="16" r="15" fill="none" stroke="#077493" stroke-width="2"/>
232
+ <text x="16" y="21" text-anchor="middle" font-size="16" font-family="Arial" font-weight="bold" fill="#077493">2</text>
233
+ </svg> Ask a question or show documents based on selected filters
234
+ </p>
235
+ """,
236
+ unsafe_allow_html=True,
237
+ )
238
+
239
+ asking_inc, filtering_inc = st.tabs(["Ask a question", "Filter documents"])
240
+
241
+ with asking_inc:
242
+ application_col_ask_inc, output_col_ask_inc = st.columns([1, 1.5])
243
+ with application_col_ask_inc:
244
+ st.markdown(
245
+ """
246
+ <p class="description"> Ask a question, noting that the database has been restricted by filters and that your question should pertain to the selected data. \n
247
+ """,
248
+ unsafe_allow_html=True,
249
+ )
250
+
251
+ if "prompt" not in st.session_state:
252
+ prompt_inc = st.text_area("")
253
+ if (
254
+ "prompt" in st.session_state
255
+ and st.session_state.prompt in example_prompts # noqa: E501
256
+ ): # noqa: E501
257
+ prompt_inc = st.text_area(
258
+ "Enter a question", value=st.session_state.prompt
259
+ ) # noqa: E501
260
+ if (
261
+ "prompt" in st.session_state
262
+ and st.session_state.prompt not in example_prompts # noqa: E501
263
+ ): # noqa: E501
264
+ del st.session_state["prompt"]
265
+ prompt_inc = st.text_area("Enter a question")
266
+
267
+ trigger_ask_inc = st.session_state.setdefault("trigger_inc", False)
268
+
269
+ if st.button("Ask", icon=":material/send:", type="primary"):
270
+ if prompt_inc == "":
271
+ st.error(
272
+ "Please enter a question. Reloading the app in few seconds"
273
+ )
274
+ time.sleep(3)
275
+ st.rerun()
276
+ with st.spinner("Filtering data...") as status:
277
+ if (
278
+ not selected_authors_inc
279
+ and not selected_draft_cats_inc
280
+ and not selected_rounds_inc
281
+ ):
282
+ st.error(
283
+ "Selecting a filter is mandatory. We especially recommend to select countries you are interested in. Selecting at least one filter is mandatory, because otherwise the model would have to analyze all available documents which results in inaccurate answers and long processing times. Please select at least one filter."
284
+ )
285
+ st.stop()
286
+
287
+ with st.spinner("Analyzing Filters") as status:
288
+ filter_selection = {
289
+ "author": selected_authors_inc,
290
+ "draft_labs": selected_draft_cats_inc,
291
+ "round": selected_rounds_inc,
292
+ }
293
+ filters = inc_rag.build_filter(
294
+ filter_selections=filter_selection
295
+ )
296
+ docs = inc_index.filter_documents(filters)
297
+ if not docs:
298
+ st.error(
299
+ "The combination of filters you've chosen does not match any documents. Please try another combination of filters. If a filter combination does not return any documents, it means that there are no documents that match the selected filters and therefore no answer can be given."
300
+ )
301
+ trigger_ask_inc = False
302
+ st.stop()
303
+ else:
304
+ st.success("Filtering completed.")
305
+ with st.spinner("Answering question..."):
306
+ result = inc_rag.run(
307
+ query=prompt_inc, filter_selections=filter_selection
308
+ )
309
+ trigger_ask_inc = True
310
+ st.success("Answering question completed.")
311
+
312
+ st.markdown(
313
+ "***≡ Examples***",
314
+ help="These are example prompts that can be used to ask questions to the model. Click on a prompt to use it as a question. You can also type your own question in the text area above. In general we highly recommend to use the filter functions to narrow down the data.",
315
+ )
316
+
317
+ st.caption("Double click to select the prompt")
318
+ for i, prompt_inc in enumerate(example_prompts):
319
+ # with col[i % 4]:
320
+ if st.button(prompt_inc):
321
+ if "key" not in st.session_state:
322
+ st.session_state["prompt"] = prompt_inc
323
+ # Define the button
324
+
325
+ with filtering_inc:
326
+ application_col_filter, output_col_filter = st.columns([1, 1.5])
327
+ # make the buttons text smaller
328
+ with application_col_filter:
329
+ st.markdown(
330
+ """
331
+ <p class="description">
332
+ This filter function allows you to see all documents that match the selected filters. The documents can be accessed via a link. \n
333
+ """,
334
+ unsafe_allow_html=True,
335
+ )
336
+ if st.button("Filter", icon=":material/filter_alt:", type="primary"):
337
+ if (
338
+ not selected_authors_inc
339
+ and not selected_draft_cats_inc
340
+ and not selected_rounds_inc
341
+ ):
342
+ st.info(
343
+ "No filters selected. All documents will be shown. Longer processing time expected."
344
+ )
345
+
346
+ with st.spinner("Filtering documents..."):
347
+ filter = RAGPipeline.build_filter(
348
+ filter_selections={
349
+ "author": selected_authors_inc,
350
+ "draft_labs": selected_draft_cats_inc,
351
+ "round": selected_rounds_inc,
352
+ }
353
+ )
354
+ result = inc_index.filter_documents(filter)
355
+
356
+ retriever_ids = set()
357
+ result_meta = []
358
+
359
+ for doc in result:
360
+ retriever_id = doc.meta["retriever_id"]
361
+ if retriever_id not in retriever_ids:
362
+ result_meta.append(
363
+ {
364
+ "author": doc.meta["author"],
365
+ "doc_type": doc.meta["doc_type"],
366
+ "session": doc.meta["round"],
367
+ "href": doc.meta["href"],
368
+ "draft_labs": doc.meta["draft_labs"],
369
+ }
370
+ )
371
+ retriever_ids.add(retriever_id)
372
+ else:
373
+ continue
374
+
375
+ result_df = pd.DataFrame(result_meta)
376
+ if result_df.empty:
377
+ st.info(
378
+ "No documents found for the combination of filters you've chosen. All countries are represented at least once in the data. Remove the draft categories to see all documents for the countries selected or try other draft categories and/or sessions."
379
+ )
380
+ trigger_filter_inc = False
381
+ else:
382
+ trigger_filter_inc = True
383
+
384
+ if trigger_filter_inc:
385
+ with output_col_filter:
386
+ st.markdown("### Overview of all filtered documents")
387
+ st.dataframe(
388
+ result_df,
389
+ hide_index=True,
390
+ column_config={
391
+ "author": st.column_config.ListColumn("Authors"),
392
+ "href": st.column_config.LinkColumn("Link to Document"),
393
+ "draft_labs": st.column_config.ListColumn("Draft Categories"),
394
+ "session": st.column_config.NumberColumn("Session"),
395
+ "doc_type": st.column_config.TextColumn("Document Type"),
396
+ },
397
+ )
398
+
399
+ if trigger_ask_inc:
400
+ with output_col_ask_inc:
401
+ if result is None:
402
+ st.error(
403
+ "Open AI rate limit exceeded. Please try again in a few seconds."
404
+ )
405
+ st.stop()
406
+
407
+ reference_data = [
408
+ (doc.meta["retriever_id"], doc.meta["href"])
409
+ for doc in result["retriever"]["documents"]
410
+ ]
411
+
412
+ references = ["\n"]
413
+ for retriever_id, href in reference_data:
414
+ references.append(f"-[{retriever_id}]: {href} \n")
415
+
416
+ references = list(set(references))
417
+
418
+ st.markdown(
419
+ """<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#077493"><path d="m640-480 80 80v80H520v240l-40 40-40-40v-240H240v-80l80-80v-280h-40v-80h400v80h-40v280Zm-286 80h252l-46-46v-314H400v314l-46 46Zm126 0Z"/></svg> <b>Answer</b>""",
420
+ unsafe_allow_html=True,
421
+ )
422
+
423
+ typewriter(
424
+ text=result["llm"]["replies"][0],
425
+ references=references,
426
+ speed=100,
427
+ )
428
+
429
+ with st.expander("Show more information to the documents"):
430
+ sorted_docs = sorted(
431
+ result["retriever"]["documents"],
432
+ key=lambda x: x.meta["retriever_id"],
433
+ )
434
+ current_doc = None
435
+ markdown_text = ""
436
+ for doc in sorted_docs:
437
+ print(current_doc)
438
+ if doc.meta["retriever_id"] != current_doc:
439
+ markdown_text += f"- Document: {doc.meta['retriever_id']}\n"
440
+ markdown_text += " - Text passages\n"
441
+ markdown_text += f" - {doc.content}\n"
442
+ else:
443
+ markdown_text += f" - {doc.content}\n"
444
+ current_doc = doc.meta["retriever_id"]
445
+ st.write(markdown_text)
446
+ trigger_ask_inc = False
447
+
448
+ st.markdown(
449
+ """<hr style="height:2px;border:none;color:#077493;background-color:#077493;" /> """,
450
+ unsafe_allow_html=True,
451
+ )
452
+
453
+ about_inc()
src/application/views/knowledge_hub_page.py ADDED
@@ -0,0 +1,470 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import base64
2
+ import time
3
+ from pathlib import Path
4
+
5
+ import pandas as pd
6
+ import streamlit as st
7
+ from haystack_integrations.document_stores.qdrant import QdrantDocumentStore
8
+
9
+ from src.document_store.get_index import get_index
10
+ from src.rag.pipeline import RAGPipeline
11
+ from src.utils.data import load_css, load_json
12
+ from src.utils.writer import typewriter
13
+
14
+ DATA_BASE_PATH = Path(__file__).parent.parent.parent.parent / "data"
15
+
16
+
17
+ # Function to load and encode the image
18
+ def get_base64_image(image_path):
19
+ with open(image_path, "rb") as img_file:
20
+ return base64.b64encode(img_file.read()).decode()
21
+
22
+
23
+ @st.cache_data
24
+ def load_css_style() -> None:
25
+ load_css(Path(__file__).parent.parent.parent.parent / "style" / "style.css")
26
+
27
+
28
+ @st.cache_resource
29
+ def load_knowledge_hub_pipeline(
30
+ template: str,
31
+ ) -> tuple[QdrantDocumentStore, RAGPipeline]:
32
+ knowledge_hub_index = get_index(index="knowledge_hub_data")
33
+ knowledge_hub_rag = RAGPipeline(
34
+ document_store=knowledge_hub_index, top_k=5, template=template
35
+ )
36
+ return knowledge_hub_index, knowledge_hub_rag
37
+
38
+
39
+ @st.cache_resource
40
+ def get_organization_filter() -> dict | list:
41
+ return load_json(DATA_BASE_PATH / "taxonomies" / "organization.json")
42
+
43
+
44
+ @st.cache_data
45
+ def load_template() -> str:
46
+ path = (
47
+ Path(__file__).parent.parent.parent
48
+ / "rag"
49
+ / "prompt_templates"
50
+ / "inc_template.txt"
51
+ )
52
+ with open(path, "r") as file:
53
+ template = file.read()
54
+ return template
55
+
56
+
57
+ @st.cache_data
58
+ def get_example_prompts() -> list[str]:
59
+ return [
60
+ example["question"]
61
+ for example in load_json(
62
+ DATA_BASE_PATH / "example_prompts" / "example_prompts_knowledge_hub.json"
63
+ )
64
+ ]
65
+
66
+
67
+ @st.cache_resource
68
+ def get_region_filter() -> dict | list:
69
+ return load_json(DATA_BASE_PATH / "taxonomies" / "region.json")
70
+
71
+
72
+ @st.cache_resource
73
+ def get_type_of_document_filter() -> dict | list:
74
+ return load_json(DATA_BASE_PATH / "taxonomies" / "type_of_document.json")
75
+
76
+
77
+ @st.cache_data
78
+ def set_trigger_state_values() -> tuple[bool, bool]:
79
+ trigger_filter_k = st.session_state.setdefault("trigger_k", False)
80
+ trigger_ask_k = st.session_state.setdefault("trigger_k", False)
81
+ return trigger_filter_k, trigger_ask_k
82
+
83
+
84
+ @st.cache_data
85
+ def about_knowledge_hub() -> None:
86
+ st.markdown("""<p class="header"> Help us Improve! </p>""", unsafe_allow_html=True)
87
+ st.markdown(
88
+ """<p class="description"> We would appreciate your feedback and support to improve the app. You can fill out a quick feedback form (maximal 5 minutes) or use the in-depth survey (maximal 15 minutes). </p>""",
89
+ unsafe_allow_html=True,
90
+ )
91
+ review, in_depth_review, _ = st.columns(spec=[0.7, 1.0, 4], gap="large")
92
+ with review:
93
+ st.link_button(
94
+ label="Feedback",
95
+ url="https://forms.gle/PPT5g558utGDUAGh6",
96
+ icon=":material/reviews:",
97
+ )
98
+ with in_depth_review:
99
+ st.link_button(
100
+ label="Survey",
101
+ url="https://docs.google.com/forms/d/1-WNS0ZdAuystajf2i6iSR5HpRfvV1LYq_TcQfaIMvkA",
102
+ icon=":material/rate_review:",
103
+ )
104
+
105
+ logo = get_base64_image("static/images/logo.png")
106
+
107
+ st.write("\n")
108
+ st.write("\n")
109
+ st.write("\n")
110
+
111
+ st.markdown(
112
+ f"""<div class="footer">
113
+ <h3>About</h3>
114
+ <div class="content">
115
+ The Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH <br>
116
+ is a globally active service provider dedicated to international cooperation <br>
117
+ for sustainable development and it’s active in over 120 countries. <br> <br>
118
+ The GIZ Data Lab specializes in harnessing data for development, <br>
119
+ driving innovative solutions in international cooperation
120
+ to address <br> real-world challenges. <br> <br>
121
+ Our work on NegotiateAI started in 2023. You can find more information <br>
122
+ about the NegotiateAI project on our <a href="https://www.blog-datalab.com/home/negotiateai/">website</a>.
123
+ </div>
124
+ <img src="data:image/png;base64,{logo}" class="logo" />
125
+ </div>
126
+ """,
127
+ unsafe_allow_html=True,
128
+ )
129
+
130
+
131
+ @st.cache_data
132
+ def load_app_init() -> None:
133
+ description_knowledge_hub_col_1, _ = st.columns([0.66, 1])
134
+ with description_knowledge_hub_col_1:
135
+ with st.expander("About", icon=":material/info:"):
136
+ st.markdown(
137
+ """
138
+ <p class="description"> Query and engage with the Plastic Knowledge Hub to obtain a wealth of resources that will support you to learn more about the main topics of plastic pollution. Work around with the filters to get more precise information. <br>
139
+ While the generated answers take into account up to eight documents at a time due to technical limitations, users can still access the full set of filtered documents via direct links for comprehensive exploration.
140
+ </p>
141
+ """,
142
+ unsafe_allow_html=True,
143
+ )
144
+ st.write("\n")
145
+ st.write("\n")
146
+
147
+
148
+ def init_knowledge_hub_page():
149
+ load_css_style()
150
+ load_app_init()
151
+
152
+ # Load Cache Data and Resources
153
+ trigger_filter_k, trigger_ask_k = set_trigger_state_values()
154
+ knowledge_hub_template = load_template()
155
+ knowledge_hub_index, knowledge_hub_rag = load_knowledge_hub_pipeline(
156
+ template=knowledge_hub_template
157
+ )
158
+ example_prompts_k = get_example_prompts()
159
+ organization_filter = get_organization_filter()
160
+ region_filter = get_region_filter()
161
+ type_of_document_filter = get_type_of_document_filter()
162
+
163
+ # Application Column
164
+ application_col = st.columns(1)
165
+
166
+ with application_col[0]:
167
+ st.write("\n")
168
+ organization, region, type_of_document = st.columns(3)
169
+
170
+ with organization:
171
+ selected_organization = st.multiselect(
172
+ label="Organization",
173
+ options=organization_filter,
174
+ label_visibility="visible",
175
+ placeholder="Select organization",
176
+ )
177
+ with region:
178
+ selected_region = st.multiselect(
179
+ label="Region",
180
+ options=region_filter,
181
+ label_visibility="visible",
182
+ placeholder="Select region",
183
+ )
184
+ with type_of_document:
185
+ selected_type_of_document = st.multiselect(
186
+ label="Type of Document",
187
+ options=type_of_document_filter,
188
+ label_visibility="visible",
189
+ placeholder="Select type of document",
190
+ )
191
+
192
+ st.write("\n")
193
+
194
+ asking_k, filtering_k = st.tabs(["Ask a question", "Filter documents"])
195
+
196
+ with asking_k:
197
+ application_col_ask_k, output_col_ask_k = st.columns([1, 1.5])
198
+ with application_col_ask_k:
199
+ st.markdown(
200
+ """
201
+ <p class="description">
202
+ Please ask a question to get an answer or show documents based on the selected filters. This step is optional.</p>
203
+ """,
204
+ unsafe_allow_html=True,
205
+ )
206
+
207
+ if "prompt_k" not in st.session_state:
208
+ prompt_k = st.text_area(label="")
209
+ if (
210
+ "prompt_k" in st.session_state
211
+ and st.session_state.prompt_k in example_prompts_k
212
+ ):
213
+ prompt_k = st.text_area(
214
+ label="Enter a question",
215
+ value=st.session_state.prompt_k,
216
+ )
217
+ if (
218
+ "prompt_k" in st.session_state
219
+ and st.session_state.prompt_k not in example_prompts_k
220
+ ):
221
+ del st.session_state["prompt_k"]
222
+ prompt_k = st.text_area(label="Enter a question")
223
+
224
+ trigger_ask_k = st.session_state.setdefault("trigger", False)
225
+
226
+ if st.button(
227
+ "Ask", key="ask_k", type="primary", icon=":material/send:"
228
+ ):
229
+ if prompt_k == "":
230
+ st.error(
231
+ "Please enter a question. Reloading the app in few seconds",
232
+ icon=":material/error:",
233
+ )
234
+ time.sleep(3)
235
+ st.rerun()
236
+
237
+ with st.spinner("Querying Documents..."):
238
+ filter_selection = {
239
+ "organization": selected_organization,
240
+ "region": selected_region,
241
+ "type_of_document": selected_type_of_document,
242
+ }
243
+
244
+ if (
245
+ not selected_region
246
+ and not selected_organization
247
+ and not selected_type_of_document
248
+ ):
249
+ st.warning(
250
+ "No filters selected. All documents will be used for the question. Longer processing time expected. Please consider using the filter functions to narrow down the data.",
251
+ icon=":material/warning:",
252
+ )
253
+ filters = knowledge_hub_rag.build_filter(
254
+ filter_selections=filter_selection
255
+ )
256
+
257
+ try:
258
+ docs = knowledge_hub_index.filter_documents(filters=filters)
259
+ except Exception:
260
+ st.error(
261
+ "An error occured while filtering the documents. Please try again. App will reload in a few seconds. If the app does not reload, please refresh the page.",
262
+ icon=":material/error:",
263
+ )
264
+ trigger_ask_k = False
265
+ time.sleep(3)
266
+ st.rerun()
267
+
268
+ if not docs:
269
+ st.error(
270
+ "The combination of filters you've chosen does not match any documents. Please try another combination of filters. If a filter combination does not return any documents, it means that there are no documents that match the selected filters and therefore no answer can be given.",
271
+ icon=":material/error:",
272
+ )
273
+ trigger_ask_k = False
274
+ st.stop()
275
+ else:
276
+ st.success("Filtering completed.", icon=":material/check:")
277
+ with st.spinner("Answering question..."):
278
+ try:
279
+ result = knowledge_hub_rag.run(
280
+ query=prompt_k, filter_selections=filter_selection
281
+ )
282
+ except Exception:
283
+ st.error(
284
+ "An error occured while querying the documents. Please try again. App will reload in a few seconds. If the app does not reload, please refresh the page.",
285
+ icon=":material/error:",
286
+ )
287
+ trigger_ask_k = False
288
+ time.sleep(3)
289
+ st.rerun()
290
+
291
+ trigger_ask_k = True
292
+ st.success(
293
+ "Answering question completed.", icon=":material/check:"
294
+ )
295
+
296
+ st.markdown(
297
+ "***≡ Examples***",
298
+ help="These are example prompts that can be used to ask questions to the model. Click on a prompt to use it as a question. You can also type your own question in the text area above. In general we highly recommend to use the filter functions to narrow down the data.",
299
+ )
300
+ st.caption("Double click to select the prompt")
301
+
302
+ for i, prompt_inc in enumerate(example_prompts_k):
303
+ # with col[i % 4]:
304
+ if st.button(prompt_inc):
305
+ if "key" not in st.session_state:
306
+ st.session_state["prompt_k"] = prompt_inc
307
+
308
+ with filtering_k:
309
+ application_col_filter_k, output_col_filter_k = st.columns([1, 1.5])
310
+
311
+ with application_col_filter_k:
312
+ st.markdown(
313
+ """
314
+ <p class="description"> This filter function allows you to see all documents that match the selected filters. The documents can be accessed via a link \n </p>
315
+ """,
316
+ unsafe_allow_html=True,
317
+ )
318
+ if st.button(
319
+ "Filter documents",
320
+ key="filter_docuemts_k",
321
+ type="primary",
322
+ icon=":material/filter_alt:",
323
+ ):
324
+ if (
325
+ not selected_region
326
+ and not selected_organization
327
+ and not selected_type_of_document
328
+ ):
329
+ st.info(
330
+ "No filteres selected. All documents will be shown. Longer processing time expected."
331
+ )
332
+
333
+ with st.spinner("Filtering documents..."):
334
+ filter = RAGPipeline.build_filter(
335
+ filter_selections={
336
+ "organization": selected_organization,
337
+ "region": selected_region,
338
+ "type_of_document": selected_type_of_document,
339
+ }
340
+ )
341
+ try:
342
+ result = knowledge_hub_index.filter_documents(
343
+ filters=filter
344
+ )
345
+ except Exception:
346
+ st.error(
347
+ "An error occured while filtering the documents. Please try again. App will reload in a few seconds. If the app does not reload, please refresh the page.",
348
+ icon=":material/error:",
349
+ )
350
+ trigger_filter_k = False
351
+ time.sleep(3)
352
+ st.rerun()
353
+
354
+ retriever_ids = set()
355
+ result_meta = []
356
+
357
+ for doc in result:
358
+ retriever_id = doc.meta["retriever_id"]
359
+ if retriever_id not in retriever_ids:
360
+ result_meta.append(
361
+ {
362
+ "organization": doc.meta["organization"],
363
+ "title": doc.meta["title"],
364
+ "year": doc.meta["year"],
365
+ "region": doc.meta["region"],
366
+ "keywords": doc.meta["key_words"],
367
+ "type_of_document": doc.meta[
368
+ "type_of_document"
369
+ ],
370
+ "type_of_organization": doc.meta[
371
+ "type_of_organization"
372
+ ],
373
+ "href": doc.meta["href"],
374
+ }
375
+ )
376
+ retriever_ids.add(retriever_id)
377
+ else:
378
+ continue
379
+
380
+ result_df = pd.DataFrame(result_meta)
381
+ if result_df.empty:
382
+ st.info(
383
+ "No documents found for the combination of filters you've chosen. All countries are represented at least once in the data. Remove the draft categories to see all documents for the countries selected or try other draft categories and/or rounds"
384
+ )
385
+ trigger_filter_k = False
386
+ else:
387
+ trigger_filter_k = True
388
+
389
+ if trigger_filter_k:
390
+ with output_col_filter_k:
391
+ st.markdown("### Overview of all filtered documents")
392
+ st.dataframe(
393
+ result_df,
394
+ hide_index=True,
395
+ use_container_width=True,
396
+ column_config={
397
+ "organization": st.column_config.ListColumn("Organization"),
398
+ "title": st.column_config.TextColumn("Title"),
399
+ "year": st.column_config.TextColumn("Year"),
400
+ "region": st.column_config.ListColumn("Region"),
401
+ "keywords": st.column_config.ListColumn("Keywords"),
402
+ "type_of_document": st.column_config.TextColumn(
403
+ "Type of Document"
404
+ ),
405
+ "type_of_organization": st.column_config.TextColumn(
406
+ "Type of Organization"
407
+ ),
408
+ "href": st.column_config.LinkColumn("Link"),
409
+ },
410
+ )
411
+ trigger_filter_k = False
412
+
413
+ if trigger_ask_k:
414
+ with output_col_ask_k:
415
+ if result is None:
416
+ st.error(
417
+ "Open AI rate limit exceeded. Please try again in a few seconds."
418
+ )
419
+ st.stop()
420
+
421
+ reference_data = [
422
+ (doc.meta["retriever_id"], doc.meta["href"])
423
+ for doc in result["retriever"]["documents"]
424
+ ]
425
+
426
+ references = ["\n"]
427
+
428
+ for retriever_id, href in reference_data:
429
+ references.append(f"-[{retriever_id}]: {href} \n")
430
+
431
+ references = list(set(references))
432
+
433
+ st.markdown(
434
+ """<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#077493"><path d="m640-480 80 80v80H520v240l-40 40-40-40v-240H240v-80l80-80v-280h-40v-80h400v80h-40v280Zm-286 80h252l-46-46v-314H400v314l-46 46Zm126 0Z"/></svg> <b>Answer</b>""",
435
+ unsafe_allow_html=True,
436
+ )
437
+
438
+ typewriter(
439
+ text=result["llm"]["replies"][0],
440
+ references=references,
441
+ speed=100,
442
+ app="knowledge_hub",
443
+ )
444
+
445
+ with st.expander("Show more information to the documents"):
446
+ sorted_docs = sorted(
447
+ result["retriever"]["documents"],
448
+ key=lambda x: x.meta["retriever_id"],
449
+ )
450
+ current_doc = None
451
+ markdown_text = ""
452
+ for doc in sorted_docs:
453
+ print(current_doc)
454
+ if doc.meta["retriever_id"] != current_doc:
455
+ markdown_text += f"- Document: {doc.meta['retriever_id']}\n"
456
+ markdown_text += " - Text passages\n"
457
+ markdown_text += f" - {doc.content}\n"
458
+ else:
459
+ markdown_text += f" - {doc.content}\n"
460
+ current_doc = doc.meta["retriever_id"]
461
+ st.write(markdown_text)
462
+
463
+ trigger_ask_k = False
464
+
465
+ st.markdown(
466
+ """<hr style="height:2px;border:none;color:#077493;background-color:#077493;" /> """,
467
+ unsafe_allow_html=True,
468
+ )
469
+
470
+ about_knowledge_hub()
src/document_store/__init__.py ADDED
File without changes
src/document_store/get_index.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from haystack.utils import Secret
2
+ from haystack_integrations.document_stores.qdrant import QdrantDocumentStore
3
+
4
+ from src.settings import settings
5
+
6
+
7
+ def get_index(index: str = "document") -> QdrantDocumentStore:
8
+ return QdrantDocumentStore(
9
+ url=settings.qdrant_database.url,
10
+ api_key=Secret.from_env_var("QDRANT_DATABASE__API_KEY"),
11
+ index=index,
12
+ embedding_dim=settings.qdrant_database.embedding_dim,
13
+ similarity="cosine",
14
+ recreate_index=False,
15
+ wait_result_from_api=True,
16
+ return_embedding=True,
17
+ )
src/rag/__init__.py ADDED
File without changes
src/rag/pipeline.py ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from haystack import Pipeline
2
+ from haystack.components.builders import PromptBuilder
3
+ from haystack.components.embedders import SentenceTransformersTextEmbedder
4
+ from haystack.components.generators import OpenAIGenerator
5
+ from haystack.utils import Secret
6
+ from haystack_integrations.components.retrievers.qdrant import QdrantEmbeddingRetriever
7
+ from src.settings import settings
8
+
9
+
10
+ class RAGPipeline:
11
+ def __init__(
12
+ self,
13
+ document_store,
14
+ template: str,
15
+ top_k: int,
16
+ ) -> None:
17
+ self.text_embedder: SentenceTransformersTextEmbedder # type: ignore
18
+ self.retriever: QdrantEmbeddingRetriever # type: ignore
19
+ self.prompt_builder: PromptBuilder # type: ignore
20
+ self.llm_provider: OpenAIGenerator # type: ignore
21
+ self.pipeline: Pipeline | None = None
22
+ self.document_store = document_store
23
+ self.template = template
24
+ self.top_k = top_k
25
+
26
+ self.get_text_embedder()
27
+ self.get_retriever()
28
+ self.get_prompt_builder()
29
+ self.get_llm_provider()
30
+
31
+ def run(self, query: str, filter_selections: dict[str, list] | None = None) -> dict:
32
+ if not self.pipeline:
33
+ self.build_pipeline()
34
+ if self.pipeline:
35
+ filters = RAGPipeline.build_filter(filter_selections=filter_selections)
36
+ result = self.pipeline.run(
37
+ data={
38
+ "text_embedder": {"text": query},
39
+ "retriever": {"filters": filters},
40
+ "prompt_builder": {"query": query},
41
+ },
42
+ include_outputs_from=["retriever", "llm"],
43
+ )
44
+ return result
45
+
46
+ def get_text_embedder(self) -> None:
47
+ self.text_embedder = SentenceTransformersTextEmbedder(
48
+ model=settings.qdrant_database.model
49
+ )
50
+ self.text_embedder.warm_up()
51
+
52
+ def get_retriever(self) -> None:
53
+ self.retriever = QdrantEmbeddingRetriever(
54
+ document_store=self.document_store, top_k=self.top_k
55
+ )
56
+
57
+ def get_prompt_builder(self) -> None:
58
+ self.prompt_builder = PromptBuilder(template=self.template)
59
+
60
+ def get_llm_provider(self) -> None:
61
+ self.llm_provider = OpenAIGenerator(
62
+ model=settings.llm_provider.model,
63
+ api_key=Secret.from_env_var("LLM_PROVIDER__API_KEY"),
64
+ max_retries=3,
65
+ generation_kwargs={"max_tokens": 5000, "temperature": 0.2},
66
+ )
67
+
68
+ @staticmethod
69
+ def build_filter(filter_selections: dict[str, list] | None = None) -> dict:
70
+ filters: dict[str, str | list[dict]] = {"operator": "AND", "conditions": []}
71
+ if filter_selections:
72
+ for meta_data_name, selections in filter_selections.items():
73
+ filters["conditions"].append( # type: ignore
74
+ {
75
+ "field": "meta." + meta_data_name,
76
+ "operator": "in",
77
+ "value": selections,
78
+ }
79
+ )
80
+ else:
81
+ filters = {}
82
+ return filters
83
+
84
+ def build_pipeline(self):
85
+ self.pipeline = Pipeline()
86
+ self.pipeline.add_component("text_embedder", self.text_embedder)
87
+ self.pipeline.add_component("retriever", self.retriever)
88
+ self.pipeline.add_component("prompt_builder", self.prompt_builder)
89
+ self.pipeline.add_component("llm", self.llm_provider)
90
+
91
+ self.pipeline.connect("text_embedder.embedding", "retriever.query_embedding")
92
+ self.pipeline.connect("retriever", "prompt_builder.documents")
93
+ self.pipeline.connect("prompt_builder", "llm")
94
+
95
+
96
+ if __name__ == "__main__":
97
+ document_store = DocumentStore(index="inc_data")
98
+
99
+ with open("src/rag/prompt_templates/inc_template.txt", "r") as file:
100
+ template = file.read()
101
+
102
+ pipeline = RAGPipeline(
103
+ document_store=document_store.document_store, template=template, top_k=5
104
+ )
105
+ filter_selections = {
106
+ "author": ["Malaysia", "Australia"],
107
+ }
108
+ result = pipeline.run(
109
+ "What is Malaysia's position on plastic waste?",
110
+ filter_selections=filter_selections,
111
+ )
112
+ pass
src/rag/prompt_templates/inc_template.txt ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Answer the question {{ query }} using only the provided documents and avoiding text.
2
+ Formulate your answer in the style of an academic report.
3
+ Provide example quotes and citations using extracted text from the documents.
4
+ Use facts and numbers from the documents in your answer.
5
+ ALWAYS include the references of the documents used from documents at the end of each applicable sentence using the format [number].
6
+ If the answer isn't in the document say 'Answering is not possible given the available information'.
7
+
8
+ Documents:
9
+ {% for document in documents %}
10
+ {{ document.meta.retriever_id }}: {{ document.content }}
11
+
12
+ {% endfor %}
13
+
14
+ Answer:
src/rag/prompt_templates/knowledge_hub.txt ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Answer the question {{ query }} using only the provided text chunks from Reports and Scientific Papers.
2
+ Formulate your answer in the style of an scientific report.
3
+ Provide example quotes and citations using extracted text from the documents.
4
+ Use facts and numbers from the documents in your answer.
5
+ ALWAYS include the references of the documents used from documents at the end of each applicable sentence using the format [number].
6
+ If the answer isn't in the document say 'Answering is not possible given the available information'.
7
+
8
+ Documents:
9
+ {% for document in documents %}
10
+ {{ document.meta.retriever_id }}: {{ document.content }}
11
+
12
+ {% endfor %}
13
+
14
+ Answer:
src/settings.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from pydantic import BaseModel
2
+ from pydantic_settings import BaseSettings, SettingsConfigDict
3
+
4
+
5
+ class QdrantDatabase(BaseModel):
6
+ url: str
7
+ api_key: str
8
+ embedding_dim: int = 512
9
+ model: str = "sentence-transformers/distiluse-base-multilingual-cased-v1"
10
+
11
+
12
+ class LlmProvider(BaseModel):
13
+ model: str
14
+ api_key: str
15
+
16
+
17
+ class Settings(BaseSettings):
18
+ qdrant_database: QdrantDatabase
19
+ llm_provider: LlmProvider
20
+
21
+ model_config = SettingsConfigDict(
22
+ case_sensitive=False, env_nested_delimiter="__", env_file=".env"
23
+ )
24
+
25
+
26
+ settings = Settings()
src/utils/__init__.py ADDED
File without changes
src/utils/data.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ from pathlib import Path
3
+
4
+ import streamlit as st
5
+
6
+
7
+ def load_json(file_path: Path) -> dict | list:
8
+ with open(file_path, "r") as f:
9
+ return json.load(f)
10
+
11
+
12
+ def save_json(file_path: Path, data: dict | list) -> None:
13
+ with open(file_path, "w") as f:
14
+ json.dump(data, f, indent=4)
15
+
16
+
17
+ def load_css(file_name) -> None:
18
+ with open(file_name) as f:
19
+ st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)
src/utils/writer.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import time
2
+
3
+ import streamlit as st
4
+
5
+
6
+ def typewriter(text: str, references: list, speed: int, app: str = "inc"):
7
+ tokens = text.split()
8
+ container = st.empty()
9
+ for index in range(len(tokens) + 1):
10
+ curr_full_text = " ".join(tokens[:index])
11
+ container.markdown(curr_full_text)
12
+ time.sleep(1 / speed)
13
+ curr_full_text += "\n"
14
+ container.markdown(curr_full_text)
15
+
16
+ if app == "knowledge_hub":
17
+ curr_full_text += "\n **Note:** \n"
18
+ curr_full_text += "\n"
19
+ curr_full_text += "This response is generated based on the available documents in the database and may not represent a comprehensive or definitive view of the topic. For complete and accurate scientific knowledge, consider consulting the original papers or additional sources. If the answer indicates that no response is possible, you may consider using a different filter or trying without any filter at all. \n"
20
+ container.markdown(curr_full_text)
21
+
22
+ if app == "inc":
23
+ curr_full_text += "\n **Note:** \n"
24
+ curr_full_text += "\n"
25
+ curr_full_text += "If the answer is that no response is possible, you may consider applying a different filter. \n"
26
+ container.markdown(curr_full_text)
27
+
28
+ curr_full_text += "\n **References** \n"
29
+ curr_full_text += "\n"
30
+ container.markdown(curr_full_text)
31
+ curr_full_text += "\n".join(references)
32
+ container.markdown(curr_full_text)
static/images/banner.jpg ADDED

Git LFS Details

  • SHA256: 9e302014c4fc5c495c6a9d5290372d501ba2493b9554eac21ded6f082a6eaf85
  • Pointer size: 132 Bytes
  • Size of remote file: 1.03 MB
static/images/choropleth_round_1.png ADDED
static/images/choropleth_round_2.png ADDED
static/images/choropleth_round_3.png ADDED
static/images/choropleth_round_4.png ADDED
static/images/logo.jpg ADDED
static/images/logo.png ADDED
static/images/rag.png ADDED
static/images/wordcloud.png ADDED

Git LFS Details

  • SHA256: 42722bb4d1136fdb140d0887b7524d001d4a847c130e9b6c1ab419ee1ad34489
  • Pointer size: 132 Bytes
  • Size of remote file: 2.22 MB
style/style.css ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .feedback-link {
2
+ display: inline-block;
3
+ background-color: #077493; /* Adjusted color */
4
+ color: white;
5
+ border: none;
6
+ border-radius: 4px;
7
+ padding: 0.5rem 1rem;
8
+ text-decoration: none;
9
+ font-size: 1rem;
10
+ cursor: pointer;
11
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Added */
12
+ }
13
+
14
+ .feedback-link:hover {
15
+ background-color: #077493; /* Adjusted hover color */
16
+ }
17
+
18
+ .feedback-link[href^="mailto"] {
19
+ color: white !important;
20
+ text-decoration: none !important;
21
+ }
22
+
23
+ /* Style streamlit general text */
24
+ .description {
25
+ font-size:18px !important;
26
+ text-align: justify;
27
+ }
28
+
29
+ .title {
30
+ font-size: 35px;
31
+ font-weight: 500;
32
+ font-family: 'Arial', sans-serif;
33
+ color: #333; /* A modern dark gray */
34
+ display: flex;
35
+ align-items: center;
36
+ }
37
+
38
+
39
+ /* Style streamlit header with bold text */
40
+ .header {
41
+ font-size: 20px;
42
+ font-weight: 700;
43
+ font-family: 'Arial', sans-serif;
44
+ color: #333; /* A modern dark gray */
45
+ display: flex;
46
+ align-items: center;
47
+ }
48
+
49
+
50
+ .stMultiSelect > div > div > div {
51
+ font-size: 15px;
52
+ }
53
+
54
+ /* Style columns */
55
+ [data-testid="column"] {
56
+ border-radius: 15px;
57
+ background-color: white;
58
+ box-shadow: 0 0 10px #eee;
59
+ border: 1px solid #ddd;
60
+ padding: 1rem;;
61
+ }
62
+ /* Style containers */
63
+ [data-testid="stVerticalBlock"] > [style*="flex-direction: column;"] > [data-testid="stVerticalBlock"] {
64
+ border-radius: 15px;
65
+ background-color: white;
66
+ box-shadow: 0 0 10px #eee;
67
+ border: 1px solid #ddd;
68
+ padding: 1rem;;
69
+ }
70
+
71
+ .stTabs [data-baseweb="tab-list"] button [data-testid="stMarkdownContainer"] p {
72
+ font-size:20px;
73
+ }
74
+
75
+
76
+ .footer {
77
+ position: relative;
78
+ left: 0;
79
+ bottom: 0;
80
+ width: 100%;
81
+ background-color: #eaeaec;
82
+ color: black;
83
+ text-align: left;
84
+ padding: 10px 20px;
85
+ font-size: 12px;
86
+ box-shadow: 0px -4px 6px rgba(0, 0, 0, 0.1);
87
+ }
88
+
89
+ .footer h3 {
90
+ margin: 0;
91
+ padding-bottom: 5px;
92
+ position: relative;
93
+ font-size: 13px;
94
+ font-weight: 100;
95
+ display: inline-block;
96
+ }
97
+
98
+ .footer .content {
99
+ margin-top: 10px;
100
+ }
101
+
102
+ .footer .logo {
103
+ position: absolute;
104
+ bottom: 10px;
105
+ right: 20px;
106
+ width: 50px; /* Adjust logo size */
107
+ height: auto;
108
+ }
109
+
110
+ .footer h3::after {
111
+ content: "";
112
+ display: block;
113
+ width: 120%; /* Adjust to control line length */
114
+ height: 2px;
115
+ background-color: black; /* Adjust color as needed */
116
+ position: absolute;
117
+ bottom: 0;
118
+ left: 0;
119
+
120
+
121
+ .footer .logo {
122
+ position: absolute;
123
+ bottom: 10px;
124
+ right: 20px;
125
+ width: 50px; /* Adjust logo size */
126
+ height: auto;
127
+ }