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

Explore Structure




Index Type Example Value
0 dict { }
... ... ...
Key Type Example Value Comment
"Violent" dict { }
"Property" dict { }
Key Type Example Value Comment
"Department" str "Alabaster Police Dept" The long name of the police department that this report was made for.
"State" str "Alabama" The long name of the state that this report was made for.
"Data" dict { }
"Year" int 1984 The year that this report was made in.
Key Type Example Value Comment
"Violent" dict { }
"Property" dict { }
Key Type Example Value Comment
"All" int 18 This property reflects all of the Violent crimes, including assaults, murders, rapes, and robberies.
"Murder" int 1 This property reflects the number of crimes where someone committed the unlawful killing of another human being without justification.
"Rape" int 1 This property reflects the number of crimes where someone committed rape. The FBI UCR definition of rape, before 2013, is the carnal knowledge of a female forcibly and against her will.
"Robbery" int 2 This property reflects the number of crimes where someone took or attempted to take anything of value by force or threat of force or by putting the victim in fear.
"Assault" int 14 This property reflects the number of crimes where someone made an attempt to initiate harmful or offensive contact with a person, or made a threat to do so.
Key Type Example Value Comment
"Burglary" float 234.1 Rates are the number of reported offenses per 100,000 population. This property reflects the number of burglaries, or entry into a building illegally with intent to commit a crime, especially theft.
"Larceny" float 572.2 Rates are the number of reported offenses per 100,000 population. This property reflects the number of burglaries, or theft of personal property.
"All" float 897.3 Rates are the number of reported offenses per 100,000 population. This property reflects all of the Property-related crimes, including burglaries, larcenies, and motor crimes.
"Motor" float 91.0 Rates are the number of reported offenses per 100,000 population. This property reflects the number of crimes where a motor vehicle was stolen.
Key Type Example Value Comment
"Population" int 7690 The number of people living in this state at the time the report was created.
"Rates" dict { }
"Totals" dict { }
Key Type Example Value Comment
"Burglary" int 18 This property reflects the number of burglaries, or entry into a building illegally with intent to commit a crime, especially theft.
"Larceny" int 44 This property reflects the number of burglaries, or theft of personal property.
"All" int 69 This property reflects all of the Property-related crimes, including burglaries, larcenies, and motor crimes.
"Motor" float 7.0 This property reflects the number of crimes where a motor vehicle was stolen.
Key Type Example Value Comment
"All" float 234.1 Rates are the number of reported offenses per 100,000 population. This property reflects all of the Violent crimes, including assaults, murders, rapes, and robberies.
"Murder" float 13.0 Rates are the number of reported offenses per 100,000 population. This property reflects the number of crimes where someone committed the unlawful killing of another human being without justification.
"Rape" float 13.0 Rates are the number of reported offenses per 100,000 population. This property reflects the number of crimes where someone committed rape. The FBI UCR definition of rape, before 2013, is the carnal knowledge of a female forcibly and against her will.
"Robbery" float 26.0 Rates are the number of reported offenses per 100,000 population. This property reflects the number of crimes where someone took or attempted to take anything of value by force or threat of force or by putting the victim in fear.
"Assault" float 182.1 Rates are the number of reported offenses per 100,000 population. This property reflects the number of crimes where someone made an attempt to initiate harmful or offensive contact with a person, or made a threat to do so.

Downloads

Download all of the following files.

Usage

This library has 3 functions you can use.
import county_crime
list_of_report = county_crime.get_all_crimes()
list_of_report = county_crime.get_crime_by_county("Alabaster Police Dept")
list_of_report = county_crime.get_crime_by_year(1984)
Additionally, some of the functions can return a sample of the Big Data using an extra argument. If you use this sampled Big Data, it may be much faster. When you are sure your code is correct, you can remove the argument to use the full dataset.
import county_crime
# These may be slow!
list_of_report = county_crime.get_all_crimes(test=True)
list_of_report = county_crime.get_crime_by_county("Alabaster Police Dept", test=True)
list_of_report = county_crime.get_crime_by_year(1984, test=True)

Documentation

 county_crime.get_all_crimes(test=False)

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

 county_crime.get_crime_by_county(department, test=False)

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

 county_crime.get_crime_by_year(year, test=False)

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