All Projects → j-andrews7 → kenpompy

j-andrews7 / kenpompy

Licence: GPL-3.0 license
A simple yet comprehensive web scraper for kenpom.com.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to kenpompy

clarktech-ncaab-predictor
A machine learning project to predict NCAA Men's Basketball outcomes
Stars: ✭ 24 (-41.46%)
Mutual labels:  basketball-stats
NBA-Machine-Learning-Sports-Betting
NBA sports betting using machine learning
Stars: ✭ 150 (+265.85%)
Mutual labels:  sports-analytics
3D-Tracking-MVS
3D position tracking for soccer players with multi-camera videos
Stars: ✭ 68 (+65.85%)
Mutual labels:  sports-analytics
sportyR
R package for drawing regulation playing surfaces for several sports
Stars: ✭ 84 (+104.88%)
Mutual labels:  sports-analytics
football-graphs
Graphs and passing networks in football.
Stars: ✭ 81 (+97.56%)
Mutual labels:  sports-analytics
public sport science datasets
An ongoing compilation of publicly available datasets for sport science projects.
Stars: ✭ 24 (-41.46%)
Mutual labels:  sports-analytics
BasketballAnalyzeR
R package
Stars: ✭ 30 (-26.83%)
Mutual labels:  basketball-stats
shinyAMS-resources
A compilation of resources for sport scientist building Athlete Management Tools in Shiny
Stars: ✭ 19 (-53.66%)
Mutual labels:  sports-analytics
AzurLaneWikiScrapers
A console application that can scrape the Azur Lane wiki and export the data to Json files
Stars: ✭ 12 (-70.73%)
Mutual labels:  web-scrapers
NCAA Hoops
All the files used in my NCAA Men's Basketball modeling, predictions, bracketology, and Ivy League simulations.
Stars: ✭ 39 (-4.88%)
Mutual labels:  ncaa-basketball
regista
An R package for soccer modelling
Stars: ✭ 71 (+73.17%)
Mutual labels:  sports-analytics
football analytics
⚽📊 A collection of football analytics projects, data, and analysis by Edd Webster (@eddwebster), including a curated list of publicly available resources published by the football analytics community.
Stars: ✭ 405 (+887.8%)
Mutual labels:  sports-analytics
retrosheet
Project to parse retrosheet baseball data in python
Stars: ✭ 19 (-53.66%)
Mutual labels:  sports-analytics
cfbscrapR
A scraping and aggregating package using the CollegeFootballData API
Stars: ✭ 25 (-39.02%)
Mutual labels:  sports-analytics
LeTourDataSet
Every cyclist and stage of the Tour de France in two CSV files.
Stars: ✭ 61 (+48.78%)
Mutual labels:  sports-analytics
nflfastR
A Set of Functions to Efficiently Scrape NFL Play by Play Data
Stars: ✭ 268 (+553.66%)
Mutual labels:  sports-analytics
openrowingmonitor
A free and open source performance monitor for rowing machines
Stars: ✭ 29 (-29.27%)
Mutual labels:  sports-analytics

kenpompy - Basketball for Nerds

Documentation Status codecov

This python package serves as a convenient web scraper for kenpom.com, which provides tons of great NCAA basketball statistics and metrics. It requires a subscription to Ken Pomeroy's site for use, otherwise only the home page will be accessible. It's a small fee for a year of access, and totally worth it in my opinion.

Objective

Ultimately, this package is to allow both hobbyist and reknown sports analysts alike to get data from kenpom in a format more suitable for visualization, transformation, and additional analysis. It's meant to be simple, easy to use, and to yield information in a way that is immediately usable.

Responsible Use

As with many web scrapers, the responsibility to use this package in a reasonable manner falls upon the user. Don't be a jerk and constantly scrape the site a thousand times a minute or you run the risk of potentially getting barred from it, which you'd likely deserve. I am in no way responsible for how you use (or abuse) this package. Be sensible.

But I Use R

Yeah, yeah, but have you heard of reticulate? It's an R interface to python that also supports passing objects (like dataframes!) between them.


Installation

kenpompy is easily installed via pip:

pip install kenpompy

What It Can (and Can't) Do

This a work in progress - it can currently scrape all of the summary, FanMatch, and miscellaneous tables, pretty much all of those under the Stats and Miscellany headings. Team and Player classes are planned, but they're more complicated and will take some time.

Usage

kenpompy is simple to use. Generally, tables on each page are scraped into pandas dataframes with simple parameters to select different seasons or tables. As many tables have headers that don't parse well, some are manually altered to a small degree to make the resulting dataframe easier to interpret and manipulate.

First, you must login:

from kenpompy.utils import login

# Returns an authenticated browser that can then be used to scrape pages that require authorization.
browser = login(your_email, your_password)

Then you can request specific pages that will be parsed into convenient dataframes:

import kenpompy.summary as kp

# Returns a pandas dataframe containing the efficiency and tempo stats for the current season (https://kenpom.com/summary.php).
eff_stats = kp.get_efficiency(browser)

Contributing

You can contribute by creating issues to highlight bugs and make suggestions for additional features. Pull requests are also very welcome.

License

kenpompy is released on the GNU GPL v3.0 license. You are free to use, modify, or redistribute it in almost any way, provided you state changes to the code, disclose the source, and use the same license. It is released with zero warranty for any purpose and I retain no liability for its use. Read the full license for additional details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].