Add all local circuit work — year-by-year SVGs and tooling

This commit is contained in:
2026-03-25 22:17:47 +01:00
parent 6ceeba7fb9
commit c94ebcfb22
1149 changed files with 171650 additions and 421 deletions
+24
View File
@@ -0,0 +1,24 @@
from dataclasses import dataclass
from .locality import Locality
@dataclass
class Country:
slug: str
name: str
localities: dict[str, Locality]
@classmethod
def from_dict(cls, slug: str, data: dict):
country = cls(
slug=slug,
name=data["name"],
localities={}
)
country.localities = {locality_slug: Locality.from_dict(country, locality_slug, locality_data) for
locality_slug, locality_data in data["localities"].items()}
return country
def load_geo_json_data(self):
"""Load data for all cities"""
for locality in self.localities.values():
locality.load_geo_json_data()