Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions data/curated/euroleague_basketball/cleaning.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

# Clean data provided by https://github.com/natanast/EuroleagueBasketball.
# The data was already cleaned and curated in the EuroleagueBasketball R package.
# No cleaning was necessary.
euroleague_basketball <- readr::read_csv("https://raw.githubusercontent.com/natanast/EuroleagueBasketball/main/data-raw/euroleague_dataset.csv")


21 changes: 21 additions & 0 deletions data/curated/euroleague_basketball/euroleague_basketball.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Team,Home city,Arena,Capacity,Last season,Country,FinalFour_Appearances,Titles_Won,Years_of_FinalFour_Appearances,Years_of_Titles_Won
Anadolu Efes,Istanbul,Basketball Development Center,"10,000",6th,Turkey,5,2,"2000, 2001, 2019, 2021, 2022","2021, 2022"
Barcelona,Barcelona,Palau Blaugrana,"7,585",5th,Spain,0,0,NA,NA
Baskonia,Vitoria-Gasteiz,Buesa Arena,"15,431",14th,Spain,0,0,NA,NA
Bayern Munich,Munich,SAP Garden,"11,500",9th,Germany,0,0,NA,NA
Crvena zvezda Meridianbet,Belgrade,Belgrade Arena,"18,386",10th,Serbia,0,0,NA,NA
Dubai Basketball,Dubai,Coca-Cola Arena,"17,000",NA,United Arab Emirates,0,0,NA,NA
Fenerbahce,Istanbul,Ülker Sports and Event Hall,"13,000",1st,Turkey,7,2,"2015, 2016, 2017, 2018, 2019, 2024, 2025","2017, 2025"
Hapoel IBI Tel Aviv,Tel Aviv,Arena 8888 Sofia \ Arena Botevgrad \ Menora Mivtachim Arena,"12,373",(EuroCup),Israel,0,0,NA,NA
LDLC ASVEL,Villeurbanne,"LDLC Arena, Astroballe","12,523, 5,556",15th,France,0,0,NA,NA
Maccabi Rapyd Tel Aviv,Tel Aviv,Menora Mivtachim Arena,"10,383",16th,Israel,0,0,NA,NA
Monaco,Monaco,Salle Gaston Médecin,"5,000",2nd,Monaco,2,0,"2023, 2025",None
Olimpia Milano,Milan,Unipol Forum,"12,700",11th,Italy,4,0,"1992, 2021",None
Olympiacos,Piraeus,Peace and Friendship Stadium,"12,300",3rd,Greece,14,3,"1994, 1995, 1997, 1999, 2009, 2010, 2012, 2013, 2015, 2017, 2022, 2023, 2024, 2025","1997, 2012, 2013"
Panathinaikos,Athens,Telekom Center Athens,"18,300",4th,Greece,13,7,"1994, 1995, 1996, 2000, 2001, 2002, 2005, 2007, 2009, 2011, 2012, 2024, 2025","1996, 2000, 2002, 2007, 2009, 2011, 2024"
Paris Basketball,Paris,"Adidas Arena, Accor Arena","8,000, 15,705",8th,France,0,0,NA,NA
Partizan,Belgrade,Belgrade Arena,"18,386",12th,Serbia,3,1,"1988, 1992, 1998, 2010",1992
Real Madrid,Madrid,Movistar Arena,"15,000",7th,Spain,12,6,"1995, 1996, 2011, 2013, 2014, 2015, 2017, 2018, 2019, 2022, 2023, 2024","1995, 2015, 2018, 2023"
Valencia Basket,Valencia,Roig Arena,"15,600",(EuroCup),Spain,0,0,NA,NA
Virtus Olidata Bologna,Bologna,"Virtus Arena, PalaDozza","9,980, 5,570",17th,Italy,0,0,NA,NA
Zalgiris,Kaunas,Žalgirio Arena,"15,415",13th,Lithuania,2,1,"1999, 2018",1999
12 changes: 12 additions & 0 deletions data/curated/euroleague_basketball/euroleague_basketball.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
|variable |class |description |
|:------------------------------|:---------|:---------------------------------------------------------------------------|
|Team |character |Name of the basketball team. |
|Home city |character |City where the team is based. |
|Arena |character |Name of the home arena. |
|Capacity |character |Seating capacity of the arena. |
|Last season |character |Last season in which the team participated. |
|Country |character |Country where the team is based. |
|FinalFour_Appearances |double |Number of times the team has reached the EuroLeague Final Four. |
|Titles_Won |double |Number of EuroLeague titles won by the team. |
|Years_of_FinalFour_Appearances |character |Years when the team reached the Final Four. |
|Years_of_Titles_Won |character |Years when the team won the EuroLeague championship. |
30 changes: 30 additions & 0 deletions data/curated/euroleague_basketball/instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Prepare the dataset

These instructions are for preparing a dataset using the R programming language.
We hope to provide instructions for other programming languages eventually.

If you have not yet set up your computer for submitting a dataset, please see the full instructions at <https://github.com/rfordatascience/tidytuesday/blob/main/pr_instructions.md>.

1. `cleaning.R`: Modify the `cleaning.R` file to get and clean the data.
- Write the code to download and clean the data in `cleaning.R`.
- If you're getting the data from a github repo, remember to use the 'raw' version of the URL.
- This script should result in one or more data.frames, with descriptive variable names (eg `players` and `teams`, not `df1` and `df2`).

2. `saving.R`: Use`saving.R` to save your datasets. This process creates both the `.csv` file(s) and the data dictionary template file(s) for your datasets. **Don't save the CSV files using a separate process because we also need the data dictionaries.**
- Run the first line of `saving.R` to create the functions we'll use to save your dataset.
- Provide the name of your directory as `dir_name`.
- Use `ttsave()` for each dataset you created in `cleaning.R`, substituting the name for the dataset for `YOUR_DATASET_DF`.

3. `{dataset}.md`: Edit the `{dataset}.md` files to describe your datasets (where `{dataset}` is the name of the dataset). These files are created by `saving.R`. There should be one file for each of your datasets. You most likely only need to edit the "description" column to provide a description of each variable.

4. `intro.md`: Edit the `intro.md` file to describe your dataset. You don't need to add a `# Title` at the top; this is just a paragraph or two to introduce the week.

5. Find at least one image for your dataset. These often come from the article about your dataset. If you can't find an image, create an example data visualization, and save the images in your folder as `png` files.

6. `meta.yaml`: Edit `meta.yaml` to provide information about your dataset and how we can credit you. You can delete lines from the `credit` block that do not apply to you.

### Submit your pull request with the data

1. Commit the changes with this folder to your branch. In RStudio, you can do this on the "Git" tab (the "Commit" button).

2. Submit a pull request to <https://github.com/rfordatascience/tidytuesday>. In R, you can do this with `usethis::pr_push()`, and then follow the instructions in your browser.
12 changes: 12 additions & 0 deletions data/curated/euroleague_basketball/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
This week we’re exploring **EuroLeague Basketball**, the premier men’s club basketball competition in Europe.

The dataset contains information on EuroLeague teams, including their country, home city, arena, seating capacity, and historical performance (Final Four appearances and titles won).

The dataset is curated from publicly available sources such as Wikipedia and official EuroLeague records, and was packaged in the [EuroleagueBasketball R package](https://github.com/natanast/EuroleagueBasketball), with documentation available at [natanast.github.io/EuroleagueBasketball](https://natanast.github.io/EuroleagueBasketball/).

> "The EuroLeague is the top-tier European professional basketball club competition, widely regarded as the most prestigious competition in European basketball." — EuroLeague

Some questions you might explore with this dataset:
- Which countries are most represented in the EuroLeague?
- How do arena capacities compare across teams and countries?
- Which clubs have been the most successful historically?
20 changes: 20 additions & 0 deletions data/curated/euroleague_basketball/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
title: EuroLeague Basketball

article:
title: EuroLeague – Official competition overview
url: https://en.wikipedia.org/wiki/EuroLeague

data_source:
title: EuroleagueBasketball R package (curated from Wikipedia and EuroLeague records)
url: https://github.com/natanast/EuroleagueBasketball

images:
- file: plot.png
alt: >
Lollipop chart showing the seating capacities of EuroLeague arenas by team.

credit:
post: Natasa Anastasiadou
github: https://github.com/natanast
linkedin: https://www.linkedin.com/in/natasa-anastasiadou-87405a220

Binary file added data/curated/euroleague_basketball/plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions data/curated/euroleague_basketball/saving.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Run this
source("data/curated/curation_scripts.R")

# Fill in the name of the folder you created in "curated", then run this.
dir_name <- "euroleague_basketball"

# Run this for each of your datasets, replacing YOUR_DATASET_DF with the name of
# a data.frame from cleaning.R.
ttsave(euroleague_basketball, dir_name = dir_name)