Calculate expected points (xPts) and expected rank (xRank) for each team in a head-to-head table as the average points (i.e. 0, 1, 3) expected against all teams in that league each gameweek (including AVERAGE team, present if odd number of teams in the league), not just the actual opponent. Requires entering username and password in interactive dialogue in order to access private leagues. Uses the ['fplscrapR'](https://github.com/wiscostret/fplscrapR).
an integer with a single valid head-to-head league ID
League ID can be found when examining the head-to-head table on the official FPL site, appearing after the '/leagues/' part of the URL, e.g. '1' in 'https://fantasy.premierleague.com/leagues/1/standings/h'
a dataframe with expected points (xPts) and expected rank (xRank) added to actual points, actual rank, and team information
'fplscrapR' package by [wiscostret](https://github.com/wiscostret/fplscrapR)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.