# sibinsilva/marketline architecture

> Architecture diagram of the GitHub repository sibinsilva/marketline, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sibinsilva/marketline
- Repository: https://github.com/sibinsilva/marketline

## Overview

MarketLine turns Ireland’s Residential Property Price Register into a self-contained dashboard for exploring national and county price trends, map data, and individual-sale address search. Its documented workflow prepares aggregate statistics, simplified county geometry, and a compressed address index, then embeds those datasets into the dashboard template for browser-side use. The scripts and README establish the data-preparation and assembly relationships; the dashboard template itself was not sampled, so its internal behavior is represented only as documented capabilities.

Main entry points: [`scripts/build_dashboard.py`](https://github.com/sibinsilva/marketline/blob/master/scripts/build_dashboard.py) (Dashboard assembly), [`dashboard/template.html`](https://github.com/sibinsilva/marketline/blob/master/dashboard/template.html) (Self-contained dashboard), [`scripts/build_address_index.py`](https://github.com/sibinsilva/marketline/blob/master/scripts/build_address_index.py) (Address index encoding), [`scripts/aggregate.py`](https://github.com/sibinsilva/marketline/blob/master/scripts/aggregate.py) (Price aggregation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prep["Data preparation"]
  node_aggregate["Price aggregation<br/>[aggregate.py]"]
  node_aggregate_data["Price aggregates"]
  node_geometry_build["County geometry processing"]
  node_geometry_data["County map geometry<br/>[counties_geo.json]"]
  node_address_build["Address index encoding"]
  node_address_data["Compressed sale index"]
  node_address_meta["Address index metadata"]
end

subgraph group_assembly["Dashboard assembly"]
  node_template["Dashboard template<br/>[template.html]"]
  node_assemble["Dashboard assembly<br/>[build_dashboard.py]"]
end

subgraph group_experience["Browser experience"]
  node_dashboard["Self-contained dashboard<br/>[template.html]"]
  node_charts["Price charts<br/>[template.html]"]
  node_map["County map<br/>[template.html]"]
  node_search["Address search<br/>[template.html]"]
end

subgraph group_sources["Data sources"]
  node_psra[("PSRA sale register")]
  node_boundaries[("Official county boundaries")]
end

node_viewer(("Dashboard visitor"))

node_psra -->|"provides CSV"| node_aggregate
node_aggregate -->|"writes aggregates"| node_aggregate_data
node_boundaries -->|"provides GeoJSON"| node_geometry_build
node_geometry_build -->|"writes geometry"| node_geometry_data
node_psra -->|"provides CSV"| node_address_build
node_address_build -->|"writes index"| node_address_data
node_address_build -->|"writes metadata"| node_address_meta
node_aggregate_data -->|"reads data"| node_assemble
node_geometry_data -->|"reads data"| node_assemble
node_address_data -->|"reads data"| node_assemble
node_address_meta -->|"reads metadata"| node_assemble
node_template -->|"fills placeholders"| node_assemble
node_assemble -->|"produces page"| node_dashboard
node_viewer -->|"views"| node_dashboard
node_dashboard -->|"presents trends"| node_charts
node_dashboard -->|"presents counties"| node_map
node_dashboard -->|"offers search"| node_search

click node_boundaries "https://github.com/sibinsilva/marketline/blob/master/data/raw/counties_official.geojson"
click node_aggregate "https://github.com/sibinsilva/marketline/blob/master/scripts/aggregate.py"
click node_geometry_build "https://github.com/sibinsilva/marketline/blob/master/scripts/build_counties_geo.py"
click node_geometry_data "https://github.com/sibinsilva/marketline/blob/master/data/processed/counties_geo.json"
click node_address_build "https://github.com/sibinsilva/marketline/blob/master/scripts/build_address_index.py"
click node_template "https://github.com/sibinsilva/marketline/blob/master/dashboard/template.html"
click node_assemble "https://github.com/sibinsilva/marketline/blob/master/scripts/build_dashboard.py"
click node_dashboard "https://github.com/sibinsilva/marketline/blob/master/dashboard/template.html"
click node_charts "https://github.com/sibinsilva/marketline/blob/master/dashboard/template.html"
click node_map "https://github.com/sibinsilva/marketline/blob/master/dashboard/template.html"
click node_search "https://github.com/sibinsilva/marketline/blob/master/dashboard/template.html"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_aggregate,node_aggregate_data,node_geometry_build,node_geometry_data,node_address_build,node_address_data,node_address_meta toneBlue
class node_template,node_assemble toneAmber
class node_dashboard,node_charts,node_map,node_search toneMint
class node_psra,node_boundaries toneRose
class node_viewer toneIndigo
```

## Components

### Data preparation

- [Price aggregation](https://github.com/sibinsilva/marketline/blob/master/scripts/aggregate.py): `scripts/aggregate.py`
- **Price aggregates**
- [County geometry processing](https://github.com/sibinsilva/marketline/blob/master/scripts/build_counties_geo.py): `scripts/build_counties_geo.py`
- [County map geometry](https://github.com/sibinsilva/marketline/blob/master/data/processed/counties_geo.json): `data/processed/counties_geo.json`
- [Address index encoding](https://github.com/sibinsilva/marketline/blob/master/scripts/build_address_index.py): `scripts/build_address_index.py`
- **Compressed sale index**
- **Address index metadata**

### Dashboard assembly

- [Dashboard template](https://github.com/sibinsilva/marketline/blob/master/dashboard/template.html): `dashboard/template.html`
- [Dashboard assembly](https://github.com/sibinsilva/marketline/blob/master/scripts/build_dashboard.py): `scripts/build_dashboard.py`

### Browser experience

- [Self-contained dashboard](https://github.com/sibinsilva/marketline/blob/master/dashboard/template.html): `dashboard/template.html`
- [Price charts](https://github.com/sibinsilva/marketline/blob/master/dashboard/template.html): `dashboard/template.html`
- [County map](https://github.com/sibinsilva/marketline/blob/master/dashboard/template.html): `dashboard/template.html`
- [Address search](https://github.com/sibinsilva/marketline/blob/master/dashboard/template.html): `dashboard/template.html`

### Data sources

- **PSRA sale register**
- [Official county boundaries](https://github.com/sibinsilva/marketline/blob/master/data/raw/counties_official.geojson): `data/raw/counties_official.geojson`

### Other components

- **Dashboard visitor**

## Connections

- PSRA sale register → Price aggregation: provides CSV (evidence: `README.md`)
- Price aggregation → Price aggregates: writes aggregates (evidence: `scripts/aggregate.py`)
- Official county boundaries → County geometry processing: provides GeoJSON (evidence: `scripts/build_counties_geo.py`)
- County geometry processing → County map geometry: writes geometry (evidence: `scripts/build_counties_geo.py`)
- PSRA sale register → Address index encoding: provides CSV (evidence: `README.md`)
- Address index encoding → Compressed sale index: writes index (evidence: `scripts/build_address_index.py`)
- Address index encoding → Address index metadata: writes metadata (evidence: `scripts/build_address_index.py`)
- Price aggregates → Dashboard assembly: reads data (evidence: `scripts/build_dashboard.py`)
- County map geometry → Dashboard assembly: reads data (evidence: `scripts/build_dashboard.py`)
- Compressed sale index → Dashboard assembly: reads data (evidence: `scripts/build_dashboard.py`)
- Address index metadata → Dashboard assembly: reads metadata (evidence: `scripts/build_dashboard.py`)
- Dashboard template → Dashboard assembly: fills placeholders (evidence: `scripts/build_dashboard.py`)
- Dashboard assembly → Self-contained dashboard: produces page (evidence: `scripts/build_dashboard.py`)
- Dashboard visitor → Self-contained dashboard: views (evidence: `README.md`)
- Self-contained dashboard → Price charts: presents trends (evidence: `README.md`)
- Self-contained dashboard → County map: presents counties (evidence: `README.md`)
- Self-contained dashboard → Address search: offers search (evidence: `README.md`)
