fantasy_basketball
This package will fetch NBA stas from basketball-reference.com, parse the statistics into pandas dataframes, then visualize the statistics.
Installation
This package can be installed with either pip,:
$ pip install Fantasy_Basketball
Or with directly from the source code:
$ git checkout https://github.com/dwwkelly/fantasy_basketball $ cd fantasy_basketball $ python setup.py install
Dependencies
Click
numpy
matplotlib
pandas
jinja2
pycurl’,
beautifulsoup4
lxml
Usage
A library and a user application are provided, you can use the user application like this:
$ FB_Manager download --year 2013 --teams --draft $ FB_Manager process --year 2013 --teams $ FB_Manager plot --year 2013
Data Storage
The fantasy_basketball library creates several directories:
~/.fantasy_basketball/plots ~/.fantasy_basketball/processed_data ~/.fantasy_basketball/raw_data
Each directory contains directories that are either the data type or the year for the data, e.g.:
~/.fantasy_basketball/processed_data/2013 ~/.fantasy_basketball/raw_data/teams/2013
The raw data is all HTML files, the processed data is pickle files that contain pandas dataframes, the plots directory contains either eps images or png images.
You can import the dataframes yourself for your own analysis with ipython:
In [1]: import pandas as pd
In [2]: import os
In [3]: data_dir = os.path.expanduser('~/.fantasy_basketball/processed_data/2013/team_data.pkl')
In [4]: df = pd.read_pickle(data_dir)
In [5]: df.shape
Out[5]: (347, 55)
TODO
Config file.
Generate HTML from data.
Download and process more statistics.
Deal with infer_types warning for pandas > 0.14
Metadata
Release files for Fantasy_Basketball 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Fantasy_Basketball-0.2.tar.gz | 14.6 kB | Without provenance | Details for Fantasy_Basketball-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| Fantasy_Basketball-0.2.linux-x86_64.tar.gz | Details for Fantasy_Basketball-0.2.linux-x86_64.tar.gz |
Total release size: 51.7 kB
Release files / Fantasy_Basketball-0.2.tar.gz
| Download URL | Fantasy_Basketball-0.2.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7075acf97c0762243f8a5b5972d111d6e2a9e5192129895cc87a7b1a99d2a76e
|
|
BLAKE2b-256 checksum How to use checksums |
007a6b388055a8e38717585629d8a675a8c275a966cb507f149ee733a3f3a9d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / Fantasy_Basketball-0.2.linux-x86_64.tar.gz
| Download URL | Fantasy_Basketball-0.2.linux-x86_64.tar.gz |
|---|---|
| Size | 37.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28192fa47df1a04f240afd2fd7b591ec3476e735cae55a2ecbaae1828db5870b
|
|
BLAKE2b-256 checksum How to use checksums |
4fbc255f277efa9c28a498511b51c82c9036b497b86373dc126aab093f961b25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for Fantasy_Basketball 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.