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”.
All
Home
Away
Form
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 Tier
Domestic Leagues - 2nd Tier
Domestic Leagues - 3rd Tier and Lower
Domestic Cups
Domestic Youth Leagues
Club International Cups
National Team Competitions
National 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.
M
W
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”.
player
team
stat_name (list) –
name of stats.
Player stats:
Accurate long balls per 90
Accurate passes per 90
Assists
Big chances created
Big chances missed
Blocks per 90
Chances created
Clean sheets
Clearances per 90
Expected assist (xA)
Expected assist (xA) per 90
Expected goals (xG)
Expected goals (xG) per 90
Expected goals on target (xGOT)
FotMob rating
Fouls committed per 90
Goals + Assists
Goals conceded per 90
Goals per 90
Goals prevented
Interceptions per 90
Penalties conceded
Penalties won
Possession won final 3rd per 90
Red cards
Save percentage
Saves per 90
Shots on target per 90
Shots per 90
Successful dribbles per 90
Successful tackles per 90
Top scorer
xG + xA per 90
Yellow cards
Team stats:
Accurate crosses per match
Accurate long balls per match
Accurate passes per match
Average possession
Big chances
Big chances missed
Clean sheets
Clearances per match
Expected goals
FotMob rating
Fouls per match
Goals conceded per match
Goals per match
Interceptions per match
Penalties awarded
Penalties conceded
Possession won final 3rd per match
Red cards
Saves per match
Shots on target per match
Successful tackles per match
xG conceded
Yellow 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”.
player
team
stat_name (list) –
name of stats.
Player stats:
Accurate long balls per 90
Accurate passes per 90
Assists
Big chances created
Big chances missed
Blocks per 90
Chances created
Clean sheets
Clearances per 90
Expected assist (xA)
Expected assist (xA) per 90
Expected goals (xG)
Expected goals (xG) per 90
Expected goals on target (xGOT)
FotMob rating
Fouls committed per 90
Goals + Assists
Goals conceded per 90
Goals per 90
Goals prevented
Interceptions per 90
Penalties conceded
Penalties won
Possession won final 3rd per 90
Red cards
Save percentage
Saves per 90
Shots on target per 90
Shots per 90
Successful dribbles per 90
Successful tackles per 90
Top scorer
xG + xA per 90
Yellow cards
Team stats:
Accurate crosses per match
Accurate long balls per match
Accurate passes per match
Average possession
Big chances created
Big chances missed
Clean sheets
Clearances per match
Expected goals
FotMob rating
Fouls per match
Goals conceded per match
Goals per match
Interceptions per match
Penalties awarded
Penalties conceded
Possession won final 3rd per match
Red cards
Saves per match
Shots on target per match
Successful tackles per match
xG conceded
Yellow 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