mostlyright-data 0.31.26__tar.gz → 0.31.27__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/PKG-INFO +1 -1
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/SKILL.md +1 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/commands.md +1 -1
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/enriching-with-small-models.md +14 -1
- mostlyright_data-0.31.27/skills/mr-data-build/references/satellite-signals.md +486 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/sources.md +2 -1
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/enrichment.py +65 -7
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/vocabulary.py +3 -3
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/.gitignore +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/README.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/pyproject.toml +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/scripts/hatch_build.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/agents/openai.yaml +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/1-open-the-page-and-the-link-to-it-in-the-first-message.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/2-brief-two-to-four-questions-each-with-a-recommended-answer.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/3-probe-read-a-source-before-committing-to-it.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/4-decide-say-what-you-chose-what-you-refused-and-ask-one-question.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/5-draft-one-recipe-document-one-call.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/6-build-one-run-sized-to-acquire-every-measured-source-whole.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/7-interrogate-ask-the-run-what-it-actually-delivered.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/8-fix-revise-the-document-and-register-it-again.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/9-present-only-what-survived-inspection-with-caveats.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/agent-protocol.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/autonomous-delivery.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/before-the-first-tool-call.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/boundaries.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/cloud-authentication-preflight.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/live-run.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/making-a-table-incremental.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/narrating-the-run.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/not-hosted-yet.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/one-install.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/patterns.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/prediction-labels.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/preparing-table-search.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/promote.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/readers.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/receipts.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/recipe-test.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/recording-a-stream-venue.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/recovering-an-import-failure.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/reference-pages.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/required-protocol.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/source-credentials.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/the-one-thing-to-say-about-the-skill-itself.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/transforms.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/user-communication-contract.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/writing-a-decision-record.md +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/scripts/write_research_notebook.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/__init__.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/agent_protocol.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/canonical.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/key_seam.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/page_coverage.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/part_check_evidence.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/session_probes.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/skill_assets.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/table_manifest.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/__init__.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/activity.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/backoff.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/categories.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/dataset-categories-v1.json +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/dataset_layout.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/delivery.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/description_shape.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/download.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/fast_features.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/matching_benchmark.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/probe.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/progress_rate.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/progress_vocabulary.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/recipe.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/recipe_brief.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/recipe_explain.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/recipe_forecast.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/recipe_lint.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/recipe_test.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/refresh_rehearsal.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/release_check.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/research.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/router.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/run_diagnose.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/run_prefix.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/runs.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/session.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/stream.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/stream_venue.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/studio_capabilities.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/support.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/table_search_contract.json +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/table_view.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/transport.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/user_agent.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/v4.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/v4_artifacts.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/v4_catalog.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/v4_connected.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/v4_connections.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/v4_dataset_covers.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/v4_datasets.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/v4_handoff.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/v4_matching.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/v4_narrative.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/v4_public.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/v4_query.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/v4_reader.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/v4_runs.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/v4_search.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/v4_search_contract.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/v4_secrets.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/v4_stream.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/thin/v4_tables.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/ux/__init__.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/ux/attendance.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/ux/clarification.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/ux/cloud_auth.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/ux/commands/__init__.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/ux/commands/auth.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/ux/commands/clarify.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/ux/commands/login.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/ux/commands/whoami.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/ux/credential_native.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/ux/credential_store.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/ux/credentials.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/ux/login.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/ux/path_kind.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/ux/plain_file.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/ux/remediation.py +0 -0
- {mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/src/mostlyright/data_harness/ux/render.py +0 -0
|
@@ -354,6 +354,7 @@ chat, and pass on its answer.
|
|
|
354
354
|
| Connector or collection | [Sources](references/sources.md) |
|
|
355
355
|
| One request per row of another source, such as a decision model scoring each row | [Per-row requests](references/sources.md#authoring-a-per-row-request) |
|
|
356
356
|
| Which small models this deployment serves, the rule-first ladder, and classify and extract sources | [Enriching with small models](references/enriching-with-small-models.md) |
|
|
357
|
+
| Activity at named places from satellite images: parking, oil storage, construction, plant heat, ships, trucks, water | [Satellite signals](references/satellite-signals.md) |
|
|
357
358
|
| SQL and joins | [Transforms](references/transforms.md) |
|
|
358
359
|
| Source credentials | [Credentials](references/source-credentials.md) |
|
|
359
360
|
| Live stream recording | [Streams](references/recording-a-stream-venue.md) |
|
{mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/commands.md
RENAMED
|
@@ -41,7 +41,7 @@ run in full.
|
|
|
41
41
|
| `mr-data parts` | List one table version's parts — the identifier, the row count, the byte size and the recorded bounds of each — so a training loader can shard them across workers and read a table no single file should hold. `--version` names a version rather than the live one, and `--from`/`--to` keep only the parts a value range cannot rule out. Nothing is downloaded by listing them; the pattern is under [Reading a table that is made of parts](7-interrogate-ask-the-run-what-it-actually-delivered.md#reading-a-table-that-is-made-of-parts). |
|
|
42
42
|
| `mr-data diff` | Compare two runs and say what changed. |
|
|
43
43
|
| `mr-data connections` | List saved workspace connections and their current recipe coordinates; `--dataset ID` filters to connections granted to that dataset. No credential values are returned. |
|
|
44
|
-
| `mr-data models` | List the small models a recipe can call on this deployment: each task (classify, extract, match), whether it is served, and each binding's route, pinned model, rate, today's usage and a request body to start from. `models suggest RUN_ID` reads the preview one run sealed and names, column by column, a deterministic derivation or a model call that would improve the table, with whether its model is served. Both read only and spend no model call. [Enriching with small models](enriching-with-small-models.md) says what to do with the answer. |
|
|
44
|
+
| `mr-data models` | List the small models a recipe can call on this deployment: each task (classify, extract, match, and `observe` for satellite signals), whether it is served, and each binding's route, pinned model, rate, today's usage and a request body to start from. `models suggest RUN_ID` reads the preview one run sealed and names, column by column, a deterministic derivation or a model call that would improve the table, with whether its model is served. Both read only and spend no model call. [Enriching with small models](enriching-with-small-models.md) says what to do with the answer. |
|
|
45
45
|
| `mr-data keys` | Enrol a source credential by name, list the names with their created and rotated times, and delete one. `keys set` reads the value from a file or from standard input and never from the command line; no command prints a value back. |
|
|
46
46
|
| `mr-data stream` | Record a public `wss://` venue so a build can read it. `stream document register --file F` admits the connector document, `stream registry create --digest D` admits a set of them, `stream probe` listens briefly and seals nothing, `stream capture --seconds N` records a bounded window, and `stream subscribe` keeps recording. `stream subscription {show|pause|resume|stop} ID` retains the legacy full-record interface. `stream subscription quiescence ID` reads the bounded server-computed proof; `pause-cas` and `resume-cas` read its ETag and make one conditional bounded write. An ambiguous CAS failure is not retried until a fresh invocation observes the resource again. `stream status ID` reads a capture or probe, and `stream recordings --document-digest D` names what a build could read and until when. `--seconds` is at most 600. `mr-data run` takes no duration: a build reads sealed batches and is bounded by them. |
|
|
47
47
|
| `mr-data open` | Mint a single-use, short-lived address that continues this session in a browser at one dashboard path, and print it. `--open` hands it to the platform opener. The credential decides who mints: a device credential — what `mr-data login` stores — mints at Cloud, and a personal access token mints at the server. |
|
|
@@ -7,7 +7,7 @@ could be better while you probe, say what you found, and recommend what to add.
|
|
|
7
7
|
|
|
8
8
|
### What this deployment serves
|
|
9
9
|
|
|
10
|
-
Run `mr-data models --json` once per session, before the brief message. It lists
|
|
10
|
+
Run `mr-data models --json` once per session, before the brief message. It lists four tasks and
|
|
11
11
|
whether each is served here, read from the server's platform credential listing.
|
|
12
12
|
|
|
13
13
|
| Task | What it does | Binding |
|
|
@@ -15,6 +15,7 @@ whether each is served here, read from the server's platform credential listing.
|
|
|
15
15
|
| classify | Labels each row from a text column with yes/no or choice questions: a topic, a category, a sentiment, a flag no keyword rule decides. Each answer carries a probability per label. | `gemini-decisions` (Mostly Right Classify: Gemini Decision 1) first; `classify` (Clef, self-hosted) and `openrouter-decisions` (TypeSafe's Jev) answer the same questions |
|
|
16
16
|
| extract | Pulls named fields (names, amounts, dates, places) out of page or document text into columns. Every value appears verbatim in the input or is dropped. | `extract` (the extraction model, NuExtract-based) |
|
|
17
17
|
| match | Links the same entity across tables or within one. | none yet: `planned` |
|
|
18
|
+
| observe | Measures activity at a place from satellite images, one series per place: parking, oil storage, construction, stored vehicles, plant heat, truck traffic, water area, ships, crop health, snow cover. | `sat` ([writing a sat source](#writing-a-sat-source)) |
|
|
18
19
|
|
|
19
20
|
Each served binding comes with its route, its pinned `model`, its rate, today's usage and quota,
|
|
20
21
|
and a `request_template`. Copy `origin`, `method`, `path_template` and `model` from the listing
|
|
@@ -184,6 +185,18 @@ many extracted records, so do not declare page identity alone as a unique contra
|
|
|
184
185
|
Each answer is grounded: every value appears verbatim in the input, and `spans` say where. A row
|
|
185
186
|
whose text states none of the fields returns no record, which is an answer, not a failure.
|
|
186
187
|
|
|
188
|
+
### Writing a sat source
|
|
189
|
+
|
|
190
|
+
A `sat` source takes a place, not a text column. Its upstream is a `closed: true` list of
|
|
191
|
+
places with `lat` and `lon` columns, and the listing's `request_template` sends one request per
|
|
192
|
+
place with a fixed `from` and no `to`. Copy its `pages_template` too: 120 second timeout, 3
|
|
193
|
+
retries and a six-day freshness bound, under a table-level `rebuild` with
|
|
194
|
+
`min_interval_seconds` 604,800, so a weekly rebuild asks each place again. Read the answer's
|
|
195
|
+
`rows` with `json.tabular` 1.1.0, all 13 members required. A place it cannot measure is one
|
|
196
|
+
row whose `status` names why; filter `status = 'ok'` in the transform when the table should
|
|
197
|
+
hold measurements only. [Satellite signals](satellite-signals.md) has the signals, the
|
|
198
|
+
worked recipe, the refusal codes and what never to promise.
|
|
199
|
+
|
|
187
200
|
### Saying it
|
|
188
201
|
|
|
189
202
|
Name the model by what it does, not by its binding: "a small classification model reads each
|
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
## Satellite signals
|
|
2
|
+
|
|
3
|
+
The `sat` binding turns free satellite images (Sentinel-1 radar, Sentinel-2 optical, NASA MODIS)
|
|
4
|
+
into table rows. A recipe sends it one place per upstream row, a point is enough, with one signal
|
|
5
|
+
name, and gets back a flat series for that place: one row per month, week, pass or composite.
|
|
6
|
+
|
|
7
|
+
Use it when the person wants activity at named places over time: how full a mall's parking lots
|
|
8
|
+
are, whether a tank farm is filling, whether a plant is running, how many ships wait off a port. It
|
|
9
|
+
is a per-row request, written like the small models in
|
|
10
|
+
[enriching with small models](enriching-with-small-models.md), and the general rules are in
|
|
11
|
+
[authoring a per-row request](sources.md#authoring-a-per-row-request).
|
|
12
|
+
|
|
13
|
+
### Check it is served
|
|
14
|
+
|
|
15
|
+
Run `mr-data models --json` once per session. Read the task `observe`:
|
|
16
|
+
|
|
17
|
+
- `available`: its binding (named `sat`) carries `origin`, `path` (`/v1/observe`), the pinned
|
|
18
|
+
`model` (`mostlyright-sat/sat-v...`), a `request_template` and a `pages_template`. Start from
|
|
19
|
+
both templates and copy the origin, path and model exactly. The origin is this deployment's own
|
|
20
|
+
service address, which no one can guess, and a guessed origin or pin is refused at registration
|
|
21
|
+
with `PLATFORM_CREDENTIAL_UNBOUND`. The `request_template` carries `["id"]`: the upstream table
|
|
22
|
+
must have every column named in `carry_columns`, or the run is refused, so change it to columns
|
|
23
|
+
the upstream has, and carry `lat` and `lon` too when the table should show them.
|
|
24
|
+
- `not_served`: this deployment does not serve satellite signals. Say so, offer it as coming, and
|
|
25
|
+
never write it into a recipe.
|
|
26
|
+
- `unknown`: the listing could not be read. Ask again before saying anything.
|
|
27
|
+
- A `sat` binding with no `model`, so its `request_template` is null: treat it as not served and
|
|
28
|
+
tell the person.
|
|
29
|
+
- No `observe` task at all: the client is older than this page. Upgrade `mr-data` and ask again.
|
|
30
|
+
|
|
31
|
+
The person enrols no key and pays nothing for these calls. They count against the workspace's daily
|
|
32
|
+
quota, which `mr-data recipe forecast` reports.
|
|
33
|
+
|
|
34
|
+
### The signals
|
|
35
|
+
|
|
36
|
+
The signals answer for most of the world's land. The free radar archive has regional gaps (parts of Siberia, Mongolia and central Africa, and fewer passes in many regions after December 2021); a place with no usable imagery answers one status row saying so.
|
|
37
|
+
|
|
38
|
+
| `signal` | What it measures | Sensor | Natural cadence | What `value` means | Smallest site |
|
|
39
|
+
| --- | --- | --- | --- | --- | --- |
|
|
40
|
+
| `parking` | how full open-air parking lots are | Sentinel-1 radar, evening passes | month | lot brightness against the ground around it, dB; higher is fuller | 0.02 km2 |
|
|
41
|
+
| `oil_storage` | how full a tank farm's floating-roof tanks are | Sentinel-1 radar | month (or quarter; nothing finer) | tank farm brightness against the ground around it, dB; lower is fuller | 0.02 km2 |
|
|
42
|
+
| `site_change` | whether something is being built | Sentinel-1 radar | month | brightness against open land around it, dB; rises with new buildings | 0.02 km2 |
|
|
43
|
+
| `stored_vehicles` | vehicles piling up on open ground | Sentinel-1 radar, every pass | month | brightness of a circle against a ring around it, dB | 0.02 km2 |
|
|
44
|
+
| `plant_heat` | whether a hot industrial plant is running | Sentinel-2 shortwave infrared | month | median hot pixels per clear image | 1 km2 |
|
|
45
|
+
| `truck_traffic` | trucks and buses moving on a motorway stretch | Sentinel-2 optical | month | median moving trucks per clear image | 0.1 km2 (4 km of road) |
|
|
46
|
+
| `water_area` | lake or reservoir surface | Sentinel-2 optical | month | median water area, km2 | 0.05 km2 |
|
|
47
|
+
| `ships` | large ships at a port, anchorage or strait | Sentinel-1 radar and a ship detector | pass | ships at least 150 m long per pass | none |
|
|
48
|
+
| `crop_health` | greenness of cropland against the same time of year in earlier years | MODIS, 16-day composites, 250 m | pass (one composite) | mean NDVI, 0 to 1 | 5.4 km2 of cropland |
|
|
49
|
+
| `snow_cover` | share of the land under snow against the same time of year in earlier years | MODIS, 8-day maps, 500 m | pass (one map) | percent of the land under snow | 21.5 km2 of land |
|
|
50
|
+
|
|
51
|
+
`every` takes `pass`, `week`, `month` or `quarter` (`oil_storage`: `month` or `quarter`). The radar
|
|
52
|
+
land signals were validated at `month` only; the other cadences are served but untested. A `from`
|
|
53
|
+
may go back to 2014-10-10 for radar and to 2000-02-18 for MODIS.
|
|
54
|
+
|
|
55
|
+
What each was checked against, so you can say how far to trust it:
|
|
56
|
+
|
|
57
|
+
- `parking`: 22 of 22 large US malls had emptier lots in the spring 2020 lockdown than in the same
|
|
58
|
+
weeks of 2019 and 2021.
|
|
59
|
+
- `oil_storage`: Cushing, Oklahoma, against EIA crude stocks: monthly correlation -0.90; fitted on
|
|
60
|
+
2017-2020 and tested on 2021-2024, 0.85 with a mean error of 4.6 million barrels and the
|
|
61
|
+
month-to-month direction right 68-77% of the time. Week to week it does not track stocks.
|
|
62
|
+
- `site_change`: about a quarter of new solar farms (15 of 60), at about 4% false alarms (5 of 118
|
|
63
|
+
unchanged sites). Far stronger for large buildings: TSMC Arizona rose 12 dB and was flagged
|
|
64
|
+
within a month of its known construction start.
|
|
65
|
+
- `stored_vehicles`: one site, Kentucky Speedway, flagged when a car maker began storing unfinished
|
|
66
|
+
trucks there in 2021.
|
|
67
|
+
- `plant_heat`: Mariupol's steel works when they stopped in 2022: Azovstal 86 hot pixels per clear
|
|
68
|
+
image to 4, Ilyich 73 to 3.
|
|
69
|
+
- `truck_traffic`: the A2 near Hannover, 205 trucks per weekday image against 38 on Sundays.
|
|
70
|
+
- `water_area`: Medina Lake, Texas, correlation 0.975 with the USGS lake gauge.
|
|
71
|
+
- `ships`: the 2021 Los Angeles and Long Beach backlog was reproduced, and two independent
|
|
72
|
+
detectors agreed on stopped cargo ships over 150 m with correlation 0.97.
|
|
73
|
+
- `crop_health`: mid-July to late-August greenness against state corn yield deviation, 2001-2023,
|
|
74
|
+
correlation 0.80 in Iowa and 0.85 in Illinois. Soybeans weak (0.52 and 0.17), Kansas wheat 0.58.
|
|
75
|
+
- `snow_cover`: late-April snow share in the central Sierra Nevada ranked 2001-2025 against 1 May
|
|
76
|
+
snow water at 16 SNOTEL stations with rank correlation 0.83.
|
|
77
|
+
|
|
78
|
+
### From what the person wants to a signal
|
|
79
|
+
|
|
80
|
+
- Store or mall traffic, footfall, retail demand: `parking`.
|
|
81
|
+
- Crude or fuel inventories at a terminal: `oil_storage`.
|
|
82
|
+
- Is a factory, warehouse, data centre or solar farm being built: `site_change`.
|
|
83
|
+
- Is a plant (steel, coke, cement kiln, refinery flare) running: `plant_heat`.
|
|
84
|
+
- Port congestion, ships at anchor, traffic through a strait: `ships`.
|
|
85
|
+
- Freight activity on a highway: `truck_traffic`.
|
|
86
|
+
- Reservoir or lake level, drought: `water_area`.
|
|
87
|
+
- New or unfinished vehicles piling up at a factory, port or lot: `stored_vehicles`.
|
|
88
|
+
- Crop condition in a growing region, for crop markets: `crop_health`.
|
|
89
|
+
- Snowpack and spring melt in a mountain basin: `snow_cover`.
|
|
90
|
+
|
|
91
|
+
Anything else (car counts, aircraft, people, yields, snow depth) is not a signal here. Say so.
|
|
92
|
+
|
|
93
|
+
### The smallest request that works
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{"model": "mostlyright-sat/sat-v1-PIN", "signal": "parking", "lat": "{lat}", "lon": "{lon}"}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
That is the `body_template` of a per-row request whose upstream has `lat` and `lon` columns.
|
|
100
|
+
Every placeholder is sent as a JSON string, and the service reads numeric strings; declare the
|
|
101
|
+
parameters `"type": "number"` so a row whose cell is not a number sends nothing. The service
|
|
102
|
+
refuses a body member it does not read (`UNKNOWN_FIELD`). The others:
|
|
103
|
+
|
|
104
|
+
| Member | Default | When to set it |
|
|
105
|
+
| --- | --- | --- |
|
|
106
|
+
| `from` | three years before `to`, resolved the first time a place is asked and then kept for that place, so its start never slides; `ships` at a place the service does not track: 60 days before that first request | Always, as a literal date such as `"2023-01-01"`, so the table starts on a fixed day. |
|
|
107
|
+
| `to` | the latest image | Leave it out, so a refresh reaches the newest image. A range wholly in the past never changes. |
|
|
108
|
+
| `every` | the natural cadence | See the table above. |
|
|
109
|
+
| `radius_km` | per signal | Where nothing is mapped near the point, or to widen the search. Write it as a string, `"0.5"`: a recipe takes whole numbers only. Allowed: `snow_cover` 0.5 to 150, `crop_health` 0.5 to 100, `truck_traffic` 0.5 to 25, every other signal above 0 and at most 30. |
|
|
110
|
+
| `outline` | none | GeoJSON in lon/lat, from an upstream column, when the person has the exact boundary. It overrides the search. `truck_traffic` also takes a line along the road. |
|
|
111
|
+
| `detail` | none | `ships`: `"ships"` for one row per detected ship. `crop_health`: `"corn"`, `"soy"` or `"wheat"`, contiguous US only. `plant_heat`, `truck_traffic`, `water_area`: `"images"`. |
|
|
112
|
+
|
|
113
|
+
A point is enough. The service finds the mapped footprint near it (parking lots, tank farm,
|
|
114
|
+
industrial area, motorway, lake) and says on every row what it measured.
|
|
115
|
+
|
|
116
|
+
The live catalogue is the request `{"model": "mostlyright-sat/sat-v1-PIN", "signal": "signals"}`:
|
|
117
|
+
one row per signal with `signal`, `measures`, `sensor`, `natural_cadence`, `value_means`,
|
|
118
|
+
`smallest_site_km2`, `coverage`, `example_request` and `attribution` (the signal's credit lines
|
|
119
|
+
with `[YEARS]` left for you to fill). This page's table is enough
|
|
120
|
+
to choose a signal. To read the catalogue, mostly for its `attribution` lines, build a scratch
|
|
121
|
+
table: an upstream file of one row with a `signal` column holding `signals`; a per-row request
|
|
122
|
+
whose one parameter is `signal` (a request needs at least one, and no `lat` or `lon`) and whose
|
|
123
|
+
body is `{"model": "mostlyright-sat/sat-v1-PIN", "signal": "{signal}"}`; and a `json.tabular`
|
|
124
|
+
Reader on `/rows` with those nine columns. A scratch run that succeeds goes live, so never build it
|
|
125
|
+
on the person's table.
|
|
126
|
+
|
|
127
|
+
### What comes back
|
|
128
|
+
|
|
129
|
+
Every row has the same 13 members, in this order, with null for an empty value:
|
|
130
|
+
|
|
131
|
+
| Member | Meaning |
|
|
132
|
+
| --- | --- |
|
|
133
|
+
| `date` | first day of the period; for a refused place, the day it was refused |
|
|
134
|
+
| `value` | the reading, in `unit` |
|
|
135
|
+
| `unit` | `dB`, `hot pixels`, `trucks`, `km2`, `ships`, `NDVI` or `%` |
|
|
136
|
+
| `baseline` | the site's own reference level. Radar land signals (`parking`, `oil_storage`, `site_change`, `stored_vehicles`): the year of passes before `from`, read from the imagery but not rows of the table. `plant_heat`, `truck_traffic`, `water_area`: the first year of the table's own range, whose periods are never in alarm. `ships`: the median of the first 60 days of the place's history. MODIS signals: the same period in earlier years |
|
|
137
|
+
| `change` | `value` minus `baseline` |
|
|
138
|
+
| `z` | `change` in units of the site's own noise |
|
|
139
|
+
| `alarm` | true in periods inside a sustained change |
|
|
140
|
+
| `images` | how many images or passes the period is built from |
|
|
141
|
+
| `status` | `ok`, or the code naming why the place could not be measured |
|
|
142
|
+
| `note` | empty when ok; for a refusal, what went wrong and what to change, in one sentence |
|
|
143
|
+
| `site_source` | what was measured, such as `openstreetmap parking polygons`, `circle 0.5 km`, `caller outline` |
|
|
144
|
+
| `site_offset_km` | how far the measured footprint is from the point given |
|
|
145
|
+
| `site_area_km2` | the area measured |
|
|
146
|
+
|
|
147
|
+
Read them with `json.tabular` 1.1.0 and `records_pointer` `/rows`, all 13 `required: true`, so one
|
|
148
|
+
Reader pin serves every signal. A period with no usable image has no row. The answer's
|
|
149
|
+
`attribution`, `summary` and `limits` sit outside the rows; see
|
|
150
|
+
[what the dataset must carry](#what-the-dataset-must-carry). `ships` with `"detail": "ships"`
|
|
151
|
+
answers one row per ship, which is a different Reader pin and table: the 13 members above (`date`
|
|
152
|
+
is the pass's day), then the ship columns `lat`, `lon`, `length_m`, `speed_kn`, `type` and
|
|
153
|
+
`stopped`. A refusal row carries only the 13, so declare those six columns `required: false` in
|
|
154
|
+
that Reader.
|
|
155
|
+
|
|
156
|
+
### Refusals and what to do
|
|
157
|
+
|
|
158
|
+
A place the service cannot measure comes back as one row: `status` is the code, `note` says what
|
|
159
|
+
to change, `value` is null and `images` is 0. The place stays in the table, so read refusals from
|
|
160
|
+
it: after the scratch test and after every full, list the rows whose `status` is not `ok` and act on
|
|
161
|
+
each. Keep them in the table, or filter `status = 'ok'` in the transform when the table should hold
|
|
162
|
+
measurements only, and tell the person which places were left out and why.
|
|
163
|
+
|
|
164
|
+
A place whose `lat` or `lon` cell is empty or not a number is never sent, so it has no row at all,
|
|
165
|
+
not a refusal row. Compare the places in the table with the upstream list, or read the run's
|
|
166
|
+
coverage count of rows that sent nothing.
|
|
167
|
+
|
|
168
|
+
| `status` | What it means | What to do |
|
|
169
|
+
| --- | --- | --- |
|
|
170
|
+
| `UNKNOWN_SIGNAL` | the signal name is not in the catalogue | Fix the name. |
|
|
171
|
+
| `UNKNOWN_FIELD` | the body has a member the service does not read | Remove it. |
|
|
172
|
+
| `BAD_COORDINATES` | `lat` or `lon` is missing, not a number or out of range | Fix the cell; decimal degrees, latitude first. |
|
|
173
|
+
| `BAD_DATE_RANGE` | `from` or `to` is not an ISO date, out of order, in the future, or before the signal's imagery starts | Fix the date. |
|
|
174
|
+
| `BAD_EVERY` | `every` is not a cadence this signal offers | Use one the table lists. |
|
|
175
|
+
| `BAD_RADIUS` | `radius_km` is outside the signal's range | Use a value inside it: `snow_cover` 0.5 to 150, `crop_health` 0.5 to 100, `truck_traffic` 0.5 to 25, every other signal above 0 and at most 30. |
|
|
176
|
+
| `BAD_DETAIL` | `detail` is not one this signal offers | Use one the request table lists, or leave it out. |
|
|
177
|
+
| `OUTLINE_INVALID` | `outline` is not valid GeoJSON of a type the signal takes | Fix it, or send the point. |
|
|
178
|
+
| `AREA_TOO_LARGE`, `SITE_TOO_LARGE` | the footprint or water box is larger than the signal measures | Use a smaller `radius_km` or outline, one row per part. |
|
|
179
|
+
| `NO_FOOTPRINT_FOUND` | nothing of the signal's kind is mapped near the point | Move the point onto the site, send an `outline`, or set `radius_km` to measure a circle. |
|
|
180
|
+
| `SITE_TOO_SMALL` | the footprint is under the signal's smallest site | Tell the person the place is too small to measure. |
|
|
181
|
+
| `OUTSIDE_COVERAGE` | no imagery covers the place in the range | Tell the person; drop the place. |
|
|
182
|
+
| `NO_USABLE_IMAGES` | no image in the range covers the site well enough | Widen the range, or tell the person it is too cloudy here. |
|
|
183
|
+
| `NOT_WATER` | the place is not a water body the signal can measure | Move the point onto the water. |
|
|
184
|
+
| `NO_CROPLAND` | no cropland is mapped in the area | Move the point or widen `radius_km`. |
|
|
185
|
+
| `NO_LAND` | the area is open water | Move the point onto land. |
|
|
186
|
+
| `NO_HISTORY_YET` | a `ships` range ends before the place's history starts | Leave `to` out, or set `to` on or after the start the `note` names. |
|
|
187
|
+
|
|
188
|
+
Outside the rows, the service answers:
|
|
189
|
+
|
|
190
|
+
- 400 `WRONG_MODEL`: the pin is not this deployment's. Registration refuses it first
|
|
191
|
+
(`PLATFORM_CREDENTIAL_UNBOUND`), so copy the pin from the listing.
|
|
192
|
+
- 503: the service is starting (`STARTING`), a place asked for the first time is still being
|
|
193
|
+
fetched after about 100 seconds (`STILL_WORKING`), the instance is already computing more
|
|
194
|
+
first-time places in the background than it holds and did not start this one (`BACKLOG`), the
|
|
195
|
+
ship detector is starting (`DETECTOR_WAKING`), or an image archive, the map data or the ship
|
|
196
|
+
detector is not answering (`UPSTREAM_UNAVAILABLE`). The worker retries; work the service
|
|
197
|
+
finished is answered from its cache.
|
|
198
|
+
- 413 `TOO_LARGE`: the body is too large, almost always an `outline`. Send a simpler outline.
|
|
199
|
+
- 429 `BUSY`: the queue of requests waiting for an answer is full. The worker retries.
|
|
200
|
+
|
|
201
|
+
No answer of the service carries `Retry-After`.
|
|
202
|
+
|
|
203
|
+
A first build of many places is slow. First calls with an empty cache were measured at 9 to 80
|
|
204
|
+
seconds per place for the site signals and about 120 seconds for `ships`, which is past the
|
|
205
|
+
100-second hold, so a first `ships` request is answered 503 once and served on the retry. Ship
|
|
206
|
+
detection runs on one GPU instance, so a first build of N ports takes roughly N x 60 / 8 to
|
|
207
|
+
N x 60 seconds. A place still answered 503 after the worker's attempts fails the run with
|
|
208
|
+
`ROW_REQUEST_UNAVAILABLE`, so a large first build may need more than one run. Run it again: each
|
|
209
|
+
run gets further, because the service caches the work it finished. Tell the person before the
|
|
210
|
+
first full.
|
|
211
|
+
|
|
212
|
+
### How refresh works
|
|
213
|
+
|
|
214
|
+
A refresh needs four things, and the worked recipe below has all four:
|
|
215
|
+
|
|
216
|
+
1. The places source is `closed: true`. Changing the list of places is a new recipe revision.
|
|
217
|
+
2. The request fixes `from` and leaves `to` out, so each answer runs to the latest image.
|
|
218
|
+
3. The collection's answers carry a freshness bound of six days (518,400 seconds), so an answer
|
|
219
|
+
older than that is asked again. It is the `pages_template` the listing gives.
|
|
220
|
+
4. The table declares `rebuild` with `min_interval_seconds` 604,800, one week, so each weekly
|
|
221
|
+
rebuild finds every answer stale and asks each place again. The service reads its cached passes
|
|
222
|
+
and fetches only the newer ones.
|
|
223
|
+
|
|
224
|
+
`mr-data recipe explain` reports the places file as read whole and the table as not incrementally
|
|
225
|
+
refreshable; the `rebuild` is what schedules it, as
|
|
226
|
+
[rebuild](making-a-table-incremental.md#rebuild-the-fifth-continuation) says. After the first full,
|
|
227
|
+
`mr-data table show TABLE_ID --json` must say "rebuilds"; never report a held table as refreshing.
|
|
228
|
+
Without the freshness bound, a place keeps the series it was first built with.
|
|
229
|
+
|
|
230
|
+
The same recipe works for `ships`. At a place the service does not already track, history starts
|
|
231
|
+
at the later of `from` and 60 days before the first request for that place, the service keeps that
|
|
232
|
+
start, and every rebuild adds the passes since; a tracked place starts at `from`. The answer's
|
|
233
|
+
`coverage` says so: `requested_from`, `history_starts`, and `from`, the first pass actually used.
|
|
234
|
+
Tell the person a ships table at an untracked place begins about 60 days before it was first built,
|
|
235
|
+
not at `from`.
|
|
236
|
+
|
|
237
|
+
Each rebuild replaces every place's series with the service's current answer. After a rebuild,
|
|
238
|
+
check that no place that had a series now has only one status row.
|
|
239
|
+
|
|
240
|
+
### Limits, signal by signal
|
|
241
|
+
|
|
242
|
+
- `parking`: how full the lots are, not how many cars. Evening passes only (about 18:00 local).
|
|
243
|
+
Multi-storey, rooftop and underground parking are not seen. Rain, snow and Decembers read
|
|
244
|
+
brighter: compare a month with the same month of other years. The alarm flags falls only, and one
|
|
245
|
+
mall is noisier than the 22-mall index it was measured on.
|
|
246
|
+
- `oil_storage`: an index, not barrels; fit it against an official stock series to read volumes.
|
|
247
|
+
Floating-roof tanks only. Month or quarter only.
|
|
248
|
+
- `site_change`: rises only, so clearing and flattening are not flagged. Solar panels are a weak
|
|
249
|
+
target. Any change in the circle counts. The baseline is the year before `from`, so a change
|
|
250
|
+
already under way in that year is part of the baseline and is not flagged: set `from` after a
|
|
251
|
+
year that shows the site as it was.
|
|
252
|
+
- `stored_vehicles`: how much ground is covered, not how many vehicles; new buildings in the circle
|
|
253
|
+
raise it too. Validated on one site.
|
|
254
|
+
- `plant_heat`: only processes hot enough to glow in shortwave infrared (blast furnaces, coke,
|
|
255
|
+
kilns, flares). Counts pixels, not output. Cloudy months have no row; fires read as heat.
|
|
256
|
+
- `truck_traffic`: trucks and buses moving at road speed in one image at about 10:30 local, not
|
|
257
|
+
daily traffic. Sundays read low where trucks are banned; use `every: "pass"` to keep the weekday.
|
|
258
|
+
Compare a road with itself: the count grows with the stretch length.
|
|
259
|
+
- `water_area`: area, not volume or level. A refill over a vegetated lake bed reads low for weeks.
|
|
260
|
+
Frozen, snowy and cloudy periods have no row.
|
|
261
|
+
- `ships`: ships at least 150 m long on any stretch of water, one pass every 2-3 days over most
|
|
262
|
+
ports. Ships moored together are sometimes merged or missed. At a place the service does not
|
|
263
|
+
already track, history starts at the later of `from` and 60 days before the place was first
|
|
264
|
+
asked about, then grows with every rebuild; the range is never refused for its length. A range
|
|
265
|
+
that ends before that start returns the status row `NO_HISTORY_YET`.
|
|
266
|
+
- `crop_health`: greenness, never a yield number. Strongest for corn, weak for soybeans. Cloudy or
|
|
267
|
+
snowy composites read low. Some composites are missing from the archive, notably in 2025, and
|
|
268
|
+
those periods have no row.
|
|
269
|
+
- `snow_cover`: snow extent, not depth or water content. It saturates in mid-winter at height and
|
|
270
|
+
says most during spring melt. Dense forest reads low.
|
|
271
|
+
- Every signal measures change against the site's own history. Compare a site with itself, not
|
|
272
|
+
one site's level with another's.
|
|
273
|
+
|
|
274
|
+
### What the dataset must carry
|
|
275
|
+
|
|
276
|
+
Every answer carries an `attribution` member: the audited credit lines for the signal, such as
|
|
277
|
+
the imagery, the terrain-corrected radar product, the map data and its licence, and the outline
|
|
278
|
+
method. It sits
|
|
279
|
+
outside the rows. The easy way to read it is the catalogue's `attribution` column for the signal;
|
|
280
|
+
otherwise add, in the scratch test, a second per-row source over the same request with
|
|
281
|
+
`records_pointer` `""` and one column pointing at `/attribution`. Put the lines in the table
|
|
282
|
+
description, the dataset description and the source's `rights_claim.claim_note`, with the years
|
|
283
|
+
the table covers. For a radar signal on mapped footprints, such as the worked recipe, the service
|
|
284
|
+
writes:
|
|
285
|
+
|
|
286
|
+
```text
|
|
287
|
+
Contains modified Copernicus Sentinel data 2023-2026.
|
|
288
|
+
Sentinel-1 radiometrically terrain-corrected data processed by Catalyst, provided by Microsoft Planetary Computer under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); modified by Mostly Right.
|
|
289
|
+
© OpenStreetMap contributors. Contains information from OpenStreetMap (https://www.openstreetmap.org/copyright) and Overture Maps Foundation (https://overturemaps.org), which is made available under the Open Database License (ODbL) (https://opendatacommons.org/licenses/odbl/1-0/).
|
|
290
|
+
Site outlines were adjusted from the map data by our snapping and merging method, described at https://mostlyright.md/docs/satellite-signals/method.
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
Other signals carry other lines (ship detection models, MODIS citations, the Cropland Data Layer):
|
|
294
|
+
copy the value you read, never these. The catalogue also lists lines that start "When the answer
|
|
295
|
+
uses it:"; never copy those as written. Use the `attribution` of the table's own answers, which
|
|
296
|
+
carries only the lines that apply.
|
|
297
|
+
|
|
298
|
+
### What never to promise
|
|
299
|
+
|
|
300
|
+
- No counts of cars, people or aircraft: `parking` says how full, not how many.
|
|
301
|
+
- Nothing sharper than 10 m, and no individual vehicles.
|
|
302
|
+
- No daily or real-time figures: a radar pass comes every few days and a month is built from a
|
|
303
|
+
handful of them.
|
|
304
|
+
- No absolute quantities: barrels, tonnes of steel, crop yields or snow water. Each signal tracks
|
|
305
|
+
change, and the checks above are correlations.
|
|
306
|
+
- No ship history from `from` at an untracked place: it begins about 60 days before the table
|
|
307
|
+
was first built.
|
|
308
|
+
|
|
309
|
+
### Saying it
|
|
310
|
+
|
|
311
|
+
Name it by what it does: "free Sentinel radar shows how full each mall's parking lots are on
|
|
312
|
+
evening passes, against that mall's own usual level". Say how many places it reads, which signal,
|
|
313
|
+
the months covered, and which places it could not measure and why. Present `alarm` as "a
|
|
314
|
+
sustained change from this site's usual level", never as a confirmed event.
|
|
315
|
+
|
|
316
|
+
### Needs server 4.14
|
|
317
|
+
|
|
318
|
+
Check first: run `mr-data recipe explain RECIPE.json --json` and read `studio_capabilities`. Use
|
|
319
|
+
the freshness bound only when `per_row_revisit_interval` is true there. When it is false, the answer
|
|
320
|
+
is "not available on this server yet": write `pages.revisit` as `{"kind": "never"}`, and say that
|
|
321
|
+
each place keeps the series it was first built with.
|
|
322
|
+
|
|
323
|
+
#### Worked recipe: monthly parking at malls
|
|
324
|
+
|
|
325
|
+
The pages template the listing gives states `pages.revisit` as `{"kind": "interval", "seconds":
|
|
326
|
+
518400}`; [a freshness bound on per-row answers](making-a-table-incremental.md#a-freshness-bound-on-per-row-answers)
|
|
327
|
+
has the rule. The person gives a closed list of malls:
|
|
328
|
+
|
|
329
|
+
```text
|
|
330
|
+
mall,lat,lon
|
|
331
|
+
Ontario Mills,34.0730,-117.5510
|
|
332
|
+
Gurnee Mills,42.3880,-87.9560
|
|
333
|
+
Grapevine Mills,32.9660,-97.0400
|
|
334
|
+
Katy Mills,29.7770,-95.8100
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
The collection sends one request per mall, decodes each answer's `rows`, and carries `mall`, `lat`
|
|
338
|
+
and `lon` onto every decoded row, so the transform reads the satellite source alone. Replace
|
|
339
|
+
`https://sat.example.com` and `mostlyright-sat/sat-v1-PIN` with the `origin` and `model` the
|
|
340
|
+
listing gives, in the locator, the connector, the request and `pages.allowed_origins`. State no
|
|
341
|
+
`pages.concurrency` or pace: the binding's own rate paces every workspace's calls.
|
|
342
|
+
|
|
343
|
+
```json
|
|
344
|
+
{
|
|
345
|
+
"dataset": {
|
|
346
|
+
"name": "Mall parking from satellite radar",
|
|
347
|
+
"description": "How full the parking lots of a list of shopping malls are, month by month, from Sentinel-1 radar. Contains modified Copernicus Sentinel data 2023-2026. Sentinel-1 radiometrically terrain-corrected data processed by Catalyst, provided by Microsoft Planetary Computer under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); modified by Mostly Right. © OpenStreetMap contributors. Contains information from OpenStreetMap (https://www.openstreetmap.org/copyright) and Overture Maps Foundation (https://overturemaps.org), which is made available under the Open Database License (ODbL) (https://opendatacommons.org/licenses/odbl/1-0/). Site outlines were adjusted from the map data by our snapping and merging method, described at https://mostlyright.md/docs/satellite-signals/method."
|
|
348
|
+
},
|
|
349
|
+
"question": {"text": "How full are the parking lots at these malls each month?"},
|
|
350
|
+
"table": {
|
|
351
|
+
"name": "mall_parking_monthly",
|
|
352
|
+
"description": "One row per mall and month: the radar parking index, its site baseline and whether a sustained change is under way. A mall the service cannot measure has one row whose status names why. Contains modified Copernicus Sentinel data 2023-2026. Sentinel-1 radiometrically terrain-corrected data processed by Catalyst, provided by Microsoft Planetary Computer under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); modified by Mostly Right. © OpenStreetMap contributors. Contains information from OpenStreetMap (https://www.openstreetmap.org/copyright) and Overture Maps Foundation (https://overturemaps.org), which is made available under the Open Database License (ODbL) (https://opendatacommons.org/licenses/odbl/1-0/). Site outlines were adjusted from the map data by our snapping and merging method, described at https://mostlyright.md/docs/satellite-signals/method.",
|
|
353
|
+
"grain": ["mall", "date"],
|
|
354
|
+
"columns": [
|
|
355
|
+
{"name": "mall", "type": "string", "nullable": false, "description": "The mall's name, from the sites list."},
|
|
356
|
+
{"name": "lat", "type": "float", "nullable": false, "description": "The latitude the service was asked about."},
|
|
357
|
+
{"name": "lon", "type": "float", "nullable": false, "description": "The longitude the service was asked about."},
|
|
358
|
+
{"name": "date", "type": "date", "nullable": false, "description": "First day of the month the value covers; for a refused mall, the day it was refused."},
|
|
359
|
+
{"name": "value", "type": "float", "nullable": true, "description": "Radar brightness of the lots against their surroundings, in dB; higher is fuller."},
|
|
360
|
+
{"name": "unit", "type": "string", "nullable": true, "description": "The unit of value, baseline and change (dB)."},
|
|
361
|
+
{"name": "baseline", "type": "float", "nullable": true, "description": "The site's own reference level, from the year of radar passes before the table's first month."},
|
|
362
|
+
{"name": "change", "type": "float", "nullable": true, "description": "value minus baseline."},
|
|
363
|
+
{"name": "z", "type": "float", "nullable": true, "description": "change in units of the site's own noise."},
|
|
364
|
+
{"name": "alarm", "type": "boolean", "nullable": false, "description": "Whether this month is inside a sustained change."},
|
|
365
|
+
{"name": "images", "type": "integer", "nullable": false, "description": "Radar passes behind this month's value."},
|
|
366
|
+
{"name": "status", "type": "string", "nullable": false, "description": "ok, or the code naming why this mall could not be measured."},
|
|
367
|
+
{"name": "note", "type": "string", "nullable": true, "description": "For a refused mall, what went wrong and how to fix the request."},
|
|
368
|
+
{"name": "site_source", "type": "string", "nullable": true, "description": "What footprint was measured, for example openstreetmap parking polygons."},
|
|
369
|
+
{"name": "site_offset_km", "type": "float", "nullable": true, "description": "Distance from the requested point to the measured footprint, in km."},
|
|
370
|
+
{"name": "site_area_km2", "type": "float", "nullable": true, "description": "Area of the measured footprint, in km2."}
|
|
371
|
+
]
|
|
372
|
+
},
|
|
373
|
+
"rebuild": {"mode": "whole_table", "max_rebuild_bytes": 16777216, "min_interval_seconds": 604800},
|
|
374
|
+
"sources": [
|
|
375
|
+
{
|
|
376
|
+
"name": "malls",
|
|
377
|
+
"description": "The malls to watch: a name and a point on the site.",
|
|
378
|
+
"source_class": "user_url",
|
|
379
|
+
"data_classification": "public",
|
|
380
|
+
"locator": {"kind": "https_url", "display_locator": "https://sites.example/malls.csv"},
|
|
381
|
+
"rights_claim": {
|
|
382
|
+
"claimed_basis": "permission_asserted",
|
|
383
|
+
"claim_evidence_digest": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
|
|
384
|
+
"claim_note": "Example sites list."
|
|
385
|
+
},
|
|
386
|
+
"connector": {
|
|
387
|
+
"adapter_id": "public.https",
|
|
388
|
+
"credential_mode": "none",
|
|
389
|
+
"origin": "https://sites.example",
|
|
390
|
+
"parameters": [
|
|
391
|
+
{"name": "reader.family_id", "value": "delimited_text"},
|
|
392
|
+
{"name": "reader.family_version", "value": "2.0.0"},
|
|
393
|
+
{
|
|
394
|
+
"name": "reader.decode_options",
|
|
395
|
+
"value": "{\"columns\":[{\"expected_header\":\"mall\",\"index\":0,\"name\":\"mall\"},{\"expected_header\":\"lat\",\"index\":1,\"name\":\"lat\"},{\"expected_header\":\"lon\",\"index\":2,\"name\":\"lon\"}],\"delimiter\":\",\",\"doublequote\":true,\"encoding\":\"utf-8\",\"escapechar\":null,\"header\":true,\"quotechar\":\"\\\"\",\"skip_blank_rows\":false,\"skip_rows\":0,\"unselected_columns\":\"require_empty\"}"
|
|
396
|
+
}
|
|
397
|
+
]
|
|
398
|
+
},
|
|
399
|
+
"limits": {"max_source_bytes": 1048576, "max_rows": 1000, "max_requests": 1},
|
|
400
|
+
"closed": true
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"name": "parking",
|
|
404
|
+
"description": "Monthly parking index per mall from the sat platform binding (Sentinel-1 radar).",
|
|
405
|
+
"source_class": "user_api",
|
|
406
|
+
"data_classification": "public",
|
|
407
|
+
"locator": {"kind": "https_url", "display_locator": "https://sat.example.com/v1/observe"},
|
|
408
|
+
"rights_claim": {
|
|
409
|
+
"claimed_basis": "permission_asserted",
|
|
410
|
+
"claim_evidence_digest": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
|
|
411
|
+
"claim_note": "Contains modified Copernicus Sentinel data 2023-2026. Sentinel-1 radiometrically terrain-corrected data processed by Catalyst, provided by Microsoft Planetary Computer under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); modified by Mostly Right. © OpenStreetMap contributors. Contains information from OpenStreetMap (https://www.openstreetmap.org/copyright) and Overture Maps Foundation (https://overturemaps.org), which is made available under the Open Database License (ODbL) (https://opendatacommons.org/licenses/odbl/1-0/). Site outlines were adjusted from the map data by our snapping and merging method, described at https://mostlyright.md/docs/satellite-signals/method."
|
|
412
|
+
},
|
|
413
|
+
"connector": {
|
|
414
|
+
"adapter_id": "public.https.collection@2.0.0",
|
|
415
|
+
"credential_mode": "platform",
|
|
416
|
+
"origin": "https://sat.example.com",
|
|
417
|
+
"parameters": [
|
|
418
|
+
{"name": "reader.family_id", "value": "json.tabular"},
|
|
419
|
+
{"name": "reader.family_version", "value": "1.1.0"},
|
|
420
|
+
{
|
|
421
|
+
"name": "reader.decode_options",
|
|
422
|
+
"value": "{\"columns\":[{\"name\":\"date\",\"pointer\":\"/date\",\"required\":true},{\"name\":\"value\",\"pointer\":\"/value\",\"required\":true},{\"name\":\"unit\",\"pointer\":\"/unit\",\"required\":true},{\"name\":\"baseline\",\"pointer\":\"/baseline\",\"required\":true},{\"name\":\"change\",\"pointer\":\"/change\",\"required\":true},{\"name\":\"z\",\"pointer\":\"/z\",\"required\":true},{\"name\":\"alarm\",\"pointer\":\"/alarm\",\"required\":true},{\"name\":\"images\",\"pointer\":\"/images\",\"required\":true},{\"name\":\"status\",\"pointer\":\"/status\",\"required\":true},{\"name\":\"note\",\"pointer\":\"/note\",\"required\":true},{\"name\":\"site_source\",\"pointer\":\"/site_source\",\"required\":true},{\"name\":\"site_offset_km\",\"pointer\":\"/site_offset_km\",\"required\":true},{\"name\":\"site_area_km2\",\"pointer\":\"/site_area_km2\",\"required\":true}],\"document_format\":\"json\",\"expand\":[],\"records_pointer\":\"/rows\"}"
|
|
423
|
+
}
|
|
424
|
+
]
|
|
425
|
+
},
|
|
426
|
+
"limits": {"max_source_bytes": 67108864, "max_rows": 200000, "max_requests": 4000},
|
|
427
|
+
"collection": {
|
|
428
|
+
"discovery": {
|
|
429
|
+
"kind": "source_rows",
|
|
430
|
+
"source": "malls",
|
|
431
|
+
"request": {
|
|
432
|
+
"origin": "https://sat.example.com",
|
|
433
|
+
"method": "POST",
|
|
434
|
+
"path_template": "/v1/observe",
|
|
435
|
+
"static_query": [],
|
|
436
|
+
"static_headers": [],
|
|
437
|
+
"parameters": [
|
|
438
|
+
{"name": "lat", "type": "number", "required": true},
|
|
439
|
+
{"name": "lon", "type": "number", "required": true}
|
|
440
|
+
],
|
|
441
|
+
"body_template": {
|
|
442
|
+
"model": "mostlyright-sat/sat-v1-PIN",
|
|
443
|
+
"signal": "parking",
|
|
444
|
+
"lat": "{lat}",
|
|
445
|
+
"lon": "{lon}",
|
|
446
|
+
"from": "2023-01-01",
|
|
447
|
+
"every": "month"
|
|
448
|
+
},
|
|
449
|
+
"carry_columns": ["mall", "lat", "lon"]
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
"pages": {
|
|
453
|
+
"allowed_origins": ["https://sat.example.com"],
|
|
454
|
+
"max_pages": 1000,
|
|
455
|
+
"max_fetches_per_run": 1000,
|
|
456
|
+
"request_timeout_seconds": 120,
|
|
457
|
+
"retries": 3,
|
|
458
|
+
"revisit": {"kind": "interval", "seconds": 518400}
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
],
|
|
463
|
+
"transform": {
|
|
464
|
+
"engine": "duckdb_sql",
|
|
465
|
+
"steps": [
|
|
466
|
+
{
|
|
467
|
+
"step_id": "mall_parking_monthly",
|
|
468
|
+
"sql": "select mall, cast(lat as double) as lat, cast(lon as double) as lon, cast(date as date) as date, try_cast(nullif(value, '') as double) as value, nullif(unit, '') as unit, try_cast(nullif(baseline, '') as double) as baseline, try_cast(nullif(change, '') as double) as change, try_cast(nullif(z, '') as double) as z, cast(alarm as boolean) as alarm, cast(images as integer) as images, status, nullif(note, '') as note, nullif(site_source, '') as site_source, try_cast(nullif(site_offset_km, '') as double) as site_offset_km, try_cast(nullif(site_area_km2, '') as double) as site_area_km2 from parking",
|
|
469
|
+
"description": "Type the service's rows and keep the mall each came from."
|
|
470
|
+
}
|
|
471
|
+
]
|
|
472
|
+
},
|
|
473
|
+
"checks": [],
|
|
474
|
+
"units": [],
|
|
475
|
+
"timezone": "UTC"
|
|
476
|
+
}
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
Size it by the rules for every per-row source: `pages.max_fetches_per_run` covers the places,
|
|
480
|
+
`limits.max_requests` is at least that times one more than `pages.retries` (1000 x 4), and
|
|
481
|
+
`limits.max_rows` covers every decoded row (about 40 months x 1000 places, with room for a weekly
|
|
482
|
+
signal). Keep `request_timeout_seconds` at 120 and `retries` at 3.
|
|
483
|
+
|
|
484
|
+
Test it first on a scratch table with `pages.stop_at_budget: true` and `pages.max_fetches_per_run`
|
|
485
|
+
at 3. Read the rows against the malls and list every row whose `status` is not `ok` before the full.
|
|
486
|
+
A test run that succeeds goes live, so never test on the person's table.
|
{mostlyright_data-0.31.26 → mostlyright_data-0.31.27}/skills/mr-data-build/references/sources.md
RENAMED
|
@@ -275,7 +275,8 @@ deployment serves: Mostly Right Classify for classification (`gemini-decisions`,
|
|
|
275
275
|
model the listing names. A floating alias such as `~typesafe/jev-latest` is refused at
|
|
276
276
|
registration with `PLATFORM_CREDENTIAL_UNBOUND`. Keep the origin, method and path exactly as
|
|
277
277
|
listed, state no query and no literal header, and write `/model` as a literal.
|
|
278
|
-
[Enriching with small models](enriching-with-small-models.md) says when to offer each
|
|
278
|
+
[Enriching with small models](enriching-with-small-models.md) says when to offer each, and
|
|
279
|
+
[satellite signals](satellite-signals.md) covers the `sat` binding. Write no other body
|
|
279
280
|
member whose name differs from `model` only in case. A user who holds their own OpenRouter key can
|
|
280
281
|
present it with `opaque_reference` instead.
|
|
281
282
|
|