Take-Home Task 2: Hotel Prices and Location across European Cities
Assigned: end of Session 2, Thursday 09 April 2026
Due: Wednesday, 29 April 2026, 23:59
Grading: Pass / fail
What this task is about
You are given data on hotel prices across 46 European cities and asked to investigate what drives those prices — and whether the price penalty for being far from the city centre differs between capital and non-capital cities. You will build a series of four regression models of increasing complexity, work with categorical variables and an interaction term, and present your results in polished tables. You will also reflect critically on what your models leave out.
This task builds directly on Session 2. You will use modelsummary for regression tables and flextable for descriptive statistics — both introduced in the Session 2 debriefing.
Dataset
The dataset hotels-europe.csv covers prices and features of hotels in 46 European cities across 10 different dates, scraped from a price comparison website. It was originally published by Békés & Kézdi (2021) as two separate files (hotels-europe_price.csv and hotels-europe_features.csv), which have been pre-joined for this task so you can load a single file directly. Full documentation and the original source are available at:
gabors-data-analysis.com/datasets/hotels-europe
Direct OSF link: https://osf.io/r6uqb/
The file is already included in this repository — you do not need to download anything.
How to access the task
Accept the assignment on GitHub Classroom
Clicking the link creates your personal copy of the assignment repository. All your work goes there — your submission is the last commit pushed before the deadline.
How to work on the task
When you accept the assignment you get your own GitHub repository with the task file (TaskDescription.qmd), the data, and everything else you need. You have two options for where to run R:
- Clone your repository to your computer
- Open
AdvancedDataScience26-Task2.Rprojin RStudio - Open
TaskDescription.qmdand work through each section - Replace all placeholder text with your own code and answers; delete instructor comments before submitting
- Render to PDF: Ctrl/Cmd + Shift + K
- Commit and push — your last commit before 23:59 on 29 April is your submission
Note on PDF rendering: rendering to PDF requires a LaTeX installation. If you see an error mentioning
pdflatexortinytex, run the following once in the R console and then try rendering again:install.packages("tinytex") tinytex::install_tinytex()
If you need a refresher on cloning, committing, and pushing, see the Session 1 materials.
- On your repository page, click the green Code button → Open with Codespaces → New codespace
- Wait a few minutes for the environment to build — R, Quarto, TinyTeX, and all required packages are installed automatically
- RStudio opens in your browser; no login is required — it opens directly
- Open
TaskDescription.qmdand work through each section exactly as you would in RStudio on your own machine - Render with Ctrl/Cmd + Shift + K; commit and push via the Git pane
Codespace hours are free for students through GitHub Education. But hours are limited so please close the codespace if you are not using it. Also, make sure you have applied for the student benefits as explained here.
Grading
This task is graded pass / fail. A pass requires all of the following:
| Criterion | What we look for |
|---|---|
| All sections attempted | No section is left blank or contains only placeholder text |
| Code runs without errors | The rendered PDF is produced by actually running the code |
| Results are interpreted | Numbers are explained in plain language — a bare table with no text does not count |
| Reflection questions answered | Both reflections contain a reasoned argument, not just a variable name |
If you are stuck on a specific step, use the discussion space. If nothing helps, say so explicitly in your document and describe what you tried. An honest account of where you got stuck, combined with a good-faith attempt, counts toward a pass. Leaving a section blank does not.
Getting help
Post questions in the course discussion space. Check whether your question has already been answered before posting. You are encouraged to help each other; sharing complete code solutions is the only thing that is not allowed.