Spaces:
Sleeping
Sleeping
Rahkakavee Baskaran
commited on
Commit
·
f80e04a
1
Parent(s):
120dad2
add data without httpx
Browse files- app.py +6 -9
- data.json +0 -0
- requirements.txt +1 -2
app.py
CHANGED
@@ -3,7 +3,6 @@ import streamlit as st
|
|
3 |
import json
|
4 |
from itertools import islice
|
5 |
from typing import Generator
|
6 |
-
import httpx
|
7 |
from plotly import express as px
|
8 |
|
9 |
|
@@ -48,20 +47,18 @@ def get_tree_map_data(
|
|
48 |
return parents, names, values
|
49 |
|
50 |
|
51 |
-
|
52 |
-
with open(
|
53 |
-
|
54 |
|
55 |
-
re = httpx.get(
|
56 |
-
"https://www.bertelsmann-stiftung.de/fileadmin/files/musterdatenkatalog/Musterdatenkatalog_4.0_042023.json"
|
57 |
-
)
|
58 |
|
59 |
-
|
|
|
|
|
60 |
|
61 |
theme_counts = dict(Counter([el["THEMA"] for el in data]))
|
62 |
labels_counts = dict(Counter([el["BEZEICHNUNG"] for el in data]))
|
63 |
|
64 |
-
|
65 |
taxonomy = taxonomy
|
66 |
|
67 |
names = [""]
|
|
|
3 |
import json
|
4 |
from itertools import islice
|
5 |
from typing import Generator
|
|
|
6 |
from plotly import express as px
|
7 |
|
8 |
|
|
|
47 |
return parents, names, values
|
48 |
|
49 |
|
50 |
+
def load_json(path: str) -> dict:
|
51 |
+
with open(path, "r") as fp:
|
52 |
+
return json.load(fp)
|
53 |
|
|
|
|
|
|
|
54 |
|
55 |
+
# Load Data
|
56 |
+
data = load_json("data.json")
|
57 |
+
taxonomy = load_json("taxonomy_processed_v3.json")
|
58 |
|
59 |
theme_counts = dict(Counter([el["THEMA"] for el in data]))
|
60 |
labels_counts = dict(Counter([el["BEZEICHNUNG"] for el in data]))
|
61 |
|
|
|
62 |
taxonomy = taxonomy
|
63 |
|
64 |
names = [""]
|
data.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
requirements.txt
CHANGED
@@ -1,3 +1,2 @@
|
|
1 |
plotly-express
|
2 |
-
plotly
|
3 |
-
httpx
|
|
|
1 |
plotly-express
|
2 |
+
plotly
|
|