This project analyzes mobile network coverage (GSM, LTE, 5G Standalone, and 5G Total) in the Schwarzwald-Rhein-Baar-Bodensee region of Baden-Württemberg, Germany. It uses data from the German Federal Network Agency (Bundesnetzagentur), geographical grid data from the Federal Agency for Cartography and Geodesy (BKG), and address point data from the State Agency for Spatial Information and Rural Development Baden-Württemberg (LGL-BW). The goal is to identify areas with limited or no mobile network coverage, providing a data-driven basis for potential policy recommendations.
The project follows a reproducible research template and is organized as follows:
final-project-Mees010/ <- Project Root ├── src/ <- Source code │ └── network_coverage/ <- Main project package │ ├── analysis/ <- Analysis scripts (merging, aggregating, summaries) │ ├── data_management/<- Data cleaning and preparation scripts │ ├── tasks/ <- pytask task definitions │ ├── visualization/ <- Plotting and table generation │ └── config.py <- Project configuration (paths, constants) ├── bld/ <- Build directory (generated outputs) │ ├── analysis/ <- Results of data analysis (merged data, summaries) │ ├── data/ <- Raw and processed data │ │ └── raw/ <- Raw downloaded and extracted data │ ├── documents/ <- Compiled LaTeX report (paper.pdf) │ └── figures/ <- Generated plots and table images ├── documents/ <- LaTeX source files (paper.tex) ├── tests/ <- Unit tests ├── .gitignore <- Files/directories to be ignored by Git ├── environment.yml <- Conda environment specification ├── pyproject.toml <- Project metadata and build configuration └── README.md <- This file
src/: Contains all the Python source code, organized into modules for data management, analysis, tasks, and visualization.bld/: This directory is automatically managed bypytask. It contains all generated outputs, including cleaned data, analysis results, figures, tables, and the compiled PDF report. Do not manually modify files in this directory.data/: Contains the raw and processed data. Theraw/subdirectory holds the original downloaded and extracted data files.documents/: Contains the LaTeX source file (paper.tex) for the report.tests/: Contains the unit tests for the project..gitignore: Specifies files and directories that should not be tracked by Git (e.g., thebld/directory, temporary files).environment.yml: Defines the Conda environment, listing all required Python packages and their versions.pyproject.toml: Contains project metadata and configuration for build tools.
-
Prerequisites:
- You need to have a working installation of Miniforge (or Anaconda/Miniconda) and Git.
- You need a LaTeX distribution (e.g., TeX Live, MiKTeX, or MacTeX) installed and working. Make sure
pdflatexandlatexmkare available on your system's PATH.
-
Clone the Repository:
cd <YOUR_DESIRED_PROJECT_DIRECTORY> git clone https://github.com/iame-uni-bonn/final-project-Mees010.git
-
Create and Activate the Conda Environment:
conda env create -f environment.yml conda activate network_coverage
-
Build the Project: You have two options to run the project: A. Using pytask directly:
pytask
B. Using the rebuild script (recommended for clean builds):
python rebuild.py
The rebuild script:
- Cleans the build directory completely.
- Ensures figures are generated before LaTeX compilation.
- Provides better error handling and reporting.
- Handles LaTeX path issues automatically.
Both methods will:
- Download the required data files (if they don't already exist).
- Extract the downloaded ZIP files.
- Clean and prepare the data.
- Perform the data analysis (merging, joining, aggregating).
- Generate summary tables (as CSV files).
- Create bar charts (as PNG files).
- Generate table images (as PNG files).
- Compile the LaTeX report (
paper.tex) into a PDF (paper.pdf).
All output files will be placed in the
bld/directory. -
Run the tests:
pytest
This command will run all tests defined on the
testsdirectory.
The pytask workflow generates the following outputs in the bld/ directory:
-
bld/data/:bkg_grid.gpkg: Cleaned BKG grid data (GeoPackage).addresses_bw_ihk.gpkg: Cleaned address data (GeoPackage).coverage.csv: Cleaned mobile network coverage data (CSV).vg250_gem_ihk.gpkg: Cleaned VG250 Gemeinde data (GeoPackage).vg250_krs_ihk.gpkg: Cleaned VG250 Kreis data (GeoPackage).raw/: Contains the original downloaded ZIP files and their extracted contents.
-
bld/analysis/:merged_grid_coverage.gpkg: Merged grid and coverage data (GeoPackage).ihk_grid_versorgung_addr_1024_final.gpkg: Joined and aggregated data (GeoPackage).*_summary_named.csv: Summary tables of address counts for each technology (CSV).*_area_summary_named.csv: Summary tables of area coverage for each technology (CSV).
-
bld/figures/:barchart_*.png: Bar charts visualizing coverage percentages (PNG).table_*.png: table as image visualizing coverage in absolute numbers (PNG).
-
bld/documents/:paper.pdf: The compiled LaTeX report (PDF).
If you encounter issues with LaTeX compilation (e.g., missing figures in the PDF):
- Use the
rebuild.pyscript, which handles proper dependency ordering. - Check the
bld/figures/directory to ensure all required PNG files were generated. - Verify your LaTeX installation and ensure all necessary packages are installed.
- Mobile Network Coverage: Bundesnetzagentur (German Federal Network Agency), Mobile Network Monitoring, October 2024. gigabitgrundbuch.bund.de
- Geographical Grid: Bundesamt für Kartographie und Geodäsie (BKG), DE_Grid_ETRS89-UTM32_100m. https://daten.gdz.bkg.bund.de/
- Address Data: Landesamt für Geoinformation und Landentwicklung Baden-Württemberg (LGL-BW). https://opengeodata.lgl-bw.de/
- Administrative Boundaries (VG250): Bundesamt für Kartographie und Geodäsie (BKG). https://daten.gdz.bkg.bund.de/