1# Scheduled city snapshots23A city's `.atlas` can build itself on a schedule: crawl the city's ArcGIS4hub, exit quietly when nothing changed, and publish a new versioned bundle5when something did.6The reusable workflow lives in this repository7(`.github/workflows/snapshot.yml`); this repository's own scheduler runs it8weekly over the public proof cities. A city IT team runs the same workflow9in a repository of their own, so every employee works off the same enriched10`.atlas` at whatever cadence the team chooses.1112## What a run does13141. Crawls the city into the `fmg-archive` committed on the state branch.15 Captures are content-addressed: an unchanged city registers nothing.16 Beside the city's own hub, every crawl queries the USGS national17 hydrography services on `hydro.nationalmap.gov` for the city's window —18 watersheds, subwatersheds, named streams, waterbodies — so a runner19 with an egress allowlist needs that host beside the hub's.202. Composes the bundle. Its filename embeds the capture day and a content21 stamp over everything inside.223. Gates: if that exact filename is already a release asset, the run ends —23 "unchanged". The gate catches data changes, tool changes, and policy24 revisions alike, because the stamp covers them all.254. Otherwise commits the archive delta (durable, diffable history at any26 cadence — weekly, monthly, quarterly) and uploads the bundle to the27 rolling `snapshot-<city>` release. Every published version stays as an28 asset; `<city>-latest.atlas` always names the newest, so one URL serves29 the whole team.3031## Setting it up in your own repository3233One-time, in a (typically private) repository:3435```sh36git switch --orphan snapshots37# your city's curation, if it is not one of the public proof cities:38cp /path/to/cities_local.go .39git add -A && git commit -m "snapshot state"40git push -u origin snapshots41git switch main42```4344Then a workflow:4546```yaml47name: City snapshot48on:49 schedule:50 - cron: "0 6 * * 1" # weekly; monthly/quarterly are equally safe51 workflow_dispatch:52permissions:53 contents: write54jobs:55 snapshot:56 uses: FelineStateMachine/atlas/.github/workflows/snapshot.yml@main57 with:58 city: your-city-slug59```6061The `cities_local.go` on the state branch is adopted into the build, so a62private city's curation never has to be published. Employees fetch63`https://github.com/<org>/<repo>/releases/download/snapshot-<city>/<city>-latest.atlas`64and drop it into their Atlas bundles directory — or IT mirrors it onto a65share the app watches.