How akisavujel/world-life-expectancy-2024 works
Project type and purpose (what you’re diagramming)
This is a data analytics workflow / data pipeline project, not a running service. The “system” is a sequence of data transformations and analysis artifacts:
• External data source website → Python scraping/cleaning → clean CSV dataset → SQL analysis → Tableau dashboard (published to Tableau Public)
• Supporting artifacts: notebook (.ipynb), SQL script (.sql), Tableau workbook (.twb), exported report (.pdf)
File tree mapping → components
From the repo structure:
• world_life_expectancy_2024..ipynb
Core ETL/ELT logic: web scraping + cleaning + export. (Execution environment: Jupyter/Colab)
• world_life_expectancy_2024.csv
Canonical cleaned dataset used downstream (SQL + Tableau).
• world_life_expectancy_2024..sql
Analysis layer: aggregates, top/bottom, thresholds, gender gap, max-min difference.
• world_life_expectancy_2024.twb
Visualization layer: Tableau workbook connecting to CSV (or to extracted data) and defining KPIs/charts/map.
• world_life_expectancy_2024..pdf
Static deliverable (exported report / snapshot).
• README.md
Documentation + links to Kaggle notebook and Tableau Public dashboard.
This structure strongly suggests a pipeline architecture with well-defined “artifact boundaries” (HTML → DataFrame → CSV → SQL result sets → Tableau viz → published dashboard/PDF).
World Population Review website
• Data accessed via HTTP GET
• HTML table is the raw input
Python scraping module (Requests + BeautifulSoup) (implemented inside the notebook)
• Fetch HTML
• Parse table headers/rows
Data cleaning & preprocessing (Pandas) (also in notebook)
• Normalize column names
• Drop empty/irrelevant rows/columns
• Convert types to numeric
• Handle nulls/duplicates
Clean dataset artifact: CSV (world_life_expectancy_2024.csv)
• This is the handoff contract between processing and analytics/BI
SQL analysis script (world_life_expectancy_2024..sql)
• Reads from CSV *conceptually* (or from an imported table if the user loads CSV into a DB)
• Produces: averages, max/min, thresholds (>80, <60), gender gap, delta max-min
> Important: because the repo does not include a DB (no Docker, no schema/migrations, no DB config), model SQL as either:
> - “Local SQL engine” (SQLite/MySQL/Postgres—unspecified), or
> - “SQL layer” that runs after importing CSV into a database.
Tableau workbook (world_life_expectancy_2024.twb)
• Data source: CSV (or Tableau extract derived from it)
• Contains KPI calculations + charts + map
Publishing target: Tableau Public (external service)
• Published interactive dashboard
• Downstream consumers: recruiters, stakeholders, viewers
Static output: PDF
• Export of results/dashboard for offline viewing
Kaggle notebook page
• Optional execution/distribution environment for the notebook (not required for pipeline correctness)
• protocol (HTTP), format (HTML/CSV), and transformation type (parse/clean/aggregate)
Recommended flows:
Tableau workbook → PDF
Adding feedback loops if they exist in practice:
• “If scraping schema changes → update notebook parsing/cleaning”
• “If KPI definitions change → update SQL and/or Tableau calcs”
Architectural patterns / principles to highlight
• Pipeline / staged architecture: each stage produces a durable artifact (CSV, workbook, PDF).
• Separation of concerns:
• Ingestion (requests/bs4)
• Cleaning (pandas)
• Analysis (SQL)
• Visualization (Tableau)
• Contract-driven handoff: the CSV is the “data contract” (schema: Country, overall, female, male life expectancy).
• Reproducibility:
• Notebook acts as executable documentation for acquisition + transformation steps.
“Don’t overthink it” decomposition (separate into as many components as possible)
To maximize detail without inventing infrastructure that isn’t in the repo, split along *real boundaries*:
Notebook boundary (split into components):
• HTTP fetch (Requests)
• HTML parsing (BeautifulSoup)
• Structuring (table → rows/cols)
• Cleaning (Pandas: rename/drop/type cast)
• Validation checks (null/dupes)
• Export (CSV write)
SQL boundary (split into query groups):
• Averages (overall/male/female)
• Extremes (max/min by country)
• Threshold filters (>80, <60)
• Gender gap calculations
• Max–min difference KPI
Tableau boundary (split into dashboard parts):
• Data connection (CSV)
• KPI tiles (5)
• Bar charts (4)
• (1)
• Interactions (filters/hover tooltips)
• Publishing (Tableau Public)
• Export (PDF)
Bottom-right: Tableau assembly (optional)
That combination will be the “best and most accurate” architecture representation for this specific project.