Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualize whole tree of infections #55

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

Visualize whole tree of infections #55

wants to merge 12 commits into from

Conversation

afmagee42
Copy link
Contributor

@afmagee42 afmagee42 commented Dec 23, 2024

Resolves #24 and #15. Solves #53 along the way because the broken plots that led to were driving me crazy.

Code lives in ringvax.plot, and I'm rather tempted to wrap it all up into a plotting object since that would avoid a lot of unneeded passing of objects around (the simulation, plotting parameters, and the plot itself).

Colors and styles can and probably should be argued over. I strove to keep things clean and visible first and foremost, but also to use our color palette and keep things accessible. I think this is mostly achieved, except perhaps marking detections which is a bit ugly. I tried delineating detection types by color, instead of shape, but I ran out of colors that were both easy to see on both latent and exposed backgrounds and which were truly distinctive from each other.

To keep some of the plotting-induced post-processing sane, I added infection attributes: the id and the infectees.

@afmagee42 afmagee42 requested a review from swo December 23, 2024 22:15
@swo swo mentioned this pull request Dec 26, 2024
@swo
Copy link
Contributor

swo commented Dec 26, 2024

Pretty cool!!

image

I'm guessing this is:

  • Gray bars are latent
  • Blue/teal/gray is infectious
  • Green lozenge is passive detection(?)
  • Orange lozenge is active detection(?)
  • Gray ticks are onward infections that are not tracked

I could really use a legend or something!

Also, I would have expected to see:

  • Index infection
  • Contacts
  • Contacts of contacts
  • Contacts of contacts of contacts

But it looks like this is actually there is one more? This is telling me our default "number of simulated generations" should be 3, not 4? Does "simulated" include the index? I'll break this off as a separate issue (#62)

This was referenced Dec 26, 2024
Copy link
Contributor

@swo swo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could definitely work. I have some questions to make sure we're going the right way first.

poetry.lock Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got an error about matplotlib, see #61

ringvax/__init__.py Show resolved Hide resolved
ringvax/__init__.py Outdated Show resolved Hide resolved
ringvax/__init__.py Outdated Show resolved Hide resolved
ringvax/plot.py Outdated Show resolved Hide resolved
@swo swo mentioned this pull request Dec 27, 2024
@afmagee42
Copy link
Contributor Author

Re: legend and what things are: yes we need one, but I figured we should agree on the aesthetics we liked first.

E.g., I also have #64 (which is what I thought I had opened this PR on... oops... but you've got the right interpretation for what's been shown here)

image

which I think is in many ways better, but requires shapes for detection.

@afmagee42
Copy link
Contributor Author

To-dos and to-considers from sync disc:

  • Axis/axes
  • Different color for un-simulated forward infections vs actual infections
  • Generation labels for infections
  • Do we want "empty" post-detection "counterfactual infectious"?
  • Colors are... perhaps bland

@afmagee42 afmagee42 marked this pull request as draft December 30, 2024 16:31
@swo swo mentioned this pull request Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infection-level view outout (tab?)
2 participants