A crowd-sourcing platform for the Covid-19 Pandemic
- Install Spatial Data Requirements
sudo apt install libsqlite3-mod-spatialite python-gdal
brew update
brew install spatialite-tools
brew install gdal
- Setup virtual environment
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
- Create a new
.env
fromexample.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/
- Generate the local db
python manage.py migrate
- To access the admin pages - create a super user
python manage.py createsuperuser
- Start local development server
python manage.py runserver
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.