Wiljan van den Berge commited on
Commit
0f541bf
·
1 Parent(s): d24abb7

docs: Add GEMINI.md for project context

Browse files
Files changed (2) hide show
  1. .gitignore +1 -0
  2. GEMINI.md +60 -0
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ .DS_Store
GEMINI.md ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dutch Minimum Wage Tracker
2
+
3
+ ## Project Overview
4
+
5
+ This project is a Python-based web application for tracking and visualizing the statutory minimum wage in the Netherlands. It provides a historical view from 2002 onwards and includes projections up to 2026.
6
+
7
+ The application is built with **Streamlit** for the user interface, **Pandas** for data manipulation, and **Plotly** for creating interactive charts. It includes functionality to compare adult and youth wages, adjust for inflation (real wage) using data from Statistics Netherlands (CBS), and view the impact of policy changes.
8
+
9
+ The data is sourced from:
10
+ - A manually compiled historical CSV.
11
+ - A web scraper (`scraper.py`) that fetches the most recent data from the Dutch government's official website (`rijksoverheid.nl`).
12
+ - An API client (`fetch_indices.py`) that retrieves inflation and wage indices from the CBS Open Data API.
13
+ - A pre-processing script (`create_mw_archive.py`) that consolidates these sources into a master data file.
14
+
15
+ ## Building and Running
16
+
17
+ ### 1. Installation
18
+
19
+ First, install the required Python packages using the `requirements.txt` file. It's recommended to do this within a virtual environment.
20
+
21
+ ```bash
22
+ # Create and activate a virtual environment (optional but recommended)
23
+ python3 -m venv .venv
24
+ source .venv/bin/activate
25
+
26
+ # Install dependencies
27
+ pip install -r mw_tracker/requirements.txt
28
+ ```
29
+
30
+ ### 2. Data Preparation
31
+
32
+ The application relies on several data files. The scripts to generate them are included in the `mw_tracker` directory.
33
+
34
+ ```bash
35
+ # Fetch latest inflation/wage indices from CBS
36
+ python3 mw_tracker/fetch_indices.py
37
+
38
+ # Scrape the latest minimum wage figures from the government website
39
+ python3 mw_tracker/scraper.py
40
+
41
+ # Consolidate historical and scraped data into the master archive
42
+ python3 mw_tracker/create_mw_archive.py
43
+ ```
44
+
45
+ ### 3. Running the Application
46
+
47
+ Once the dependencies are installed and the data is prepared, you can run the Streamlit application.
48
+
49
+ ```bash
50
+ streamlit run mw_tracker/nl_mw_tracker.py
51
+ ```
52
+
53
+ This will start a local web server and open the application in your browser.
54
+
55
+ ## Development Conventions
56
+
57
+ - **Data Flow:** Raw data is collected by `scraper.py` and `fetch_indices.py`. This data is then processed by `create_mw_archive.py` to produce `data/minimum_wage_archive.csv`, which is the final, clean dataset consumed by the Streamlit app (`nl_mw_tracker.py`).
58
+ - **Configuration:** Key constants, file paths, and UI text are defined at the top of each script. The main application (`nl_mw_tracker.py`) includes translations for both English and Dutch.
59
+ - **Dependencies:** All Python dependencies are explicitly listed in `mw_tracker/requirements.txt`.
60
+ - **Modularity:** The project is divided into distinct scripts for different tasks: data fetching, data processing, and presentation.