Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for football (soccer) #356

Merged
merged 3 commits into from
Mar 26, 2020
Merged

Add support for football (soccer) #356

merged 3 commits into from
Mar 26, 2020

Conversation

roclark
Copy link
Owner

@roclark roclark commented Mar 26, 2020

Now that sports-reference.com fully supports international football, the package should be updated to include several high-level details as an initial release for football support. These updates include the following:

  • Team interface: Get high-level team information and stats including manager name, points, record, primary competition, roster, schedule, and much more for over 5000 teams worldwide.
  • Schedule interface: The schedule interface contains details on every past, present, and future game in a team's schedule for the season as well as match statistics such as venue, attendance, date, score, and referee.
  • Roster interface: View a list of all squad members on the team including statistics such as goals, assists, dribbles, nutmegs, tackle success rate, and much more.

Fixes #355, closes #335

@roclark roclark added the enhancement New feature or request label Mar 26, 2020
@roclark roclark added this to the Release 0.5.0 milestone Mar 26, 2020
@roclark roclark self-assigned this Mar 26, 2020
@codecov
Copy link

codecov bot commented Mar 26, 2020

Codecov Report

Merging #356 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master     #356    +/-   ##
========================================
  Coverage   99.96%   99.97%            
========================================
  Files          42       48     +6     
  Lines        9551    10547   +996     
========================================
+ Hits         9548    10544   +996     
  Misses          3        3            
Impacted Files Coverage Δ
sportsreference/fb/squad_ids.py 100.00% <ø> (ø)
sportsreference/fb/constants.py 100.00% <100.00%> (ø)
sportsreference/fb/fb_utils.py 100.00% <100.00%> (ø)
sportsreference/fb/roster.py 100.00% <100.00%> (ø)
sportsreference/fb/schedule.py 100.00% <100.00%> (ø)
sportsreference/fb/team.py 100.00% <100.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ec9b432...3d9c7e3. Read the comment docs.

Now that sports-reference.com has a mature website for football, it
should be added to this package to allow easy queries of player, team,
and league statistics and information using a Python API. This is only
the initial release of football metrics for sportsreference as future
updates are planned as well to further enhance the package.

In addition to the addition of the new section, the interface for
connecting to teams uses a new format, diverging from other sections in
the package to allow teams to more easily and directly be queried. This
new format doesn't force users to first pull a master list of teams,
then pull a specific team, but instead uses a lookup-table to search for
a specific team to make it easier. The hope is that this simpler method
will be used in other sections for further ease of use and be included
prior to the official 1.0 release of sportsreference.

Signed-Off-By: Robert Clark <[email protected]>
@roclark roclark force-pushed the support-soccer branch 2 times, most recently from 82e2dec to a42b912 Compare March 26, 2020 13:40
The Schedule class can be used to iterate over a team's schedule for the
season and includes high-level information for each game. The schedule
can be queried by supplying either the squad ID or the full team name.
Every match will be an instance of the Game class in the same module.

Signed-Off-By: Robert Clark <[email protected]>
@roclark roclark force-pushed the support-soccer branch 2 times, most recently from 93cbaee to 69dd54f Compare March 26, 2020 15:25
The Roster class can be used to retrieve detailed stats for each player
on a team's roster for the given season, ranging from goals, assists,
and time-related statistics. The roster can be queried by supplying
either the squad ID or the full team name. Every player will be an
instance of the Player class in the same module.

Signed-Off-By: Robert Clark <[email protected]>
@roclark roclark merged commit 31dbdaf into master Mar 26, 2020
@roclark roclark deleted the support-soccer branch March 26, 2020 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for football (soccer) Extended Major League Soccer Version of this API
1 participant