Daily data pipeline for Moldova's residential real-estate market — from listing discovery on 999.md to normalized data, private market aggregates, and the public API behind Imobil.Index.
→ Open the live Imobil.Index dashboard
The pipeline turns source listings into reproducible, aggregated market data. Each layer has one clear responsibility:
| Stage | Main object | Responsibility |
|---|---|---|
| 🔎 Acquisition | raw_links |
Discover numeric listing URLs and track their processing status. |
| 🟤 Bronze | bronze_estate |
Parse new listing pages while preserving source-shaped text and JSON. |
| ⚪ Silver | silver_estate |
Normalize dates, prices, locations, dimensions, and property attributes. |
| 🟡 Gold | gold_* |
Build private current aggregates and daily market snapshots. |
| 🔒 Public API | api_* |
Publish aggregated-only, read-only datasets for the dashboard and REST consumers. |
The separate
Imobil.Index Streamlit application
reads only the safe api_* layer. Internal listing-level and operational data
remain private.
- Automated daily pipeline — GitHub Actions runs the full dependency chain
at
01:00 UTCand also supports manual execution. - Resilient listing discovery — waits for numeric 999.md listing URLs, retries bounded failures, and preserves page diagnostics and screenshots.
- Source evidence in Bronze — keeps original text and structured JSON where premature normalization would lose useful information.
- Typed Silver layer — produces analysis-ready prices, dates, locations,
dimensions, amenities,
quality_score, andnormalization_status. - Private Gold, public aggregates — dashboard users receive market metrics without access to listing-level tables or pipeline operations.
- Truthful failure handling — critical stage errors remain non-zero after diagnostic artifacts are uploaded.
- Operational run ledger —
pipeline_runsrecords workflow identity, timestamps, stage state, link counts, errors, and Gold refresh status. - Reproducible dependencies — direct runtime libraries are pinned; the
legacy, unused
webdriver-managerdependency has been removed.
| Area | Tools |
|---|---|
| Acquisition | Selenium, undetected-chromedriver, Beautiful Soup |
| Transformations | Python modules for Bronze, Silver, and Gold |
| Storage and API | Supabase, PostgreSQL, PostgREST |
| Orchestration | GitHub Actions |
| Runtime | Python 3.11 |
| Tests | pytest regression suite and Ruff |
| Consumer | Imobil.Index with Streamlit and Plotly |
Python 3.11 remains the production runtime because
undetected-chromedriver 3.5.5 still imports the removed standard-library
distutils module and does not run in a clean Python 3.12+ environment. The
upgrade to Python 3.14 will follow only after the browser layer has a tested
compatibility path.
999.md listing pages
|
v
raw_links one row per discovered URL
|
v
bronze_estate parsed source-shaped fields and JSON
|
v
silver_estate typed and normalized listing fields
|
v
Gold datasets private aggregates and daily snapshots
|
v
api_* tables public read-only aggregated contract
|
v
Imobil.Index Streamlit dashboard
The pipeline is intentionally append-only at acquisition time: it processes new listing URLs but does not revisit every known listing to track later price changes or removals. It therefore does not claim listing-level price cuts, time-on-market, delistings, or exact current inventory.
See ARCHITECTURE.md for layer grains, system boundaries, and failure behavior.
Clone the repository and create a Python 3.11 environment:
git clone https://github.com/Revo69/real-estate-analytics-md.git
cd real-estate-analytics-md
py -3.11 -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txtOn systems without the Windows Python launcher, replace py -3.11 with the
path to a Python 3.11 executable.
Create a local .env file containing server-side credentials:
SUPABASE_URL=your-project-url
SUPABASE_KEY=your-server-side-keySUPABASE_KEY must be a server-side key capable of writing internal pipeline
tables. Never commit it, print it, or reuse it in the public Streamlit app.
Run the same entry points used by GitHub Actions from the repository root:
# Discover listing URLs from pages 1 through 30.
python -m pipeline.acquisition.links_loader --start 1 --end 30
# Process the next 500 pending URLs into Bronze.
python -m pipeline.bronze.loader --start 0 --end 500
# Rebuild/upsert the normalized Silver dataset.
python -m scripts.run_silver
# Refresh sales and rent Gold/API datasets through Supabase RPC functions.
python -m scripts.run_goldThe scheduled workflow repeats the 500-row Bronze command six times. Silver currently reads all Bronze rows and upserts the full normalized dataset; an incremental implementation is deferred until runtime or row-count evidence justifies the added complexity.
The main workflow is
pipeline.yml:
collect-links -> parse-bronze -> silver -> gold
It runs daily at 01:00 UTC on Python 3.11. Concurrent scheduled executions
wait instead of cancelling an active scraper. Link, Bronze, and Gold logs are
uploaded for seven days, and a final job sends a Telegram alert when a required
stage fails.
Operational checks, artifact names, run-state interpretation, and recovery boundaries are documented in the operations runbook.
Run the same deterministic checks used by the pull-request workflow:
python -m ruff check .
python -m compileall -q common pipeline scripts tests utils
python -m pytest -qThe Test pipeline logic workflow runs these checks on pushes to main, pull
requests, and manual dispatches using Python 3.11. It requires no Supabase or
Telegram secrets and does not open a browser.
- Acquisition does not track listing history, removals, or price changes.
- Silver currently reprocesses the complete Bronze dataset.
- Bronze and Silver counters in
pipeline_runsare not populated yet. - Interrupted historical workflows can leave stale
runningrecords. - The current Silver quality score still checks a legacy
regionkey instead of the emitted address fields, so transformed records currently top out at0.875until that data-semantics correction is reviewed. - Python 3.12+ is blocked by the current browser dependency until a tested
compatibility strategy replaces the
distutilsimport.
The prioritized implementation sequence and verification evidence live in PROGRESS.md.
- Architecture
- Progress and implementation plan
- Operations runbook
- Public API v1 contract
- Documentation index
Serghei Matenco
© 2026 Real Estate Analytics MD