Interactive Shiny Table - Premier League standings 2021

Author: Greta Gasparac - LinkedIn - Twitter - Github
View the Table - Repo

I proudly present my first-ever Shiny app! Let me provide a more detailed description of all the functionalities that the table offers.

The table uses the Football-Data.org API in order to always display up-to-date data. When generated, the table shows standings of the current match day. For each team we can see:

  • position, together with an indicator telling us whether the team's current position is better, equal, or worse than the previous one,
  • logo and team name,
  • number of matches played,
  • goal difference (goals scored subtracted by goals received), where a positive number is green, zero is grey and negative is red,
  • number of wins, draws, losses, where the background color is selected based on all values in the column and allows us to quickly see if a team is standing out in any way,
  • number of points.

All rows are expandable. By clicking on the little arrow at the beginning of each row we open a new table that displays all the previous matches of the chosen team. We can see their opponent, whether they played home or away, the final score and the date of the match. At the beginning of each row we also have a little colored circle, which allows us to see whether the team won, lost or drew based on the color (green, red, grey, respectively).

expandable

The table also allows you to "travel in time"! The slider above allows us to pick any of the previous match days and see the league standings back then.

slider

All the code is documented in the docstrings package style and can be found in the repository together with the run requirements and other information.

3 Likes

Some very good features here. I chose a very similar theme, albeit Serie A, but yours blows mine out of the water. I am going to look around the code, but its a very crisp design with lots of useful features.

1 Like

Thanks a lot for such a nice compliment! As a Shiny-newbie I feel like I learned a lot and I hope my code is helpful to you as well!