O'Reilly logo

Practical Data Science Cookbook by Abhijit Dasgupta, Benjamin Bengfort, Sean Patrick Murphy, Tony Ojeda

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Analyzing and understanding football data

Now that we have obtained and cleaned the data, let's take some time to explore it, gain an understanding of what the different fields mean, and learn how we can use them to create something useful.

Getting ready

If you completed the previous recipe, you should have cleaned and formatted offense and defense datasets in preparation for this recipe.

How to do it…

In order to analyze the data, complete the following steps:

  1. The first thing we will do is combine the offense and defense data frames into a data frame called combined. This will get all of our data in one place and make it easier for us to do some exploration:
    combined <- merge(offense, defense, by.x="Team", by.y="Team")
    

    Since some of the offense and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required