Code Monkey home page Code Monkey logo

microcovid's Introduction

CI Netlify Status Translate on Weblate

microCOVID.org

Local Development

Requirements:

  • Node.js 12
  • Yarn

(See .tool-versions for specific and up-to-date versions).

  1. Install local depenendences
    $ yarn install
  2. Start local server
    $ yarn start
  3. Open http://localhost:3000

Prevalence updates

  1. Install venv to be able to run prevalence updates
    $ python3 -m venv .venv
    $ source .venv/bin/activate
    $ pip install -r requirements-manual.txt
  2. Install the GitHub CLI to be able to using the gh command with the prevalence_helper.sh script
    # using homebrew (see GitHub page for alternate install methods)
    $ brew install gh
  3. Get a COVIDActNow.org API key from here. (If you're on the microCOVID team, you can ask for our existing API key.)
  4. Then configure your API key as such:
    $ cp .secure-keys.template .secure-keys
    # Add your API key to the line in .secure-keys that is listed as CAN_API_KEY
  5. Run a prevalence update. Pick one of the three following examples:
    # Run the prevalence update on the auto-prevalence-update branch
    $ yarn prevalence
    # Run the prevalence update, commit changes, and submit auto-merge pull request
    $ yarn prevalence -c
    # Run the prevalence update without switching branches (useful when testing changes on a feature branch)
    $ yarn prevalence -b
    # Specify the COVIDActNow.org API key
    $ yarn prevalence -k 111aaa222bbb
    # Specify where your virtualenv lives (defaults to `.venv`)
    $ yarn prevalence -v .venv-custom

Linting

We use eslint to standardize our style across files. To check your files with the linter, run:

$ yarn lint

If you see warnings, you can attempt to auto-correct them with:

$ yarn fix

If there are errors it can't fix, please fix them manually before committing.

Validating model changes

One of the tests generates computed_scenarios.json, a json of inputs and outputs for various situations. Use model_comparison.ipynb to compare the model behavior before and after model changes.

Updating Community Infection Values

Updating Slider Labels

To update the prevalance slider Labels shown in the community infection Slider component, you can change the property values prevalance_slider_label_1, prevalance_slider_label_2, prevalance_slider_label_3, prevalance_slider_label_4, prevalance_slider_label_5, prevalance_slider_label_6 located in /src/locals/en.json.

Updating Slider Values

You can add 4 values to the slider. To modify these values, you can update the property values prevalance_slider_value_min, prevalance_slider_value_2, prevalance_slider_value_3, prevalance_slider_value_max located in /src/locals/en.json. Please note that values are in multiples of 100. So a value set at 0.8 will correspond to 80 infections. Another example: a value of 7.5 will correspond to 750 infections.

microcovid's People

Contributors

amichaelcohn avatar apiology avatar beshaya avatar blanchardjeremy avatar catherio avatar cloudbyteks avatar david-mears-2 avatar dependabot[bot] avatar doctordobes avatar dominic avatar gyp avatar hazel-nut avatar henryaj avatar jaraco avatar josiah-roberts avatar justinhaaheim avatar jy2wong avatar linesarefuzzy avatar mattbell avatar microcovid-automation[bot] avatar octern avatar oremanj avatar oxytocinlove avatar rhyslindmark avatar rtwfroody avatar shawnbiesan2 avatar taymonbeal avatar tsyan avatar weblate avatar zack112358 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

microcovid's Issues

Audit Presets

Ex: Outdoor dining preset reports 210µCOV in Sacramento, which is much more than we record in the Ibasho spreadsheet.

In general, Number of People Near You seems to be fairly sensitive. We might want to consider giving guidance on this (for instance, how far is "near"?)

Default to 0.1% annualized budget?

The calculator has a baked-in 1% annualized budget. This makes sense for people in our age group, but may be reckless for:

  • anyone over the age of 50
  • anyone whole lives with someone over the age of 50
  • immunocompromised folks.

I worry we may encourage behavior that puts older folks at risk if we don't clearly warn against using this budget as a blanket rule. Maybe we also should include messaging around being careful about not coming into contact with older folks while carrying >20µCoV

It is hard to see how to enter specific prevalence data once you have selected a location already

On the calculator, the initial state allows you to enter your own prevalence data, e.g. if you know about your local area and want to use that more accurate data.

However, if you select a location, it is very difficult to see how to then revert your decision, and input your own data. Originally, when making this issue, I believed it was impossible to revert your decision. I had been going to complain that because the form selection is persisted between page reloads, you cannot get around this by reloading the page.

However, I have since found that clicking on 'Select location or enter data' in the first of the two location drop-downs allows me to enter my own data.

It's not just me who has found it difficult to find the way to revert the decision. I shared the site with my partner (while telling her not to share it on further) yesterday, and she commented on this (unsolicited):

it's a shame microcovids doesn't let you have more granularity than 'England'. It would be good if i could enter cases in Hackney or London + population, because i'm guessing the risk that the calculator outputs will be 'diluted' by all the less-risky parts of england

i get that they can't have access themselves to data for everywhere in the world, but it looks like i ought to be able to adjust the pop and case numbers myself, but I can't.

I suggest adding a button saying 'Fill in own data' which has the same effect as clicking 'Select location or enter data'. I most likely will not have time to make this button myself before launch.

[Blog] Add thank you to essential workers in Intermediate Risk

I experience some dissonance reading that healthcare workers are 3x regional, or 8000µCoV in our area, while Sarah's workweek costs 9µCoV.

Since the calculator doesn't support rated PPE, it's not even possible for others to calculate out what their frontline workers risks are.

Perhaps this needs some messaging around "Basic/Intermediate are for people you can't or don't want to have detailed risk discussions with"

Make the white paper portion searchable?

Peter asks "Do you have any plans to make the white paper portion searchable? When it’s broken out across multiple pages, I can’t ctrl-f" => personally I think this is an insanely good idea

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.