← All Interactive Demos

🌡️ Climate Impact on Employment — Econometric Workbench

Multi-Region Provincial Panel Analysis (Vietnam 1995–2025 · N = 155 Region-Year Obs) · Real-Time Matrix OLS & Two-Way Fixed-Effects (TWFE) · SSP Scenario Simulator.

— β₁ Temperature Effect (per +1.0°C)
— β₂ Rainfall Effect (per +100 mm)
— Model Fit (R² / Within-R² & F-stat)
— Climate Joint Significance (p-value)
155 Panel Sample Size (Region × Year)

📈 Long-Term Climate Warming vs. Sectoral Employment (1995–2025)

Annual regional mean Temperature Anomaly (+°C) overlaid against selected sectoral employment trajectory.

Temp Anomaly (+°C) Sectoral Employment Outcome (%)

🔬 Panel Scatter & Fitted Econometric Regression Curve

Each point represents a region-year observation; solid line shows real-time OLS/Quadratic fit.

Region-Year Observation Fitted Regression Slope (ŷ = Xβ̂)

📑 Live Econometric Estimation Table (Exact Matrix `(X'X)⁻¹X'y` + HC1 Robust SE)

TWFE Demeaned Estimator
Explanatory Variable (Regressor) Coef. (β̂) Robust SE t-Stat p-Value 95% Conf. Interval Significance

🎛️ Climate & Adaptation Controls

Simulate CMIP6 SSP2-4.5 / SSP5-8.5 warming & monsoon rainfall shocks against national workforce baseline (52.4M employed).

Warming Shock (Δ Temperature) +1.8°C
IPCC SSP1-2.6 (+1.2°C) · SSP2-4.5 (+1.8°C) · SSP5-8.5 (+2.5°C)
Monsoon Rainfall Anomaly +150 mm
-300 mm (El Niño Drought) ↔ +400 mm (Extreme Typhoon/Flood)
Adaptation & Reskilling Coverage 25%
Heat-shielded factories, saline-tolerant crops & vocational transition

📊 Projected Sectoral Labor Reallocation & FTE Hours Impact

— Net National FTE Equivalent Shift
— Outdoor Heat-Stress Productivity Loss
— Estimated Labor-Driven GDP Impact
Economic Sector Baseline Workforce Predicted Growth Δ (%) FTE Job / Hours Shift Vulnerability / Reallocation

🐍 Python (`linearmodels.PanelOLS` & `statsmodels`) + R (`fixest`) Pipeline

100% reproducible econometric pipeline ready to run on World Bank CCKP / ERA5 + ILOSTAT / GSO Labor Force Survey microdata.

import pandas as pd
import numpy as np
import statsmodels.formula.api as smf
from linearmodels.panel import PanelOLS

# 1. Load cleaned ERA5 Climate + ILOSTAT / GSO Provincial Labor Panel (1995-2025)
df = pd.read_csv("climate_employment_panel_1995_2025.csv")
df["temp_sq"] = df["temp_anomaly_c"] ** 2
df["rain_100mm"] = df["rain_anomaly_mm"] / 100.0
df = df.set_index(["region", "year"])

# 2. Two-Way Fixed Effects (Region FE + Year FE) with Driscoll-Kraay / Clustered SEs
mod = PanelOLS.from_formula(
    "agri_emp_growth ~ 1 + temp_anomaly_c + temp_sq + rain_100mm + extreme_heat_days + gdp_growth_ctrl + EntityEffects + TimeEffects",
    data=df
)
res_twfe = mod.fit(cov_type="clustered", cluster_entity=True, cluster_time=True)
print(res_twfe.summary)

# --- R Equivalent (fixest::feols with Conley / Two-Way Clustered Standard Errors) ---
# library(fixest)
# est_twfe <- feols(
#   c(agri_emp_growth, const_hours_growth, mfg_emp_growth, tourism_emp_growth, services_emp_growth) ~
#     temp_anomaly_c + I(temp_anomaly_c^2) + rain_100mm + extreme_heat_days + gdp_growth_ctrl | region + year,
#   data = panel_df, vcov = ~region + year
# )
# etable(est_twfe, tex = FALSE)

📥 Plug In Any Country's CSV Panel (or Inspect Built-In 1995–2025 Panel)

Columns: year,region,temp_c,rain_mm,heat_days,gdp_ctrl,agri,const,mfg,tourism,services

Sample Panel Observations (Showing Latest 25 of 155 Region-Year Records)

Year Region ΔTemp (°C) Rain Anom (mm) >35°C Days Agri Δ% Const Hrs Δ% Mfg Δ% Tourism Δ% Services Δ%