Skip to content

Commit

Permalink
more descriptive names
Browse files Browse the repository at this point in the history
  • Loading branch information
afmagee42 committed Dec 18, 2024
1 parent b889063 commit ee038a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ringvax/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ringvax import Simulation
from ringvax.summary import (
get_all_person_properties,
get_outbreak_size_df,
get_total_infection_count_df,
prob_control_by_gen,
summarize_detections,
summarize_infections,
Expand Down Expand Up @@ -170,7 +170,7 @@ def app():

sims = []
with st.spinner(
"Running simulation... Slow simulations may indicate unreasonable parameter values leading to unrealistically large outbreaks."
"Running simulation... Slow simulations may indicate unreasonable parameter values leading to unrealistically large total numbers of infections."
):
tic = time.perf_counter()
for i in range(nsim):
Expand Down Expand Up @@ -238,7 +238,7 @@ def app():
f"Distribution of the total number of infections seen in {n_generations} generations."
)
st.altair_chart(
alt.Chart(get_outbreak_size_df(sim_df))
alt.Chart(get_total_infection_count_df(sim_df))
.mark_bar()
.encode(
x=alt.X("size:Q", bin=True, title="Number of infections"),
Expand Down
2 changes: 1 addition & 1 deletion ringvax/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def prob_control_by_gen(df: pl.DataFrame, gen: int) -> float:
return 1.0 - (size_at_gen.shape[0] / n_sim)


def get_outbreak_size_df(df: pl.DataFrame) -> pl.DataFrame:
def get_total_infection_count_df(df: pl.DataFrame) -> pl.DataFrame:
"""
Get DataFrame of all total outbreak sizes from simulations
"""
Expand Down

0 comments on commit ee038a4

Please sign in to comment.