Skip to content

HACC17/SurfGeckos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SurfGeckos

(U) Source code for HACC 2017 contributions to Department of Health soil inspections

The ultimate goal is to automate the risk assessment of land intended for development based on soil analsis. Current procedures are found here:

http://eha-web.doh.hawaii.gov/eha-cma/Leaders/HEER/environmental-hazard-evaluation-and-environmental-action-levels

This project builds upon and improves upon the spreadsheet EAL Surfer (HDOH Summer 2016rev Jan 2017).xlsx, found here: http://eha-web.doh.hawaii.gov/eha-cma/documents/b4061863-2cd0-4880-8af3-f969d71aa27a

From the command line

git clone https://github.com/HACC17/SurfGeckos.git
cd SurfGeckos
virtualenv env
source env/bin/activate
pip install -r requirements.txt
cd djangosite
# create local .sqlite db
python manage.py migrate
# create a superuser
python manage.py createsuperuser
# load a copy of our test database
python manage.py loaddata db.json
# start server
python manage.py runserver

HEER can modify data in the admin portion, 127.0.0.1:8000/admin

To view the user dialogue, go to 127.0.0.1:8000/

You can create a site report and then print a pdf of the report from your browser.

Everything works with SQLite by default. To use MongoDB, it must be installed and running on your computer. To run from a command line:

mongod

Auxillary files in the src directory:

  • excel2db.py

    Loads excel file into MongoDB or SQLite database

    To use as a module:

     from excel2db import Loader
     myfile = <excel file>
     mydb = <database name>
     Loader(myfile, mydb)
    

    SQLite is the default. To use MongoDB:

    Loader(myfile, mydb, mongo=True)

    From the command line:

    python excel2db.py <excel file>

    OR

    python excel2db.py <excel file> --mongo

  • compiler.py

    To use as a module:

     from compiler import SurferReport
     report = SurferReport(input_data)
     report.record
    

    From the command line (tests code on sample input):

    python compiler.py

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •