Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,7 +19,6 @@ st.markdown(
|
|
| 19 |
<link href="https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap" rel="stylesheet">
|
| 20 |
<style>
|
| 21 |
.title {
|
| 22 |
-
font-family: 'Permanent Marker';
|
| 23 |
font-size: 2.0rem;
|
| 24 |
}
|
| 25 |
</style>""",
|
|
@@ -87,11 +86,11 @@ with st.sidebar:
|
|
| 87 |
# ["Topics 2: "],
|
| 88 |
# )
|
| 89 |
|
| 90 |
-
start_year, end_year = st.select_slider(
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
)
|
| 95 |
|
| 96 |
start_year = int(start_year)
|
| 97 |
end_year = int(end_year)
|
|
@@ -116,6 +115,7 @@ fig = px.scatter(
|
|
| 116 |
y="y",
|
| 117 |
opacity=DF["opacity"],
|
| 118 |
color=DF["cluster"],
|
|
|
|
| 119 |
width=1000,
|
| 120 |
height=800,
|
| 121 |
custom_data=("title", "authors_trimmed", "year"),
|
|
@@ -142,6 +142,7 @@ fig.update_layout(
|
|
| 142 |
|
| 143 |
fig.update_xaxes(title="")
|
| 144 |
fig.update_yaxes(title="")
|
|
|
|
| 145 |
|
| 146 |
st.plotly_chart(fig, use_container_width=True)
|
| 147 |
|
|
|
|
| 19 |
<link href="https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap" rel="stylesheet">
|
| 20 |
<style>
|
| 21 |
.title {
|
|
|
|
| 22 |
font-size: 2.0rem;
|
| 23 |
}
|
| 24 |
</style>""",
|
|
|
|
| 86 |
# ["Topics 2: "],
|
| 87 |
# )
|
| 88 |
|
| 89 |
+
# start_year, end_year = st.select_slider(
|
| 90 |
+
# "Publication year",
|
| 91 |
+
# options=[str(y) for y in range(min_year, max_year + 1)],
|
| 92 |
+
# value=(str(min_year), str(max_year)),
|
| 93 |
+
# )
|
| 94 |
|
| 95 |
start_year = int(start_year)
|
| 96 |
end_year = int(end_year)
|
|
|
|
| 115 |
y="y",
|
| 116 |
opacity=DF["opacity"],
|
| 117 |
color=DF["cluster"],
|
| 118 |
+
animation_frame=DF["year"]
|
| 119 |
width=1000,
|
| 120 |
height=800,
|
| 121 |
custom_data=("title", "authors_trimmed", "year"),
|
|
|
|
| 142 |
|
| 143 |
fig.update_xaxes(title="")
|
| 144 |
fig.update_yaxes(title="")
|
| 145 |
+
fig.update_layout(transition = {'duration': 1000})
|
| 146 |
|
| 147 |
st.plotly_chart(fig, use_container_width=True)
|
| 148 |
|