Code Monkey home page Code Monkey logo

waterbeacon's Introduction

waterbeacon

waterbeacon

Resources

Water quality data

NSF Water Quality Index

Water quality index calc

API Installation Guide

You'll need to install python3 along with pip.

Next, you'll need to install python virtual environment wrapper. You can do so by running pip install virtualenvwrapper.

Now, activate a python virtual environment by running mkvirtualenv ${ENV_NAME}. The ENV_NAME is arbitrary. We'll use "wb" for simplicity.

Finally, run pip install -r requirements.txt to install necessarry dependencies.

Before moving forward, make sure that you have postgresql installed and running. Run brew install postgresql

Make sure you have the folling tools are installed:

May be required:

Create an empty .env file touch .env.

Create the waterbeacon database by running createdb waterbeacon

(Optional - Linux Users) You may need to create a new Postgres User or update the default Postgres User to have access to the database. Do this by running the following:

sudo su - postgres

psql

CREATE USER myprojectuser WITH PASSWORD 'password';

GRANT ALL PRIVILEGES ON DATABASE waterbeacon TO myprojectuser;

You should then update the 'USER' and 'PASSWORD' to the dev.py file in the settings folder to your newly created postgres user.

When that completes, run ./manage.py migrate --settings=settings.dev to create a local postgres db instance for development.

(Optional - never necessary if csvs exist) To get all the new facility location data from the EPA, you can run ./manage.py download_epa_facility_data --settings=settings.dev

(Optional - never necessary if csvs exist) To get all the new SDWA data from the EPA, you can run ./manage.py download_epa_water_data --settings=settings.dev

(Optional) Populate the rawdata app with EPA data by running the following:

./manage.py import_epa_facility_data --settings=settings.dev;./manage.py import_epa_water_data --settings=settings.dev;./manage.py insert_facility_fips --settings=settings.dev;./manage.py data_cruncher --settings=settings.dev

Finally, run ./manage.py runserver --settings=settings.dev to kick off a dev server.

The dev server will run on localhost:8000 by default. If you prefer another port, just pass the desired port number following the previous command. That is ./manage.py runserver --settings=settings.dev ${PORT}

Note: to deactive the virtual env wrapper, just run deactivate.

Frontend Installation Guide

Navigate to the frontend directory where the react app is located and run install

  • cd frontend
  • npm install

After installation you can run npm start which will run the react app on localhost:3000 with "hot reload" enabled.

Server Installation Notes

In primary folder create a .env file and place the following parameters:

DEBUG=
DATABASE_URL=
PG_USERNAME=
PG_PASSWORD=
ENVIRONMENT=
DJANGO_SETTINGS_MODULE=
CELERY_BROKER_URL=
FLOWER_PORT=
TWITTER_ACCESS_TOKEN_SECRET=
TWITTER_ACCESS_TOKEN=
TWITTER_CONSUMER_SECRET=
TWITTER_CONSUMER_KEY=
VIRTUAL_PORT=
SENTRY_DSN=
EMAIL_FROM=

Within ./frontend folder create a .env file and place the following parameters:

VIRTUAL_HOST=[domain]

waterbeacon's People

Contributors

andersjr1984 avatar brandonkeao avatar dav1do avatar dependabot[bot] avatar dhausk avatar dviramontes avatar mosesmc52 avatar sco-bo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

waterbeacon's Issues

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.