nnkl1706 commited on
Commit
a11cf44
·
verified ·
1 Parent(s): 31a964b

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +83 -0
README.md ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Exploratory Data Analysis - Paavo Dataset
2
+
3
+ An exploratory data analysis (EDA) pipeline for **Statistics Finland's Paavo open dataset**, which provides postal code and municipality-level statistics on demographics, income levels, household structures, and building infrastructure across Finland.
4
+
5
+ ## Project Overview
6
+
7
+ This script processes the Paavo dataset to generate summary statistics, distribution plots, correlation analysis, and targeted visualizations for key metrics across top-ranking postal areas.
8
+
9
+ ### Key Analysis Features:
10
+ * **Data Cleaning:** Strips whitespace from headers and excludes regional summary records (`MK*` rows, e.g., "MK01 Uusimaa").
11
+ * **Demographic Distributions:** Analyzes key attributes such as total inhabitants, average/median income, average age, and household sizes.
12
+ * **Correlation Heatmap:** Generates feature relationships across all numeric metrics.
13
+ * **Income & Household Breakdown:** Evaluates distribution across lowest, middle, and highest income tiers for top population and household centers.
14
+ * **Density & Economic Power Metrics:** Computes housing density proxies (inhabitants per residential building) and analyzes top regional purchasing power.
15
+
16
+ ---
17
+
18
+ ## Directory Structure
19
+
20
+ ```text
21
+ ├── eda_script.py # Main EDA script
22
+ ├── PaavoDataset.csv # Source dataset (Statistics Finland)
23
+ └── eda_outputs/ # Output directory generated by script
24
+ ├── summary_statistics.csv
25
+ ├── 01_distributions.png
26
+ ├── 02_correlation_heatmap.png
27
+ ├── 03_income_categories_top20.png
28
+ ├── 04_household_income_categories_top20.png
29
+ ├── 05_inhabitants_per_building_top20.png
30
+ └── 06_purchasing_power_top20.png
31
+ ```
32
+
33
+ ---
34
+
35
+ ## Prerequisites & Installation
36
+
37
+ Ensure you have Python 3.8+ installed along with the required dependencies:
38
+
39
+ ```bash
40
+ pip install pandas matplotlib seaborn
41
+ ```
42
+
43
+ ---
44
+
45
+ ## Data Input Requirements
46
+
47
+ place the raw dataset file **`PaavoDataset.csv`** in the root directory.
48
+
49
+ * **Format:** Semicolon-separated values (`sep=";"`)
50
+ * **Encoding:** `latin1`
51
+ * **Key Columns Expected:**
52
+ * `Area`
53
+ * `Inhabitants`, `Average age of inhabitants`, `Average size of households`
54
+ * `Average income of inhabitants`, `Median income of inhabitants`
55
+ * `Inhabitants belonging to the lowest/middle/highest income category`
56
+ * `Households`, `Households belonging to the lowest/middle/highest income category`
57
+ * `Residential buildings`, `Accumulated purchasing power of inhabitants`
58
+
59
+ ---
60
+
61
+ ## Usage
62
+
63
+ Run the Python analysis script:
64
+
65
+ ```bash
66
+ python eda_script.py
67
+ ```
68
+
69
+ ---
70
+
71
+ ## Generated Artifacts
72
+
73
+ All outputs are exported to the **`eda_outputs/`** directory:
74
+
75
+ | Artifact | Description |
76
+ | :--- | :--- |
77
+ | `summary_statistics.csv` | Descriptive statistics (`count`, `mean`, `std`, `min`, `quartiles`, `max`) for numeric columns. |
78
+ | `01_distributions.png` | Distribution plots with KDE curves for key demographic and income metrics. |
79
+ | `02_correlation_heatmap.png` | Matrix correlation map across all numeric features. |
80
+ | `03_income_categories_top20.png` | Stacked horizontal bar plot of income breakdown for top 20 areas by population. |
81
+ | `04_household_income_categories_top20.png` | Stacked horizontal bar plot of household income breakdown for top 20 areas by households. |
82
+ | `05_inhabitants_per_building_top20.png` | Bar chart of top 20 areas ranked by inhabitants per residential building. |
83
+ | `06_purchasing_power_top20.png` | Bar chart of top 20 areas ranked by total accumulated purchasing power (EUR). |