GithubHelp home page GithubHelp logo

immunizationsj's Introduction

immunizationSJ

The current implementation uses Flask as a basic web framework for displaying the results from the database. The database is populated from data originating in an Excel file which has been converted to CSV format which has then been input into csv_to_sql.py and db_utils.py.

Preparing the Excel file for export to CSV

The provided Excel spreadsheets contain headers which span multiple columns. They also contain Unicode characters which do not readily transfer over to JSON or HTML without additional work or configuration.

The column headers should be changed and title information leading up to the actual rows of data should be removed, in addition to the symbol legend which is at the very bottom of the data set. The current column header titles can be seen in the 2014-15 CA Kindergarten Data.csv file, and are:

SCHOOL CODE,COUNTY,PUBLIC  PRIVATE,PUBLIC SCHOOL DISTRICT,CITY,SCHOOL NAME,ENROLLMENT,# UP-TO-DATE,% UP-TO-DATE,# CONDITIONAL,% CONDITIONAL,# PME,% PME,# PBE,% PBE,# PRE-JAN PBE,% PRE-JAN PBE,# HEALTH CARE PRACTITIONER COUNSELED PBE,% HEALTH CARE PRACTITIONER COUNSELED PBE,# RELIGIOUS PBE,% RELIGIOUS PBE,# DTP,% DTP,# POLIO,% POLIO,# MMR,% MMR,# HEPB,% HEPB,# VARI,% VARI,REPORTED

The file can then be saved or exported as a CSV that is ready for the next step.

##Using virtualenv (optional)

Install virtualenv via pip:

$ pip install virtualenv

Create virtualenv for this project:

 $ cd immunizationSJ
 $ virtualenv venv

virtualenv venv will create a folder in immunizationSJ directory which will contain the Python executable files, and a copy of the pip library which you can use to install other packages.

To begin using the virtual environment, it needs to be activated:

. venv/bin/activate

The name immunizationSJ will now appear on the left of the prompt (e.g. (venv)Your-Computer:immunizationSJ UserName$) to let you know that it’s active. From now on, any package that you install using pip will be placed in the venv folder, isolated from the global Python installation.

Now install flask: pip install flask

Create the database

Run the provided db_utils.py utility program with the create option:

python db_utils.py create

Populate the database with the CSV data

Run the provided csv_to_sql.py utility program, giving arguments for the appropriate input file (-i), year (-y), and grade (-g):

python csv_to_sql.py -i data/2014-15\ CA\ Kindergarten\ Data.csv -y 2014 -g K

Run the app

Start the Flask application by running app.py:

python app.py

With this running, open a web browser to http://127.0.0.1:5000/

immunizationsj's People

Contributors

kgfbaby avatar kyle-falconer avatar

Watchers

 avatar  avatar

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.