Skip to content

Commit

Permalink
minor edit to app
Browse files Browse the repository at this point in the history
  • Loading branch information
irishryoon committed Apr 21, 2021
1 parent 6b37c47 commit 19510cf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions interesting_finds.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
from year_summary import plot_year_summary

def app():

# year-end summary
fig = plot_year_summary()
f_year = go.FigureWidget(fig)
st.plotly_chart(f_year)

##### Comparison controling for offense types #####

st.header("By actor analysis with controlled offense types")
Expand Down
8 changes: 4 additions & 4 deletions year_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,31 @@ def plot_year_summary():
fig.add_trace(go.Indicator(
mode = "number",
value = df_summary.at[2020,"bail_amount"],
title = {"text": "<span style='font-size:1.6em'>Amount of bail set</span>"},
title = {"text": "<span style='font-size:1.5em'>Amount of bail set</span>"},
number = {"prefix": "$",
"font":{"size": 30}},
domain = {'x': [0.08, 0.31], 'y': [0.4, 1]}))

fig.add_trace(go.Indicator(
mode = "number",
value = df_summary.at[2020,"bail_paid"],
title = {"text": "<span style='font-size:1.6em'>Amount of bail paid</span>"},
title = {"text": "<span style='font-size:1.5em'>Amount of bail paid</span>"},
number = {"prefix": "$",
"font":{"size":30}},
domain = {'x': [0.31, 0.54], 'y': [0.4, 1]}))

fig.add_trace(go.Indicator(
mode = "number",
value = df_summary.at[2020, "monetary_bail_perct"]*100,
title = {"text": "<span style='font-size:1.6em'>Percentage of bail set</span>"},
title = {"text": "<span style='font-size:1.5em'>Percentage of bail set</span>"},
number = {"suffix": "%",
"font":{"size":30}},
domain = {'x': [0.54, 0.77], 'y': [0.4, 1]}))

fig.add_trace(go.Indicator(
mode = "number",
value = df_summary.at[2020,"monetary_bail"],
title = {"text": "<span style='font-size:1.6em'>Number of people impacted</span>"},
title = {"text": "<span style='font-size:1.5em'>Number of people impacted</span>"},
number = {
"font":{"size": 30}},
domain = {'x': [0.77, 1], 'y': [0.4, 1]}))
Expand Down

0 comments on commit 19510cf

Please sign in to comment.