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

Updated plot_matrix() function, resolved bug in load_survey and some minor updates. #133

Merged
merged 10 commits into from
Sep 25, 2024

Conversation

lwillem
Copy link
Contributor

@lwillem lwillem commented Sep 23, 2024

The plot_matrix function previously relied on the deprecated image.plot() from the fields package, which was only used for a single plotting function. This dependency has now been resolved by switching to the base image function and explicitly setting the margins for the main plot and the legend within the plot_matrix() function.

A bug in load_survey() has been resolved, which occurred when the provided files did not include a reference file in JSON format.

The check() function has been updated to account for the possibility that the participant's age can be provided as a range. This previously led to unsuccessful checks in the existing code.

Additionally, some minor textual changes have been made to the documentation, ensuring that the contact matrix consistently retains dim.names.

…provided in "part_age", the min and max age are incorporated in the data table with columns with 'part_age_est_min" and "part_age_est_max" in line with the contact data and the contact_matrix(...) function.
…participant's age can be provided as a range, which previously caused an unsuccessful check in the existing code.
… respect to the 'estimated.participant.age' parameter.
…re the provided files do not include a reference file in JSON format.
* commit '3400e326c01e46261f235e93a686c7ad3cc53a77':
  remove missing population data
  add news item
  Bump JamesIves/github-pages-deploy-action from 4.6.1 to 4.6.4
  simplify cleaning of limits
…t_matrix()` by using the base `image` function instead. Additionally, the margins of the main plot and the legend were explicitly set within the `plot_matrix()` function. The `fields` package, which contains tools for spatial data, was utilised only for one plotting function.
…timated.participant.age` within the `contact_matrix` function.
…ata with the new option in `contact_matrix`, where either the mean participant data or ranged data should be provided. The code now checks for the actual error message "[X and Y] do not exist," whereas it was previously expecting "[X] does not exist."
…etained after making the matrix symmetric or performing the split procedure.
@lwillem lwillem mentioned this pull request Sep 23, 2024
Copy link
Collaborator

@sbfnk sbfnk left a comment

Choose a reason for hiding this comment

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

Thanks @lwillem, this is great!

Only request for next time is to split different issues into different Pull Requests (i.e. this could be one for the bug, one for the column names, and one for plotting) but anyway it's all good stuff!

@sbfnk sbfnk merged commit 009db78 into epiforecasts:main Sep 25, 2024
7 of 9 checks passed
@lwillem
Copy link
Contributor Author

lwillem commented Sep 25, 2024

Okay, thank you. I will do that next time.

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.

2 participants