Overview

From the Unified Crime Reporting Statistics and under the collaboration of the U.S. Department of Justice and the Federal Bureau of Investigation information crime statistics are available for public review. The following data set has information on the crime rates and totals for counties across the United States for a wide range of years. The crime reports are divided into two main categories: property and violent crime. Property crime refers to burglary, larceny, and motor related crime while violent crime refers to assault, murder, rape, and robbery.

http://www.ucrdatatool.gov/Search/Crime/Local/JurisbyJurisStepTwo.cfm

Downloads

Download all of the following files.

Usage

Begin by adding the above JAR file to your classpath. This library has 3 functions you can use.
import corgis.county_crime.CountyCrimeLibrary;
import corgis.county_crime.domain.*;
import java.util.ArrayList;

public class ExampleClass {
    public static void main(String[] args) {
        // Get access to the library
        CountyCrimeLibrary countyCrimeLibrary = new CountyCrimeLibrary();
        // Access data inside the library
        ArrayList<Report> list_of_report = countyCrimeLibrary.getAllCrimes(false);ArrayList<Report> list_of_report = countyCrimeLibrary.getCrimeByCounty("Alabaster Police Dept", false);ArrayList<Report> list_of_report = countyCrimeLibrary.getCrimeByYear(1984, false);
    }
}
Additionally, some of the functions can optionally return Big Data using the last argument (setting it to true). If you use this Big Data, it may be much slower. Wait until you are sure your code is correct before using these examples.
import corgis.county_crime.CountyCrimeLibrary;
import corgis.county_crime.domain.*;
import java.util.ArrayList;

public class ExampleClass {
    public static void main(String[] args) {
        // Get access to the library
        CountyCrimeLibrary countyCrimeLibrary = new CountyCrimeLibrary();
        // Access data inside the library
        ArrayList<Report> list_of_report = countyCrimeLibrary.getAllCrimes(true);ArrayList<Report> list_of_report = countyCrimeLibrary.getCrimeByCounty("Alabaster Police Dept", true);ArrayList<Report> list_of_report = countyCrimeLibrary.getCrimeByYear(1984, true);
    }
}

Documentation

We provide full JavaDoc for this library. Alternatively, you may refer to the below:

 countyCrimeLibrary.getAllCrimes(test)

Gets a list of all the crime reports in the database.

 countyCrimeLibrary.getCrimeByCounty(department, test)

Given the name of an county, returns all the crime reports for that county in the database.

 countyCrimeLibrary.getCrimeByYear(year, test)

Given a year, returns all the crime reports for that year in the database.