femmestem / building-code-violations

This program parses a comma separated dataset containing building code violations, and it calculates number of violations in each category, and the earliest and latest violation date for each category. The results are logged out to the console and exported to a new csv file.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code For America - Developer Fellowship Technical Question

Project Description

This program parses a comma separated dataset containing building code violations, and it calculates number of violations in each category, and the earliest and latest violation date for each category. The results are logged out to the console and exported to a new csv file violations_by_category.csv.

Download dataset from Code for America.

Contributors

Christine Feaster (@femmestem)

Developer Documentation

This project is written using the Ruby standard library.

Requirements

  • Git
  • Ruby 2.2 (RVM recommended for managing Ruby versions)

To check your ruby version, run $ ruby --version. If your version is 2.2.0, then you’re good to go.

If not, download RVM if not already installed, then run $ rvm list to see your installed ruby versions. If you have 2.2.0 installed, run $ rvm use ruby-2.2.0. Otherwise, install or update your ruby version with RVM.

  1. Download or clone this repository from GitHub $ git clone https://github.com/femmestem/building-code-violations.git building-code-violations
  2. Change directory into the project folder $ cd building-code-violations
  3. To execute the script, run: $ ruby application.rb
    This will create a new csv file violations_by_category.csv in the project root directory that contains number of violations in each category, and the earliest and latest violation date for each category.

About

This program parses a comma separated dataset containing building code violations, and it calculates number of violations in each category, and the earliest and latest violation date for each category. The results are logged out to the console and exported to a new csv file.


Languages

Language:Ruby 100.0%