Skip to content

Commit

Permalink
lots of refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
linozen committed Nov 24, 2021
1 parent d5cfe48 commit 8edc6b1
Show file tree
Hide file tree
Showing 6 changed files with 369 additions and 278 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
- name: Deploy Docker image to server using SSH
uses: appleboy/ssh-action@master
# TODO Set correct browser.serverAddress and server.baseUrlPath
with:
host: ioi.sehn.dev
username: root
Expand Down
3 changes: 3 additions & 0 deletions .streamlit/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[browser]
gatherUsageStats = false

[server]
runOnSave = true

Expand Down
46 changes: 0 additions & 46 deletions explorer/lib/figures.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,6 @@
import plotly.express as px


def generate_pie_chart(
df,
values,
names,
hover_name,
color,
hover_data,
custom_data,
color_discrete_sequence,
color_discrete_map,
labels,
):
fig = px.pie(
df,
values=values,
names=names,
hover_name=hover_name,
color=color,
custom_data=custom_data,
color_discrete_sequence=color_discrete_sequence,
color_discrete_map=color_discrete_map,
labels=labels,
)
fig.update_traces(
textinfo="percent+value",
hovertemplate="<b>Answer</b> %{label}<br><br>given by <b>%{value}</b> respondents or <b>%{percent}</b><br>of all who answered the question.<br>",
)
fig.update_layout(
legend={"y": 1.5, "font": {"size": 11}, "orientation": "v"},
)
return fig


def generate_histogram(df, x, y, nbins, color, color_discrete_map, labels):
fig = px.histogram(
df,
x=x,
y=y,
nbins=nbins,
color=color,
color_discrete_map=color_discrete_map,
labels=labels,
)
return fig


def generate_boxplot(df, x, y, points, color, color_discrete_map):
fig = px.box(
df,
Expand Down
11 changes: 0 additions & 11 deletions explorer/markdown/merged.md

This file was deleted.

Loading

0 comments on commit 8edc6b1

Please sign in to comment.