Code Monkey home page Code Monkey logo

covidcrowd's Introduction

CovidCrowd

A crowd-sourcing platform for the Covid-19 Pandemic

This is NOT the project that powers the Covid 19 India Dashboard. Click here to switch to the dashboard project.

Workflow

Note: This workflow was never fully implemented. The primary data collection is still based out of Google Sheets

FlowChart

Development Setup for Backend

  1. Install Spatial Data Requirements

For Ubuntu

sudo apt install libsqlite3-mod-spatialite python-gdal
sudo apt-get install memcached libmemcached-tools -y

For Mac

brew update
brew install spatialite-tools
brew install gdal
  1. Setup virtual environment
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
  1. Create a new .env from example.env and populate the values
cp example.env .env
# Edit the .env file according to your needs. If you are new to decouple library read this https://pypi.org/project/python-decouple/
  1. Generate the local db
python manage.py migrate
  1. To access the admin pages - create a super user
python manage.py createsuperuser
  1. Start local development server
python manage.py runserver

Populating the Database

The Raw Data sheet from the Google Sheets is dumped as a CSV file into the data folder periodically and can be used for initializing or updating the database.

python manage.py importcsv ./data/raw_data.csv

This will create a new report for every row that has a data entry. Mainly it looks to see if the Date Announced column has a value. If the Patient number is already present it will be skipped. So running multiple imports is not an issue.

You can also load the patient travel history into the project using

python manage.py importcsv ./data/travel_history.csv --type travel

Development Setup for the frontend

There are two frontends for this application:

  1. Server side rendered frontend based on Django Templates. This frontend has the crowdsourcing functionality.
  2. Client side rendered frontend based on React. This is just provides a table interface and patient details page for browsing the patient database.

There is nothing to be done for the Django based frontend. This Backend setup would automatically handle this.

Setting up the React Frontend

Install all the node dependencies and start the development server.

cd frontend
yarn
yarn start

A Note about caching

Due to the high traffic load a number of Django views are cached. This might interfere with your development. See patients/urls.py for all the cached views and their durations.

covidcrowd's People

Contributors

dependabot[bot] avatar harish2704 avatar junaidbabu avatar kiranbkrishna avatar muhammed-ajmal avatar tecoholic avatar usr3 avatar vijaysaimutyala avatar xqzkio 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

Watchers

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

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.