Skip to content

Latest commit

 

History

History
85 lines (54 loc) · 2.62 KB

README.md

File metadata and controls

85 lines (54 loc) · 2.62 KB

🏀 basket-viz

A Python library for creating interactive and customizable visualizations of basketball statistics.

PyPI Version Python Version License Issues Last Commit Downloads

♻️ Install from PyPI

To install basket-viz, simply run:

pip install basket-viz

⛹️‍♂️Getting Started

🔍 Docs

For a comprehensive overview of features check out the documentation.

🎯 Shot Charts

from basket_viz.court.shot_charts import ShotChart

shot_chart = ShotChart()
shot_chart.plot_shot_chart(df, player_name="NEDOVIC, NEMANJA")

Alt Text

🎢 Overlay

This module supports plotting static and animated overlay comparing the performance of individuals against the rest of the league.

from basket_viz.overlay.trajectory import PlotTrajectory

pt = PlotTrajectory()

players = ["Hezonja, Mario","James, Mike","Lessort, Mathias"]
colors = [real_madrid_gold, monaco_red, panathenaicos_green]
v_lines = {1.0: 'Short-Range', 4.0: 'Mid-Range', 6.75: 'Three-Point Line'}

pt.plot_trajectory_animated(normalized_df, players, colors, v_lines=v_lines, title=f"Scoring Profiles \n EUROLEAGUE 23/24")

Alt Text

📈 Relationships

This module supports plotting relationships between different stats of players int the team.

To apply collor template that matches the brand of Euroleague teams use use_team_config=True.

from basket_viz.relationships.plotter import PlotRelationship

plotter = PlotRelationship(use_team_config=True,output_format='mp4')
plotter.plot_animated_relationship(
    df,
    team_filter="BAR",
    display_only_last_names=True,
)

Alt Text

🙌 Contibuting

We are continuously working on improving this project and we welcome your contributions!

🐞 Open Issues

If you have any feature requests or bug reports, please don't hesitate to open an issue. This project is a work in progress, and your feedback is invaluable to us.

👨‍💻 Pick up Issues

You can also pick up an issue at any time and start working on it. Please make sure to follow our contribution guidelines to ensure a smooth collaboration process. Thank you for your support and happy coding!