Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
This library provides utilities to visualize a football field, plot player positions, and animate plays. It is designed to handle data from tracking datasets, such as those used in football analytics.
Installing the library:
pip install nfl_tracks
After successfully installing the nfl_tracks package, import it in the file using the code below:
# Import nfl_tracks
from nfl import visuals
Generates a plot of a football field with customizable features.
field(yard_numbers=True, touchdown_markings=True, fifty_yard=False, fig_size=(12, 6.33))
fig, ax = visuals.field()
plt.show()
Plots the positions of players during a specific frame of a play.
snap(data, gameId, playId, frameId, yard_numbers=True, touchdown_markings=True, fifty_yard=False, fig_size=(12, 6.33), **kwargs)
fig, ax = visuals.snap(data, gameId=2022091200, playId=64, frameId=10)
plt.show()
Animates a play by visualizing player movements over time.
play_game(data, gameId, playId, kaggle=True, yard_numbers=True, touchdown_markings=True, fifty_yard=False, fig_size=(12, 6.33), save=False, loop=False, **kwargs)
ani = visuals.play_game(data, gameId=2022091200, playId=64)
ani
Plotting a Field
fig, ax = visuals.field(touchdown_markings=False, fifty_yard=True)
plt.show()
Visualizing a Single Frame
fig, ax = visuals.snap(data, gameId=2022091200, playId=52, frameId=15, size=20)
plt.show()
Plotting a Field
ani = visuals.play_game(data, gameId=2022091200, playId=24, save=True, speed=150)
ani
This project is licensed under the MIT License - see the LICENSE file for details.
This library is ideal for visualizing football plays with clear, customizable graphics and animations. For further assistance, refer to Matplotlib's documentation or provide specific details for troubleshooting.
FAQs
Python library written on top of matplotlib library for customizable nfl charts
We found that nfl-tracks demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.