Fotmob
Complete list of all fotmob functions
Functions
- .fotmob.fm_league_matches(league_id: str, json_file: json = None) pd.DataFrame:
Returns matches of a given league
- Parameters
league_id (str) – id of a league
json_file (json or None) – season of a league. Use / divider for leagues over 2 calendar years. Defaults to None.
- Returns
league matches
- Return type
dataframe
- .fotmob.fm_league_table(league_id: str, season: str = None, matches='All', json_file: json = None) dict:
Returns standing of a given league
- Parameters
league_id (str) – id of a league
season (str or None) – season of a league. Use / divider for leagues over 2 calendar years. Defaults to None.
matches (str) –
type of matches to include in standings. Defaults to “All”.
AllHomeAwayForm
json_file (json or None) – json file of league page. Defaults to None.
- Returns
league standings
- Return type
dict
- .fotmob.fm_leagues(competition_type: str = None, competition_name: str = None, ccode: str = None, country: str = None, gender: str = None, league_id: str = None, league_url: str = None) pd.DataFrame
Returns a dataframe of league information
- Parameters
competition_type (str, list, or None) –
type of competition. Defaults to None.
Domestic Leagues - 1st TierDomestic Leagues - 2nd TierDomestic Leagues - 3rd Tier and LowerDomestic CupsDomestic Youth LeaguesClub International CupsNational Team CompetitionsNational Team Qualification
competition_name (str, list, or None) – name of competition. Defaults to None.
ccode (str or None) – country code of a league. Defaults to None.
country (str or None) – country of a league. Defaults to None.
gender (str, list, or None) –
gender of competition. Defaults to None.
MW
league_id (str or None) – league id of a league. Defaults to None.
league_url (str or None) – url of a league. Defaults to None.
- Returns
league information
- Return type
dataframe
- .fotmob.fm_match_data(match_id: str, save_json: bool = False, json_file: json = None) tuple
Returns metadata and match data for a given match id
- Parameters
match_id (str) – id of a match
save_json (bool) – whether to save json of match page. Defaults to False.
json_file (json or None) – json file of match page. Defaults to None.
- Returns
match data and json of match page (optional)
- Return type
(dict, list, dict, list, list, list, list, list, list, list, json) or (dict, list, dict, list, list, list, list, list, list, list)
- .fotmob.fm_match_ids(match_date: str, ccode: str = None, name: str = None, league_id: str = None) list
Returns a list of match ids for a given date
- Parameters
match_date (str) – date of matches in format YYYYMMDD
ccode (str or None) – country code of a league. Defaults to None.
name (str or None) – name of a league. Defaults to None.
league_id (str or None) – league id of a league. Defaults to None.
- Returns
match ids
- Return type
list
- .fotmob.fm_season_stat_leaders(league_id: str, team_or_player: str, stat_name: list, season: str = None, json_file: json = None) pd.DataFrame:
Returns top 3 stat leaders of a given league
- Parameters
league_id (str) – id of a league
team_or_player (str) –
whether to return team or player stat leaders. Defaults to “player”.
playerteam
stat_name (list) –
name of stats.
Player stats:
Accurate long balls per 90Accurate passes per 90AssistsBig chances createdBig chances missedBlocks per 90Chances createdClean sheetsClearances per 90Expected assist (xA)Expected assist (xA) per 90Expected goals (xG)Expected goals (xG) per 90Expected goals on target (xGOT)FotMob ratingFouls committed per 90Goals + AssistsGoals conceded per 90Goals per 90Goals preventedInterceptions per 90Penalties concededPenalties wonPossession won final 3rd per 90Red cardsSave percentageSaves per 90Shots on target per 90Shots per 90Successful dribbles per 90Successful tackles per 90Top scorerxG + xA per 90Yellow cards
Team stats:
Accurate crosses per matchAccurate long balls per matchAccurate passes per matchAverage possessionBig chancesBig chances missedClean sheetsClearances per matchExpected goalsFotMob ratingFouls per matchGoals conceded per matchGoals per matchInterceptions per matchPenalties awardedPenalties concededPossession won final 3rd per matchRed cardsSaves per matchShots on target per matchSuccessful tackles per matchxG concededYellow cards
season (str or None) – season of a league. Use / divider for leagues over 2 calendar years. Defaults to None.
json_file (json or None) – json file of stat data. Defaults to None.
- Returns
stat leaders
- Return type
dataframe
- .fotmob.fm_season_stats(league_id: str, team_or_player: str, stat_name: list, season: str = None, json_file: json = None) pd.DataFrame:
Returns complete list of stat leaders of a given league
- Parameters
league_id (str) – id of a league
team_or_player (str) –
whether to return team or player stat leaders. Defaults to “player”.
playerteam
stat_name (list) –
name of stats.
Player stats:
Accurate long balls per 90Accurate passes per 90AssistsBig chances createdBig chances missedBlocks per 90Chances createdClean sheetsClearances per 90Expected assist (xA)Expected assist (xA) per 90Expected goals (xG)Expected goals (xG) per 90Expected goals on target (xGOT)FotMob ratingFouls committed per 90Goals + AssistsGoals conceded per 90Goals per 90Goals preventedInterceptions per 90Penalties concededPenalties wonPossession won final 3rd per 90Red cardsSave percentageSaves per 90Shots on target per 90Shots per 90Successful dribbles per 90Successful tackles per 90Top scorerxG + xA per 90Yellow cards
Team stats:
Accurate crosses per matchAccurate long balls per matchAccurate passes per matchAverage possessionBig chances createdBig chances missedClean sheetsClearances per matchExpected goalsFotMob ratingFouls per matchGoals conceded per matchGoals per matchInterceptions per matchPenalties awardedPenalties concededPossession won final 3rd per matchRed cardsSaves per matchShots on target per matchSuccessful tackles per matchxG concededYellow cards
season (str or None) – season of a league. Use / divider for leagues over 2 calendar years. Defaults to None.
json_file (json or None) – json file of stat data. Defaults to None.
- Returns
stat leaders
- Return type
dataframe