aegean.geo¶
geo ¶
Geographic analysis of a corpus's find-sites — the [geo] extra (geopandas + shapely).
Maps each inscription's find-site to coordinates from a bundled gazetteer and exposes the corpus as
a GeoDataFrame for spatial analysis and plotting. The gazetteer covers the Aegean scripts' find-sites
and the openly-licensed Greek-epigraphy corpora's ancient find-places (I.Sicily, IIP, IOSPE, IGCyr,
EDH). The coordinates are approximate (site-level, ~1 km); for the epigraphy find-places they are
the site's Pleiades representative point, verified against the corpus's own coordinate where it
carries one. Where a site aligns to a Pleiades place, its stable id travels with it
(SiteCoord.pleiades / pleiades_uri) for linked-open-data work — the major sites are aligned,
minor findspots/peak sanctuaries mostly are not. Find-site labels are matched with their internal
whitespace collapsed, so a corpus label split across lines ("Beth\n Shearim") still resolves.
Sites not in the gazetteer are dropped; see site_coordinates for coverage.
A few entries are flagged contested (Margiana): present because the upstream corpus carries them
but not accepted as Linear A find-spots. The flag (SiteCoord.contested / is_contested, and a
contested column on the GeoDataFrames) travels with the site so it is never silently mapped as a
genuine provenance.
geopandas/shapely are imported lazily, so import aegean stays instant and dependency-free; the
geo functions raise a clear error if the extra isn't installed.
SiteCoord
dataclass
¶
SiteCoord(name: str, lat: float, lon: float, region: str, pleiades: int | None = None, contested: str | None = None)
Approximate site-level coordinates for a find-site (WGS84 / EPSG:4326).
site_coordinates ¶
site_coordinates() -> dict[str, SiteCoord]
The bundled site→coordinate gazetteer, keyed by the corpus's meta.site label.
to_geodataframe ¶
to_geodataframe(corpus: Corpus, *, level: str = 'inscription')
A geopandas GeoDataFrame of the corpus's find-sites (EPSG:4326 point geometry).
level="inscription" gives one row per inscription whose site is in the gazetteer (id, site,
label, region, period, geometry); level="site" gives one row per gazetteer site with its
inscription count, keyed on the canonical gazetteer label so whitespace/line-split variants of a
find-place collapse to one row (its counts summed). Inscriptions whose site isn't mapped are
dropped; a corpus with no mapped sites yields an empty GeoDataFrame with the same columns and
crs. Needs the [geo] extra.
word_distribution ¶
word_distribution(corpus: Corpus, word: str)
A GeoDataFrame of the find-sites where word is attested, with per-site counts — i.e.
where a given word shows up across the corpus, ready to map. Matching is case-insensitive
(ku-ro finds KU-RO). Counts are keyed on the canonical gazetteer label, so a find-place
written two ways (line-split or extra spaces) contributes to one row, not several. A word
attested at no mapped site yields an empty GeoDataFrame with the same columns and crs. Needs the
[geo] extra.