# PremPredict 2019/20

In this year’s PremPredict, there are twenty teams, twenty-one players and a massive £105 up for grabs. In this post, I’ll show the latest standings and our collective expectations for the season.

Robin Penfold
2019-08-10

Welcome to the 2019/20 season of PremPredict!

Rather than create new posts every few months, I thought you’d appreciate a page that updated with the latest results every time that you hit refresh.

With that in mind, here are the very latest standings.

## Collective expectations

But what are we collectively expecting from the Premier League this season? Are we expecting it to be a repeat of last season?

By the look of our picks, we seem to side with the bookies. As a group, we predict Manchester City to finish highest on average, with the recently-promoted teams struggling.

And we collectively feel that Sheffield United will come last. But will we be more accurate than before?!

For completeness (and reproducibility), here’s the code that I used to calculate what’s above. Note that the app does things a little differently, but this standalone code should give you the gist of the approach.

## Latest standings

``````
library(ggridges)
library(premPredictor)
suppressMessages(library(tidyverse))

# player_info <-
#   "https://www.dropbox.com/s/uin6zk4w5cyk2m1/PremPredict-19-20.csv"
# player_data <- get_player_data(url_value = player_info)

results <- get_latest_standings(
data_input = player_data,
use_saved_data = T,
data_file = '201920_week1.rds'
)``````

## Collective expectations

``````
data_input1 <- as_tibble(player_data)
averageView <- round(rowMeans(data_input1[, -1]), 2)
views <- cbind(data_input1[,1], averageView)

data_input2 <- data_input1 %>%
gather(key = "Player", -Club, value = "Prediction") %>%
left_join(views, by = "Club")

ggplot(
data = data_input2,
mapping = aes(
y = reorder(Club, -averageView),
x = Prediction,
fill = averageView,
color = averageView
)
) +
geom_ridgeline(
stat = "binline",
bins = 20, scale = 0.95,
draw_baseline = FALSE
) +
scale_x_continuous(
breaks = c(5, 10, 15, 20),
labels = c(5, 10, 15, 20)
) +
labs(
y = "", x = "",
title = "\n Our collective predictions for this season \n"
) +
low = "green", high = "red",
guide=FALSE
) +
low = "green", high = "red",
guide=FALSE
) +
theme(
title = element_text(size = 10),
axis.text.y = element_text(size = 6)
)``````

## Calculation inputs

And here are the two inputs to these calculations:

## System settings

``````
R version 3.6.0 (2019-04-26)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS  10.15

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods
[7] base

other attached packages:
[1] forcats_0.4.0       stringr_1.4.0       dplyr_0.8.3
[7] tibble_2.1.3        ggplot2_3.2.1       tidyverse_1.2.1
[10] premPredictor_0.2.4 ggridges_0.5.1

loaded via a namespace (and not attached):
[1] tidyselect_0.2.5 xfun_0.9         haven_2.1.1
[4] lattice_0.20-38  colorspace_1.4-1 generics_0.0.2
[7] vctrs_0.2.0      htmltools_0.4.0  yaml_2.2.0
[10] rlang_0.4.0      pillar_1.4.2     withr_2.1.2