Skip to content

Repository files navigation

Data Science Portfolio

Data science CI Case study License: MIT

A reproducible portfolio of applied data-science work, centered on clear problem framing, leakage-resistant evaluation, source provenance, and automated verification.

Conceptual aerial neighborhood in which visible property structures become layered model features and converge into two age-group regions while construction year remains hidden

Visual intuition: the model can inspect structure, condition, quality, garage, and architectural signals, but never the construction year it is asked to infer.

Start here

If you want to... Go to
See the question and holdout result Featured case study
Inspect the figures behind the score Read the evidence
Reproduce the analysis Reproduce
Review the leakage and data boundaries Design decisions · Dataset notes
Read the web presentation Published case study
Cite or extend the work CITATION.cff · Contributing

Featured case study: property-age classification

Can structural, condition, quality, garage, architectural, and transaction attributes identify homes built before 1980—without giving the model the build year?

The selected random forest is trained on 80% of 22,913 property records and evaluated on a fixed, stratified 20% holdout. yrbuilt, before1980, and the parcel identifier are explicitly removed from the model features.

Holdout metric Result
Accuracy 92.36%
Balanced accuracy 92.13%
F1 0.9384
ROC-AUC 0.9768

Top feature importances

Analysis path

flowchart LR
    A["22,913 property records"] --> B["Validate source and schema"]
    B --> C["Remove year, target, and parcel ID"]
    C --> D["Fixed stratified 80/20 split"]
    D --> E["Train and compare candidates"]
    E --> F["Evaluate once on holdout"]
    F --> G["Metrics, figures, and case study"]
Loading

Read the evidence

Data boundary Holdout behavior
Distribution of property build years with the pre-1980 decision boundary Confusion matrix for the fixed property-age holdout
The target boundary creates two interpretable age groups while the build year itself remains excluded from the model. The confusion matrix makes both kinds of error visible instead of reducing the evaluation to one headline score.

Read the complete case study, inspect the generated metrics, or open the published summary.

Reproduce

python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -r requirements-dev.txt
python -m unittest discover -s tests -v
python -m src.property_age_model --output reports/figures
ruff check .
ruff format --check .

The default analysis downloads its CSV directly from the upstream source. To use an existing local copy:

python -m src.property_age_model --data data/dwellings_ml.csv

Repository map

analysis/          narrative Quarto case study
src/               reusable data loading, validation, modeling, and reporting
tests/             offline regression tests with synthetic data
reports/figures/   deterministic holdout metrics and visual artifacts
docs/              concise GitHub Pages presentation
DATASET.md         source, scope, licensing, and redistribution notes

Design decisions

  • Raw source data is not committed; the upstream repository does not declare a dataset license.
  • Direct target leakage (yrbuilt) and high-cardinality identity (parcel) are excluded in one tested feature boundary.
  • Multiple metrics accompany accuracy because the target is moderately imbalanced.
  • A random forest is preferred over a marginally more accurate gradient-boosting experiment because it offers a simpler, inspectable feature-importance story for this portfolio case study.
  • Report figures and metrics.json are generated by the same code exercised in CI.

The code and original documentation in this repository are licensed under the MIT License. Dataset terms remain with the upstream source described in DATASET.md.

For help reproducing the case study, see SUPPORT.md. Proposed changes should follow CONTRIBUTING.md, and sensitive reports should use the process in SECURITY.md.

About

Reproducible data-science case studies with leakage-aware evaluation, source provenance, tests, and generated evidence.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages