Batting Location Charts with Vagrant and MySQL

Use R and MySQL together to create batting location charts from large data sets.
Rating: 4.4 out of 5 (87 ratings)
13,063 students
Batting Location Charts with Vagrant and MySQL
Rating: 4.4 out of 5 (87 ratings)
13,063 students
install MySQL on a Ubuntu machine.
perform basic administrative tasks in MySQL.
use the vi program to edit the MySQL configuration file.
perform port-forwarding with Vagrant.
scrape hit location data from PITCHf/x.
query MySQL from R.

Requirements

  • Students should have R and RStudio installed.
  • Students should also have VirtualBox and Vagrant installed.
  • It would be best if students have gone through my previous three courses in baseball analytics. This may not, however, be completely necessary.
Description

This course is about working with large sets of PITCHf/x data to create batting location charts. We use R to scrape and visualize the data and MySQL to store the data. The course includes lessons on how to install a virtual Ubuntu machine, how to install MySQL, how to perform basic MySQL administrative tasks, and how to connect R and MySQL.

It would be best if you have some knowledge of R and ggplot. This can be obtained through my previous three courses in baseball analytics. However, it might be possible to follow along without this.

At a relaxed pace, the course should take about two weeks to complete.

Who this course is for:
  • This course is for those who want to learn how to create a hit location chart from PITCHf/x data.
  • The course is also for those who wish to know a little about working with R and MySQL together.
  • The course is NOT for complete beginners in R.
Course content
2 sections • 18 lectures • 1h 5m total length
  • Introduction
    01:03
  • Creating the Virtual Machine
    01:49
  • Installing MySQL
    02:39
  • Logging in and out of MySQL
    01:13
  • Creating a User
    06:41
  • Granting Privileges
    02:12
  • Changing the Bind Address
    05:26
  • Forwarding the Port
    05:12
  • Loading the R Packages
    01:56
  • Scraping the Data
    05:32
  • Investigating the Tables
    02:18
  • Deciding What Information We Want
    02:42
  • Making the Query
    01:45
  • Modifying the Data Frame
    05:40
  • Beginning the Plot
    03:56
  • Enhancing the Plot
    06:48
  • Getting More Data
    03:09
  • Putting It All Together
    05:18

Instructor
Professor at Mercyhurst University
Charles Redmond
  • 4.5 Instructor Rating
  • 5,661 Reviews
  • 68,716 Students
  • 7 Courses

Dr. Charles Redmond is a professor in the Tom Ridge School of Intelligence Studies and Information Science at Mercyhurst University. He has been a member of the Department of Mathematics and Computer Systems at Mercyhurst for 21 years and has recently completed a term as chair of the department. Dr. Redmond received his PhD in mathematics from Lehigh University in 1993 and has published in the Annals of Applied Probability, the Journal of Stochastic Processes and Their Applications, Mathematics Magazine, the College Mathematics Journal, and Mathematics Teacher. In his spare time he enjoys making music and computer generated art, reading, and owning a Clumber Spaniel.