Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hmalmedal/eurovisionsongcontest

Scoreboards of the Eurovision Song Contest
https://github.com/hmalmedal/eurovisionsongcontest

Last synced: about 1 month ago
JSON representation

Scoreboards of the Eurovision Song Contest

Awesome Lists containing this project

README

        

---
output:
md_document:
variant: markdown_github
---

```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```

Scoreboards of the Eurovision Song Contest
==========================================

Scoreboards of the Eurovision Song Contest scraped from the official website.

Installation
------------

Install from GitHub:

```{r, eval=FALSE}
devtools::install_github("hmalmedal/eurovisionsongcontest")
```

Usage
-----

Which participants have received zero points in the final the most times?

```{r, message=FALSE}
library(eurovisionsongcontest)
library(dplyr)
library(tidyr)
library(stringr)
library(lubridate)
eurovisionsongcontest %>%
spread(key, value) %>%
select(Participant, Event, Date, Points) %>%
mutate(Year = year(Date)) %>%
filter(Points == 0, !str_detect(Event, "Semi")) %>%
group_by(Participant) %>%
summarise(n = n(), `Year(s)` = list(Year)) %>%
arrange(desc(n)) %>%
knitr::kable()
```

How often does Greece receive 12 points from Cyprus in the final?

```{r}
eurovisionsongcontest %>%
spread(key, value) %>%
select(Participant, Event, Cyprus = ends_with("Cyprus")) %>%
filter(Participant == "Greece", !str_detect(Event, "Semi"),
Cyprus == 12) %>%
arrange(Event) %>%
knitr::kable()
```