Analyzing Police Activity with pandas
Explore the Stanford Open Policing Project dataset and analyze the impact of gender on police behavior using pandas.
Start Course for Free4 hours16 videos50 exercises64,679 learnersStatement of Accomplishment
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.Training 2 or more people?
Try DataCamp for BusinessLoved by learners at thousands of companies
Course Description
Now that you have learned the foundations of pandas, this course will give you the chance to apply that knowledge by answering interesting questions about a real dataset! You will explore the Stanford Open Policing Project dataset and analyze the impact of gender on police behavior. During the course, you will gain more practice cleaning messy data, creating visualizations, combining and reshaping datasets, and manipulating time series data. Analyzing Police Activity with pandas will give you valuable experience analyzing a dataset from start to finish, preparing you for your data science career!
Training 2 or more people?
Get your team access to the full DataCamp platform, including all the features.- 1
Preparing the data for analysis
FreeBefore beginning your analysis, it is critical that you first examine and clean the dataset, to make working with it a more efficient process. In this chapter, you will practice fixing data types, handling missing values, and dropping columns and rows while learning about the Stanford Open Policing Project dataset.
- 2
Exploring the relationship between gender and policing
Does the gender of a driver have an impact on police behavior during a traffic stop? In this chapter, you will explore that question while practicing filtering, grouping, method chaining, Boolean math, string methods, and more!
Do the genders commit different violations?50 xpExamining traffic violations100 xpComparing violations by gender100 xpDoes gender affect who gets a ticket for speeding?50 xpFiltering by multiple conditions50 xpComparing speeding outcomes by gender100 xpDoes gender affect whose vehicle is searched?50 xpCalculating the search rate100 xpComparing search rates by gender100 xpAdding a second factor to the analysis100 xpDoes gender affect who is frisked during a search?50 xpCounting protective frisks100 xpComparing frisk rates by gender100 xp - 3
Visual exploratory data analysis
Are you more likely to get arrested at a certain time of day? Are drug-related stops on the rise? In this chapter, you will answer these and other questions by analyzing the dataset visually, since plots can help you to understand trends in a way that examining the raw data cannot.
Does time of day affect arrest rate?50 xpCalculating the hourly arrest rate100 xpPlotting the hourly arrest rate100 xpAre drug-related stops on the rise?50 xpPlotting drug-related stops100 xpComparing drug and search rates100 xpWhat violations are caught in each district?50 xpTallying violations by district100 xpPlotting violations by district100 xpHow long might you be stopped for a violation?50 xpConverting stop durations to numbers100 xpPlotting stop length100 xp - 4
Analyzing the effect of weather on policing
In this chapter, you will use a second dataset to explore the impact of weather conditions on police behavior during traffic stops. You will practice merging and reshaping datasets, assessing whether a data source is trustworthy, working with categorical data, and other advanced skills.
Exploring the weather dataset50 xpPlotting the temperature100 xpPlotting the temperature difference100 xpCategorizing the weather50 xpCounting bad weather conditions100 xpRating the weather conditions100 xpChanging the data type to category100 xpMerging datasets50 xpPreparing the DataFrames100 xpMerging the DataFrames100 xpDoes weather affect the arrest rate?50 xpComparing arrest rates by weather rating100 xpSelecting from a multi-indexed Series100 xpReshaping the arrest rate data100 xpConclusion50 xp
Training 2 or more people?
Get your team access to the full DataCamp platform, including all the features.collaborators
prerequisites
Joining Data with pandasKevin Markham
See MoreFounder of Data School
Join over 15 million learners and start Analyzing Police Activity with pandas today!
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.