AI4OfficialStats 0.2.0
CRAN portability fixes
- Fixed natural-language parsing so age ranges such as
15-24 are excluded without discarding a later statistical
value such as 20.5.
- Converted non-ASCII characters in R source code to portable Unicode
escape sequences.
- Added source-build packaging metadata for CRAN checks.
Search-first claim
verification
- Added
classify_stat_claim() for deterministic
extraction of domain, indicator, geography, year/latest-time intent,
value, unit, and explicitly named source from natural-language
statistical statements, including Persian digits and common Persian
statistical terms.
- Added
suggest_stat_providers() and
search_claim_evidence() to route parsed claims to
appropriate searchable official-statistics catalogues.
- Added
verify_claim() as the high-level search-first
verification interface. It can automatically search/fetch official
evidence or verify against supplied local evidence. Matching uses
indicator, geography, time, unit, and aggregate-dimension signals rather
than numeric equality alone.
verify_claim() now treats source attribution as
optional: providers = "auto" selects suitable
automatic-verification sources when none is named, while a source
explicitly named in the claim is respected by default. Added
providers = "all" for separate multi-source verification
and source-selection metadata in printed results.
- Claims no longer need to specify a reference year. When no year or
explicit latest-time phrase is present,
verify_claim() uses
the latest available matching official observation and records that the
time choice was inferred; printed results disclose both the automatic
time policy and the resolved official year.
- Added
verify_text() for multi-claim paragraphs.
- Added country-name/ISO-3 resolution for 249 ISO countries and a
Persian alias layer for commonly used country names.
- Added magnitude-aware parsing (
thousand,
million, billion, trillion) and
precision-aware numeric tolerances.
- Existing 0.1.0 constructors, audits, and provider connectors remain
available alongside the new Easy Mode and generic-provider
workflows.
- Added Eurostat Catalogue API discovery so explicitly attributed
Eurostat claims can be searched and fetched automatically through
verify_claim().
official_stat_providers() now distinguishes direct
fetch, catalogue search, and full automatic-verification capability
instead of implying that every listed provider supports the same
workflow.
Easier first-use workflow
- Adds
audit_stats() as a one-call beginner-facing
wrapper over the existing explicit stat_reference(),
stat_claim(), and audit_stat_ai()
workflow.
- Adds
read_official_stats() for ordinary data frames,
local files, and HTTP(S) URLs without requiring the package’s canonical
provider schema in advance.
- Adds
detect_stat_schema() with automatic recognition of
common English and Persian statistical field names.
- Adds Persian/Arabic digit normalization and common Persian unit
recognition, including percent and person-count labels.
- Adds
as_stat_claim() for structured rows, named lists,
numeric values, and simple plain-text statistical claims.
- Extends
as_stat_reference() so ordinary data frames can
be converted using automatic or explicit mappings, with clearer
missing-field diagnostics.
Universal provider layer
- Adds
register_official_provider() for session-local
generic provider profiles. Profiles can store reusable column mappings
and conservative host patterns without requiring a dedicated package
release for every NSO, ministry, central bank, or official
organisation.
- Adds
detect_stat_provider() and generic file/URL
importing for arbitrary official providers.
official_stat_providers() now advertises generic-import
support and includes profiles for the Statistical Center of Iran,
Central Bank of the Islamic Republic of Iran, and Iran Ministry of
Health and Medical Education.
- Excel import is available through the suggested
readxl
package; CSV, TSV, TXT, JSON, RDS, and supported ZIP contents use
existing/base dependencies.
WHO support
- Adds
who_odata_url(), search_who(), and
fetch_who() for World Health Organization indicator
metadata and bounded OData retrieval.
- Adds WHO to
search_official_stats() and the built-in
provider registry.
- The WHO OData base URL is configurable through
options(AI4OfficialStats.who_base_url = ...) or
base_url, allowing users to move from the legacy GHO OData
endpoint to the World Health Data Hub OData implementation as WHO
completes its API transition.
Compatibility
- Existing 0.1.0 constructors, audits, proof bundles, provider
connectors, benchmark tools, and GSBPM alignment functions remain
available.
- New convenience functions are additive; the explicit advanced API
remains the reproducibility-oriented path for users who want complete
control.
AI4OfficialStats 0.1.0
Release scope
- Provides a ten-dimensional statistical-fidelity audit covering
semantic, numerical, temporal, geographic, unit, contextual, provenance,
revision, transformation, and uncertainty fidelity.
- Provides geometric and weakest-link summaries together with
non-compensatory critical-error rules and PASS/WARN/FAIL certification
logic.
- Provides provenance graphs, revision handling, portable SHA-256
proof bundles, batch auditing, prompt perturbation, statistical red-team
generation, minimal-pair tests, benchmark utilities, and model-stability
tools.
- Provides bounded interfaces for Eurostat, World Bank, OECD, UNSD
SDG, UK ONS, U.S. BLS, and low-level IMF SDMX URL construction, together
with an extensible HTTPS JSON API registry.
- Provides
gsbpm52_map(), gsbpm_align(), and
gsbpm_quality_report() for explicit alignment with relevant
GSBPM 5.2 Analyse, Disseminate, Evaluate, Quality Management, and
Metadata Management activities.
- Includes offline fixtures and regression tests for provider parsing,
audit behaviour, proof integrity, and GSBPM alignment.
Scope and compatibility
- GSBPM alignment is offline and deterministic and introduces no
additional network dependency.
- The package supports relevant GSBPM 5.2 activities but does not
claim to implement or certify the complete GSBPM statistical production
process.