A research project to explore how different public health interventions could improve or worsen the burden of long covid, as measured in Disability Adjusted Life Years
-
Install Node (if you don't have it): https://nodejs.org/en/download
-
Set up Git (if you haven't) https://docs.github.com/en/get-started/git-basics/set-up-git
-
Fork the repository https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo#forking-a-repository
-
Clone the repo to your local machine https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo#cloning-your-forked-repository
-
(if you're going to contribute back to this repo) Add this repo as the "upstream" https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo#configuring-git-to-sync-your-fork-with-the-upstream-repository
-
Install dependencies
cd long-covid-dalys/npm install
-
Preview:
npm run dev
The site will be available at
http://localhost:5173
- Data lives in
src/data/directoryDALYs.json- Baseline DALY projections (main chart data)
- Configuration lives in
src/configscenarios.tsdefines the various public health scenarios and their data structure
Format for src/data/DALYS.json:
[
{
"year": 1,
"baseline": 258,
"HEPAMostCommonSpaces": 246,
"HEPASchoolsAndDaycare": 233,
"HEPAAllPublicIndoor": 162,
"farUVCMostCommonSpaces": 240,
"farUVCSchoolsAndDaycare": 226,
"farUVCAllPublicIndoor": 131
},
{
"year": 2,
"baseline": 258,
"HEPAMostCommonSpaces": 246,
"HEPASchoolsAndDaycare": 233,
"HEPAAllPublicIndoor": 162,
"farUVCMostCommonSpaces": 240,
"farUVCSchoolsAndDaycare": 226,
"farUVCAllPublicIndoor": 131
},
...
]year: number 1-10, for number of years of the projectionbaseline: baseline scenario, and each further scenario.- numbers are the resultant DALYs
To update: Replace src/data/DALYS.json with your updated projections that match the above format. The chart will use the new data.
- Easiest method: use the GitHub web interface to replace the
src/data/DALYS.jsonfile.
After updating data files:
- Development mode:
npm run dev- See changes immediately with hot reload - Production build:
npm run build- Create optimized build for deployment - Preview build:
npm run preview- Test the production build locally
After updating data files and verifying they work:
- Commit your changes:
git add . && git commit -m "a message describing your changes, such as: Update DALY projections" - Push to your repository:
git push - Open a pull request against the "upstream" repo: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork
- Once merged, the application will automatically rebuild and deploy to Netlify
This project bootstrapped from the following Vite template: React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptionsproperty like this:
export default tseslint.config({
languageOptions: {
// other options...
parserOptions: {
project: ["./tsconfig.node.json", "./tsconfig.app.json"],
tsconfigRootDir: import.meta.dirname,
},
},
});- Replace
tseslint.configs.recommendedtotseslint.configs.recommendedTypeCheckedortseslint.configs.strictTypeChecked - Optionally add
...tseslint.configs.stylisticTypeChecked - Install eslint-plugin-react and update the config:
// eslint.config.js
import react from "eslint-plugin-react";
export default tseslint.config({
// Set the react version
settings: { react: { version: "18.3" } },
plugins: {
// Add the react plugin
react,
},
rules: {
// other rules...
// Enable its recommended rules
...react.configs.recommended.rules,
...react.configs["jsx-runtime"].rules,
},
});