Code Monkey home page Code Monkey logo

philly-open-health's Introduction

Mission Statement

Philly Open Health increases access to and availability of public health data for Philadelphia and surrounding counties. There is a huge amount of publicly-available population health data available for the greater Philadelphia area, but it isn't technically "open data". While some of the data on Philly Open Health will be open (machine-readable) data, such as population demographics, other data will be sourced from PDFs, siloed databases, and filtered federal data sets. The combination of data sources and types will provide a more comprehensive look at population health in the greater Philly area, even though open data in the public health arena is limited.

The jumping-off point for Philly Open Health is the [Office of HIV Planning (OHP)] (http://www.hivphilly.org/)'s annual epidemiologic profile (or "epi" profile), which covers Philadelphia and eight surrounding counties in two states. This document includes over 200 tables and 100 figures on everything from race/ethnicity to drug use to poverty to HIV/AIDS. This document has always been designed for print, which means that limited data are included for presentation. OHP would like to provide the public with the data used in developing the epi profile in one centralized location.

Getting Started with Development!

Please take a look at the requirements_notes.md in this directory for an overview of our 1.0-release feature goals.

Minimum Viable Product:

  • Documents have:
    • Title
    • Description
    • Date Collected
    • Date Published
    • Tags
      • Basic level of suggestion to prevent tag explosion
    • Source (who did this - can be just a text field MVP)
    • 1 or more files
  • Files can be uploaded only by users
  • Users can only be created by an existing admin user

You can view the first batch of files on Dropbox here. Metadata for these files is being compiled in a Google Sheet here.

We're also doing some lightweight project management over at Trello to keep track of what tasks are underway and who's working on them.

Actually running the code!

Start by copying the config/database.example.yml file over to config/database.yml.

Next, if you're on a Mac, make sure you have a Postgres server running locally (dowloading the app is probably your best bet).

Then create a user. In the terminal type:

rake db:migrate

rails c
u = User.new(email: "[email protected]")
u.password = "yourpassword"
u.password_confirmation = "yourpassword"
u.save

Then seed the database, and start the server:

rake db:seed
rails s

The output will tell you where to point your browser. Usually this is "http://localhost:3000/"

If you get the following error

ActiveRecord::NoDatabaseError: FATAL:  database "philly-open-health_development" does not exist

Make sure to create the database first. Run

bin/rake db:create db:migrate

to create the database.

Annotating models

To annotate the models, run

bundle exec annotate --exclude tests,fixtures,factories,serializers

Running tests

To run tests with Spring preloading, use bin/rspec.

philly-open-health's People

Contributors

brianalmorgan avatar cfarm avatar chadoh avatar dhaneshnm avatar elowing avatar jamesclarence avatar jennvoss avatar jff006 avatar mooreryan avatar thedeeno avatar titlecharacter avatar torresga avatar yyypp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

philly-open-health's Issues

Add contributors page

Add a page listing contributors to the project, and perhaps link from the footer or some other discreet location.

Rename DataSet to Dataset

"Dataset" is a perfectly acceptable English word! Let's simplify our domain model and save ourselves from typing a bunch of underscores. :smiling:

Lay UI foundation for how we want to add/edit Datasets

When you click "create dataset", here's what should happen:

  • A new, blank dataset is created in the database immediately (this differs from normal Rails stuff)
  • You get redirected to the "show" page for this new dataset
  • The "Title" field, nice and big in an >h1< at the top, is a form field, with "Untitled" as placeholder text, and is autofocused
  • The "Title" field has its own "Save" button
  • There's also an empty "description" field, with its own save button
  • Right now, these are the only two editable fields on Dataset, so they will be the only things shown
  • If a user who isn't logged in visits the page for this dataset, they should not see the forms, but only the values of those fields

Eventually, we'll want to pretty this up with some fancy JavaScript stuff, but this works for now.

DataSet has_many Files, yo!

Create the Files model. A DataSet needs to have_many Files (and a File has to belong_to DataSet).

This model will basically have NO attributes, except for a file upload. I suggest using filepicker.io for the file uploads. Filepicker.io has great documentation and should help you get started.

The most complex part is probably the UI. Add a "Add File" button to the data_sets#show page, and make it so that once you upload something and then save the file, you end up back at the data_sets#show page, with the new file showing and the "Add File" button still there.

Style dataset pages

Add basic styling for the dataset detail & edit pages. See mockups in the design repo

Copy!

Write some front-page copy!

Set up RSpec

Use RSpec 3. It just came out and is hawt.

It looks like most of the current tests are empty. Feel free to delete any empty ones. If there are any useful ones, please port them over.

Be sure to also set up Rails so that generating new scaffolds uses RSpec as its test framework of choice.

Upgrade all gems and Ruby to latest

Including Rails—the current version is 4.1.something. You can remove Paperclip from the Gemfile, since it's not currently being used.

The current version of Ruby is 2.1.something. This also goes in the Gemfile, and most Ruby managers (rvm, rbenv, chruby) should respect that.

Set up find-as-you-type for tags

Users should be able to add any tag that they like, but we also want to prevent duplicate/similiar tags. As the user types in the tags input field, an autocomplete box should show up underneath it after 2-3 characters have been entered, that shows results that contain those characters.

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.