- Notifications
You must be signed in to change notification settings - Fork1
Overcoming uncertainty to enable estimation and forecasting of Zika virus transmission
License
vecnet/zika
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
New research from the University of Notre Dame will be used to generate maps that provide time-sensitive estimates ofmosquito densities, human birth rates and Zika transmission activity across Latin America and the Caribbean.The model outputs will be available online to provide users with the ability to find reported cases and estimatedincidences by location to improve disease transmission and prevalence forecasts, which is critical to makingaccurate predictions and translating results into effective public health strategies.
The study is being conducted by Alex Perkins, Eck Family Assistant Professor of Biological Sciencesand Eck Institute for Global Health affiliated faculty member, who received a rapid response grant (RAPID)from the National Science Foundation’s (NSF) Division of Environmental Biology’s Ecology and Evolution ofInfectious Diseases Program for his research proposal that focuses on enabling estimation andforecasting of Zika virus transmission. NSF created these RAPID awards in order to specifically understandthe rate of spread, number of infected people and the likely persistence of Zika as a public health threat,and to help prepare for the next outbreak.
Results from the project will benefit the Zika public health emergency response, as researchers will havetools in place to share quality data and forecasts both during the study and after the project concludes.This will be a valuable asset for policymakers as they continue to make decisions surrounding this disease.
#System requirements
This Django project has been tested on Windows 10 x64, MAC OS 10.7 and CentOS 7
- Django 1.11
- Python 3.4
- PostgreSQL 9.4
- Apache 2.4
Project documentation, including meeting minutes is on Google Drive -https://drive.google.com/drive/folders/0BwiQpgfLBcI1aVVtQ2VoVnBoMHc
#Quick Start Guide
Create database structures
./manage.py migrate
Check if there are database migrations by reviewing the list of known migrations:
./manage.py migrate --list
Create an admin user
./manage.py createsuperuser
Upload simulation dataClick the 'Upload Simulation' link.Select this file: website/apps/simulation/data/data_cases_combo_new.csvClick Upload. There will now be data to visualize in charts and maps.
Rundocker-compose
up in the project's rootdirectory to quickly start development without having to setup aspecific dev environment first.
By default, the web interface is reachable at 'http://127.0.0.1:8001',while the database is listening on port 5433.
#Using Vagrant
Create Virtualbox VM
vagrant up
. It may take a while when starting VM for the first timeLogin to VM using
vagrant ssh
command or your favorite ssh client. Login: vagrant, password vagrantSwitch to /vagrant directory
cd /vagrant
Start django server
python manage.py runserver 0.0.0.0:8000
Note you have to use 0.0.0.0 as server address, otherwise port forwarding may not work
You can edit files in your project directory, and changes will be visible to the virtual machine(in /vagrant directory)
Credentials
SSH Login: vagrant, password vagrant
PostgreSQL Database: zika, Login: zika, Password: zika
Note: To utilize the PostgreSQL database, create asettings_local.py
file containing the following:
DATABASES= {'default': {'ENGINE':'django.db.backends.postgresql_psycopg2','NAME':'zika','USER':'zika','PASSWORD':'zika','HOST':'127.0.0.1','PORT':'5432', }}
By default, website.settings.dev is used for manage.py and website.settings.prod is used in wsgi.pyIt is typically required to change default settings file used in manage.py in production and qa enviroments
Exporting DJANGO_SETTINGS_MODULE variable
This method works well on the command line, but it doesn't seem to work with apache - SetEnv doesn't seem to have any effect when mod_wsgiis initalizing wsgi application object.
- Creating config_local.py in the root folder (next to wsgi.py and manage.py)
Note if DJANGO_SETTINGS_MODULE is defined, it takes precedence over settings_module in config_local.py
Example:
settings_module="website.settings.qa"
Check wsgi.py and manage.py to see how it works - they are different from default versions generated by Django.
Copy config_local_example.py to config_local.py
Generate new SECRET_KEY in settings_local.py
Enable VecNet SSO
Make sure web server has write access to media and logs directories
sudo chown avyushko:www-data logssudo chmod -R g+rw logssudo chown avyushko:www-data mediasudo chmod -R g+rw mediasudo chmod g+rwx media/simulation_files
Install django-auth-pubtkt package
pip install django-auth-pubtkt
Copy public key for validating pubtkt tickets to /etc/httpd/conf/sso/tkt_pubkey_dsa.pem
Enable DjangoAuthPubtkt middleware - put snippet below to website/settings_local.pyOrder is important - if you choose to keep standard Django authenticationbackends, then django_auth_pubtkt.DjangoAuthPubtkt should be after them.
'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django_auth_pubtkt.DjangoAuthPubtkt', 'django.contrib.messages.middleware.MessageMiddleware',) ```4. Set configuration options below (in website/settings_local.py)```from django_auth_pubtkt.views import redirect_to_ssofrom django.conf.urls import urlLOGIN_URL = "/sso/"TKT_AUTH_LOGIN_URL = "https://www.vecnet.org/index.php/sso-login"TKT_AUTH_PUBLIC_KEY = '/etc/httpd/conf/sso/tkt_pubkey_dsa.pem'SSO_URLS = [url(r'^sso/', redirect_to_sso),]