Skip to content
This repository was archived by the owner on May 7, 2026. It is now read-only.

Repository files navigation

PolicyCraft AI: OECD Wellbeing Dashboard and Scenario Simulator

Python/Plotly data-app export for exploring OECD Better Life Index data, country-level wellbeing gaps, and simple "what-if" policy scenarios.

Status: archived Plotly Studio demo export. The previously linked hosted Plotly app currently returns 404 as of 2026-05-07. This repo needs packaging work before it should be treated as a reproducible application.

Problem Statement

Static policy dashboards often show rankings without explaining the drivers behind them. This project explores a more guided workflow: normalize OECD wellbeing indicators, compare countries across dimensions, and generate rule-based diagnostic text for country profiles and scenario changes.

Architecture Overview

OECD raw data
  |
  v
oecd_transform.py
  |
  v
Cleaned country-level dataset
  |
  v
Plotly Dash / DDK layout
  |
  v
Callbacks in diagonosis.py and simulator.py
  |
  v
Interactive charts and template-driven narrative text

Tech Stack

  • Python
  • Pandas
  • Plotly / Dash / DDK
  • OECD Better Life Index data

What I Implemented

  • Data transformation pipeline that filters, pivots, and normalizes OECD wellbeing indicators.
  • Composite wellbeing score and gap columns for country comparison.
  • Dash layout for overview, country diagnosis, and scenario simulation screens.
  • Callback logic for country selection, dimension comparison, slider-based scenario changes, and narrative text generation.
  • Percentile-based handling for inverted indicators where lower values are better.

Current Limitations

  • The hosted Plotly app link is currently unavailable.
  • The repository does not include a standalone app.py entrypoint.
  • The source and processed datasets are not included.
  • Some Plotly Studio support modules are missing from this export.
  • Narrative generation is rule-based; there is no live LLM or external AI service in the current code.
  • diagonosis.py is misspelled and should be renamed to diagnosis.py during packaging.
  • No tests, CI workflow, Dockerfile, or dependency file are included yet.

How to Review

The most relevant files are:

oecd_transform.py   Data cleaning, normalization, and feature creation
layout.py           Plotly/Dash layout structure
diagonosis.py       Country diagnosis callbacks and narrative logic
simulator.py        Policy scenario callback logic
policy.py           App registration/bootstrap code from the Plotly export

Reproducibility Roadmap

  • Add pyproject.toml or requirements.txt.
  • Add a standalone Dash entrypoint.
  • Include sample data or documented download steps for the OECD dataset.
  • Rename diagonosis.py to diagnosis.py and update imports/docs.
  • Add unit tests for transformation and scenario calculations.
  • Add GitHub Actions for linting and tests.
  • Add Dockerfile and deployment instructions if this becomes a live demo again.

Evidence to Add

  • Working deployment URL or remove homepage entirely.
  • Screenshot of the dashboard running locally or on a hosted platform.
  • Example input/output from oecd_transform.py.
  • Test output for transformation logic.
  • Short note explaining which modules came from Plotly Studio export and which were handwritten.

About

Python/Plotly dashboard export for OECD wellbeing data transformation, diagnostics, and scenario simulation

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages