Effect of Municipal Train Station Presence and Volume of Train Traffic on House Prices in the Netherlands
This project analyzes how the presence of train stations in municipalities and the volume of trains stopping at these stations affect house prices in the Netherlands. This study is part of a bachelor's thesis in Economics at the University of Amsterdam.
The study consists of two main phases:
- Analysis of the effect of the presence of a train station in a municipality on house prices per square meter, controlling for other factors.
- Analysis of the effect of the volume of train traffic (trains stopped at any station) in municipalities with a train station present on square meter house prices, controlling for other factors.
Click here to view the main dataset.
- House Prices Data and Controls: Regional indicators on the municipality level, located in the unprocessed/cbs folder.
- Source: CBS Statline
- Municipalities GeoJSON: Cartographic data in GeoJSON format on the outline of Dutch municipalities for 2023.
- Source: Cartomap
- Netherlands Train Stations: Data on locations and categories of train stations across the Netherlands.
- Source: Rijden de Treinen (station data)
- Netherlands Train Traffic: Monthly data on train service across the Netherlands.
- Source: Rijden de Treinen (traffic data)
main.py: Main entrypoint of the application.unprocessed/: Directory containing raw data files.output/: Directory containing processed CSV files, chloropleth maps in HTML format and tables and figures resulting from the analysis.src/dataset: Directory containing files related to processing the raw data.src/dataset/main.py: Script that constructs the main dataset from the raw CBS data and the processed station and traffic data.src/analysis: Directory containing files related to the analysis of the main dataset. Contains subfoldersphase_1andphase_2and a file calledmaps.pywhich creates chloropleth maps of different variables by municipality.src/analysis/main.py: Sequentially runs Phase 1 and Phase 2 of the analysis.
- Python: Ensure that Python 3.x is installed. You can download it here.
- Virtual Environment: It is recommended to use a virtual environment to manage dependencies. You can use
venv,virtualenv, orconda. - Dependencies: The required Python libraries are listed in the
requirements.txtfile.
- Note: on Unix/macOS systems step 2-4 can be skipped by executing the
scripts/run.shfile. Optionally, you can also clean the output folder by runningscripts/clean.sh.
-
Clone the Repository:
git clone https://github.com/leviszaboo/thesis.git -
Create and Activate Virtual Environment:
# Using venv python -m venv venv source venv/bin/activate # For Unix/macOS venv\Scripts\activate.bat # For Windows # Using conda (optional) conda create -n train-analysis python=3.x conda activate train-analysis -
Install Dependencies:
pip install -r requirements.txt -
Run the Main Script:
- Execute the
main.pyscript located at the top level of the project directory. This script will sequentially execute all necessary steps to prepare the dataset and run the analysis.
python main.py- You can also specify the
--analysis_only,--phase_1,--phase_2,--dataset_onlyor--skip_station_datacommand line arguments to run only a specific part of the main function.
- Execute the
-
Verify the Output:
- Check the generated files in the
data/outputfolder for the main and stations dataset, and theoutputfolder for the analysis results.
- Check the generated files in the
"Effect of Municipal Train Station Presence and Volume of Train Traffic on House Prices in the Netherlands" © 2024 by Levente Szabo is licensed under Creative Commons Attribution 4.0 International License. This means you are free to:
- Share: Copy and redistribute the material in any medium or format.
- Adapt: Remix, transform, and build upon the material for any purpose, even commercially.
- Conditions: Attribution must be provided with proper credit, a link to the license, and indication if changes were made.
