Code Monkey home page Code Monkey logo

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 Project's Projects

microcovid icon microcovid

Estimating the COVID risk of ordinary activities

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.