Skip to content

Adding more school data and updating the news#50

Open
gvegayon wants to merge 2 commits intomainfrom
gvegayon/adding-school-data
Open

Adding more school data and updating the news#50
gvegayon wants to merge 2 commits intomainfrom
gvegayon/adding-school-data

Conversation

@gvegayon
Copy link
Copy Markdown
Member

This pull request introduces several improvements and new features focused on integrating the measles R package, enhancing the measles school selector, and updating the development environment configuration. The most significant changes include switching to the measles package for modeling, expanding and restructuring school data handling (including Utah schools), updating the devcontainer setup, and improving usability in the measles model UI.

Measles model and data integration:

  • Switched the measles model implementation from epiworldR::ModelMeaslesQuarantine to measles::ModelMeaslesQuarantine to leverage the new measles R package. (inst/models/shiny_measles.R)
  • Added the measles package as an import and now display its version in the app footer. (DESCRIPTION, R/app.R) [1] [2] [3]
  • Enhanced the school selector for the measles model: users can now select schools from a more comprehensive database (including Utah data), with a cascading dropdown (State → County → School), and upload custom data via CSV. (NEWS.md, Makefile, data-raw/01_utah_school_data.R, data-raw/02_download_and_combine.R, data-raw/.gitignore) [1] [2] [3] [4] [5] [6]

Development environment and devcontainer updates:

  • Replaced the old Dockerfile with a new Containerfile based on the rocker-org/devcontainer/tidyverse:4.5 image, streamlining package installation and setup. (.devcontainer/Containerfile, .devcontainer/Dockerfile, .devcontainer/devcontainer.json) [1] [2] [3]
  • Updated VS Code settings to enforce a 2-space tab size for R files in the devcontainer. (.devcontainer/.vscode/settings.json)

Measles model UI and usability improvements:

  • Improved handling and display of school data in the selector, including notification messages and better filtering logic. (inst/models/shiny_measles.R) [1] [2] [3] [4]

Other project maintenance:

  • Updated .Rbuildignore and package metadata for consistency and to reflect new dependencies and features. (.Rbuildignore, DESCRIPTION) [1] [2]

This comment was marked as resolved.

@gvegayon
Copy link
Copy Markdown
Member Author

Pull request overview

This PR updates the measles Shiny model to use the new measles R package, expands the default school dataset (including Utah), and refreshes the devcontainer setup used for development.

Changes:

  • Switch measles model implementation to measles::ModelMeaslesQuarantine and display the measles package version in the app footer.
  • Expand and restructure measles school data handling (new Utah dataset + updated combine script).
  • Update the devcontainer build configuration (Containerfile + editor settings).

Reviewed changes

Copilot reviewed 14 out of 16 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
inst/models/shiny_measles.R Switches model backend to measles and refines the cascading school selector / CSV upload flow.
R/app.R Adds measles version info to the footer.
DESCRIPTION Adds measles to Imports and updates RoxygenNote.
NEWS.md Documents measles package usage and expanded school selector/data.
data-raw/02_download_and_combine.R Downloads/combines school datasets and appends Utah-specific data into inst/extdata.
data-raw/01_utah_school_data.R Generates a Utah school CSV from a local raw input file.
data-raw/01_utah_school_data.csv Adds Utah school data used in the combined dataset.
data-raw/.gitignore Ignores the Utah raw input file used to generate the processed Utah CSV.
Makefile Splits update-data into Utah + non-Utah steps.
.devcontainer/devcontainer.json Points devcontainer build to the new Containerfile.
.devcontainer/Containerfile New devcontainer image build steps and R dependency installs.
.devcontainer/Dockerfile Removes the old devcontainer Dockerfile.
.devcontainer/.vscode/settings.json Adds R editor tab sizing configuration for the devcontainer.
.gitignore Ignores .vscode and rsconnect.
.Rbuildignore Minor normalization of ignore entries.
Comments suppressed due to low confidence (1)
data-raw/02_download_and_combine.R:59

  • data_ is filtered with complete.cases() before appending Utah rows, but the appended Utah dataset contains missing values (e.g., blank vaccination_rate), so incomplete rows can leak into inst/extdata/schools_measles.csv. Move the complete.cases() filtering (and any type/range validation) to after the Utah rbind(), or filter both sources before combining.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Thanks for your feedback, @copilot code review[agent]. Go ahead and implement some of the suggestions you made. Another thing that I would like you to do is go over the shiny_measles.R model and perhaps refactor it to reduce repetitive code. I noticed that the current implementation has many calls that may be reduced or recycled. I just want to keep the code easier to maintain.

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 26, 2026

@gvegayon I've opened a new pull request, #51, to work on those changes. Once the pull request is ready, I'll request review from you.

…ctor measles model (#51)

* Initial plan

* Address PR review feedback: fix JSON, Containerfile, data scripts, Makefile, refactor shiny_measles.R

Co-authored-by: gvegayon <893619+gvegayon@users.noreply.github.com>

* Refactoring code and ensuring it runs fast

* Updating the news

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gvegayon <893619+gvegayon@users.noreply.github.com>
Co-authored-by: George G. Vega Yon <g.vegayon@gmail.com>
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.

3 participants