Giter Club home page Giter Club logo

nfl-pp-scraper's Introduction

README for nfl-pp-scrapers

This is a repository for scraping data from the website https://www.playerprofiler.com. You can retreive data from players based on their offensive positions [QB, RB, WR, TE]. Running a web scraping script will automatically download and store data in .csv files. Below are the instructions to install and run this project.

For now, data is being scraped from the following parts of the website:

Playerprofiler

Table of Contents

Installation

Download this repository using the following code:

git clone https://github.com/jsawalha/nfl-pp-scraper.git

OPTIONAL: You can make a new conda environment before installing the following packages. Download the requisite libraries for this repo

pip install .

OR

pip install -r requirements.txt

Usage

Scraping

To run the web scraping script, the command line in the terminal is:

python scraping/scrape.py

Customizing your web scraping script is done using the scraping/utils/config.yaml. Here, you can do the following:

  • Set the football position that you want to scrape (running-back, quarterback, tight-end, wide-reciever)
  • You can enter in your header user agent (Might be mandatory for web scraping. Follow instructions inside the config.yaml file)
  • Control whether you want to scrape ALL players at a given position, OR just the most popular ones (using pop_index)

Once you have set your configuartion, you can run scrape.py, and the saved data will be stored in scraping/scraped_data/

Preprocessing

To run the preprocessing script, the command line in the terminal is:

python preprocessing/preprocess.py -p [POSITION]

Where position denotes one of the following: [quarterback, running-back, tight-end, wide-receiver]

This will clean up the raw dataset for a given position. The preprocessed datasets will be saved in preprocessed/preprocessed_data. Additionally, the factorized columns will have a saved dictionary text file within preprocessed/preprocessed_data/dicts. You can refer to these for the college and NFL teams for each dataset.

Training

TODO

Support

Please open an issue for support.

Contributing

Please contribute using Github Flow. Create a branch, add commits, and open a pull request.

nfl-pp-scraper's People

Contributors

jsawalha avatar

Watchers

 avatar

Forkers

derekvpierce

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.