datafc v1.2.0 is Live!

Package
Author

Uraz Akgül

Published

February 17, 2025

Why v1.2.0?

This new version introduces important additions to the match_data dataset related to scores.

Follow the steps below to upgrade to the latest version.

If the datafc package is already installed, you can update to the latest version by running the following command in the terminal:

pip install --upgrade datafc

If you haven’t installed datafc before, use the following command:

pip install datafc

For more details about the package, you can visit its PyPI or GitHub pages.

New Features

Score Information

The following columns have been added:

  • home_score_current: Home team’s most recently recorded score.
  • home_score_display: Home team’s displayed score.
  • home_score_period1: Home team’s goals at the end of the first half.
  • home_score_period2: Home team’s goals in the second half.
  • home_score_normaltime: Home team’s total goals in regular time (90 minutes).
  • away_score_current: Away team’s most recently recorded score.
  • away_score_display: Away team’s displayed score.
  • away_score_period1: Away team’s goals at the end of the first half.
  • away_score_period2: Away team’s goals in the second half.
  • away_score_normaltime: Away team’s total goals in regular time (90 minutes).

Practical Example

Let’s check the score details for matchweek 25 of the 2024/25 Premier League season.

from datafc.sofascore import match_data

match_df = match_data(
    tournament_id=17,
    season_id=61627,
    week_number=25
)

With the newly added columns, you can now directly access teams’ total and period-based scores.

Best regards.