Python 3.6 version of nflfastr
amogh-dambal / pylon Goto Github PK
View Code? Open in Web Editor NEWPython 3.6 version of nflfastR
License: GNU General Public License v3.0
Python 3.6 version of nflfastR
License: GNU General Public License v3.0
Code currently forces values to be in alphabetical order, especially if using NFL team colors.
From Deryck97's nflfastR python guide: develop a feature to save play by play datasets.
Bug
Trying to use visualizer package's build_vbar()
function but it throws ValueError: Truth value of pd.Series is ambiguous
.
Code
import pylon
from pylon import analyzer, visualizer
pbp = functions.load_pbp([2019])
df = analyzer.get_performance(pbp, "WR", min_plays=30).rename(columns={'play_id': 'receptions'}).groupby(['posteam']).mean().sort_values(by=['epa'], ascending=False)
fig, ax = visualizer.build_vbar(df)
Description
The build_scatter()
function throws an error when run on simple test data.
Expected
The function should return a tuple(plt.Figure, plt.Axes)
and render the scatterplot with a calculated line of best fit.
Buggy:
The function raises a ValueError
saying that the x
and y
parameters don't have the same dimension
Reproduce:
# create a 25x2 dataframe with random data
df = pd.DataFrame(np.random.randint(0, 100, size=(25, 2)), columns=['X', 'y'])
# plot the scatterplot of our data
fig, ax = visualizer.build_scatter(X, y)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.