A scraper that scrapes data from NFL.com for generating a dataset
NFLDataSet is a Swift package that scrapes NFL.com for football game stats for generating a dataset. When a dataset is generated, the file is in
csv format that is saved to your desktop. With this dataset, it can then be used for data analysis, machine learning, etc. The dataset supports regular season games from 2009 to 2016. These are the fields retrieved for each game:
- Home Team Name
- Home Team Final Score
- Home Team Score For First Quarter
- Home Team Score For Second Quarter
- Home Team Score For Third Quarter
- Home Team Score For Fourth Quarter
- Home Team Total Wins
- Home Team Total Losses
- Home Team Total Ties
- Away Team Name
- Away Team Final Score
- Away Team Score For First Quarter
- Away Team Score For Second Quarter
- Away Team Score For Third Quarter
- Away Team Score For Fourth Quarter
- Away Team Total Wins
- Away Team Total Losses
- Away Team Total Ties
- Winner For The Game
Overtime, more different types of football stats for a game will be used to increase the dataset for accuracy. If you are interested in contributing, please check out the contributing section bellow.
Requirements For Installing Locally
- Xcode 9.0.*
- Swift 4.0.*
- Swift Packagae Manager
You will need the system libraries for parsing XML or HTML install on your machine or you will receive an error when compling.
- Using Homebrew, install libxml2 with
$ brew install libxml2.
- Then run
$ brew link --force libxml2.
With the system level dependecies installed, we can begin setting up the project.
- In a terminal, do
$ git clone firstname.lastname@example.org:eman6576/NFLDataSet.git.
- Then change the directory to NFLDataSet by doing
$ cd NFLDataSet.
- Build the project to install and complie dependencies by doing
$ swift build.
- To run the project, do
If you would like to contribute, please consult the contributing guidelines for details. Also check out the GitHub issues for major milestones/enhancements needed.
NFLDataSet is released under the MIT license. See LICENSE for details.