Skip to content

Latest commit

 

History

History
76 lines (52 loc) · 1.78 KB

README.md

File metadata and controls

76 lines (52 loc) · 1.78 KB

CovidCrowd

A crowd-sourcing platform for the Covid-19 Pandemic

Workflow

FlowChart

Development

  1. Install Spatial Data Requirements

For Ubuntu

sudo apt install libsqlite3-mod-spatialite python-gdal

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.

Note: It will only generate "Report" objects and not "Patient" objects. You will have to manually create a patient based on the imported reports. Apologies for inconvenience during setup. We emphasize on clarity of data over simplicity of creating a patient record.