You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Structured Context for HfLA created data sets #159
We need to have minimum standards for structured context in data sets we create and or deploy in our projects so that we can help consumers understand the context from which they come.
Action Items
Identify existing resources for structured context, adding each example as a link in the resources section
Once done, remove the "TG: Gather Examples" label and add the "TG: Draft Template" label
Create a draft template, in all the formats the data will come in (json, csv, etc.) and upload to repo as a pr in the folder structured-context
Once done, remove the "TG: Draft Template" label and add the "TG: Create Guide" label
Discuss plan with data science team
Create a guide on how to use the template
Once done, remove the "TG: Create Guide" label and add the "TG: Review Guide" label
Review the guide with product management communities of practice
Once done, remove the "TG: Review Guide" label and add the "TG: Leadership Review" label
Present to Hack for LA leadership team for sign off
Once approved, remove the "TG: Leadership Review" label and add the "TG: Place Guide" label
Possibly create an issue template on .github
Include link to template under resources if you add it as a template in .github
Implementation Techniques for Structured Context in Knowledge Management and DataOps
Little‑known but important insight
If you don’t structure context at ingestion, you’ll pay it back with interest during audits, reanalysis, and stakeholder disputes. Most “data quality” fires are actually context failures (ambiguous definitions, missing lineage, drifting semantics).
1. Schema Design (Context by Contract)
What it is: Every dataset has an agreed‑upon schema — not just columns, but definitions.
3. Front Matter Standards (Reusable context blocks)
What it is: Treat every doc/report as an object with standard metadata.
How to do it:
Use YAML front matter at the top of design docs, runbooks, dashboards, and analyses.
Fields commonly include phase, audience, metric_definitions, data_sources, approvers.
Reference external dictionaries for roles, systems, and tech stacks.
4. Taxonomies and Controlled Vocabularies
What it is: Replace free‑text with curated terms to kill ambiguity.
How to do it:
Maintain a master dictionary (roles, teams, products, regions, lifecycle phases).
Prefer codes/IDs plus human labels.
Validate tags at entry; reject unknown labels.
Example: role_id=PO vs. free‑text "prod owner", "PM", "product mgr".
5. Metadata Pipelines (Enrich at ingestion)
What it is: Attach interpretive context when data enters the system.
How to do it:
Stamp rows with business calendar period, timezone, and unit semantics.
Store transform history (job name, commit/hash, run ID).
Keep source snapshots for reproducibility.
Example: In a people data platform, a contribution record is email + role + cost_center + product_area + activity_type + source_system_version.
6. Dashboards with Structured Context (Numbers plus their story)
What it is: Dashboards surface assumptions, not just charts.
How to do it:
Display metric definitions inline and link to canonical specs.
Use filters tied to taxonomy (region_id, product_tier) not ad‑hoc text.
Show freshness/SLA and data caveats at view time.
Example: Active users = users with at least 1 key action in the last 30 days; excludes internal test accounts; timezone = UTC; last refreshed = 2025‑08‑18 14:05 UTC.
Key Principles for Durable Data Across Teams and Time
Future‑proofing
Anyone six months from now should understand a number without tribal knowledge.
Interpretability
Definitions, units, and timeframes must be explicit and versioned.
Auditability and lineage
Every figure is traceable from report back to raw source and transformation steps.
Reanalysis and reproducibility
You can rerun the analysis and get the same result (or explain why not).
Portability and interoperability
Context travels with the data across tools, teams, and vendors.
Governance and access
Context includes who can use the data, for what purpose, and under which privacy/compliance rules.
Common Pitfalls (and how to avoid them)
Semantic drift
The meaning of a metric changes silently over time. Prevent with versioned metric specs and deprecation notes.
Lossy transforms
Pipelines drop fields required for later analysis. Prevent with minimum context fields and schema tests.
Timezone and window ambiguity
Dates look aligned but aren’t. Stamp everything with timezone and business calendar.
Vocabulary sprawl
Too many near‑duplicate tags. Lock labels to a dictionary and run periodic concordance jobs.
Orphaned “single‑source‑of‑truth”
Multiple dashboards claim to be canonical. Register authoritative datasets and enforce discoverability via a catalog.
Minimum Definition of Done for Data Products
Metric definition is checked into version control and linked in the dashboard.
Dataset includes required context fields (source, load_ts_utc, unit, tz, version).
Lineage is queryable end‑to‑end (catalog, dbt docs, or equivalent).
Freshness/SLA monitors and alerts exist and are visible to consumers.
Access controls and allowed‑use statements are documented.
Activity
akhaleghi commentedon Oct 7, 2021
ExperimentsInHonesty commentedon Dec 6, 2021
ExperimentsInHonesty commentedon Dec 20, 2021
added this issue to the agenda for DS pm meeting hackforla/data-science#65 (comment) - revisit on 2022-01-03
ExperimentsInHonesty commentedon Jan 5, 2022
We didn't meet, we will pick this up at this week's meeting 2022-01-07
ExperimentsInHonesty commentedon Aug 18, 2025
ExperimentsInHonesty commentedon Aug 18, 2025
Implementation Techniques for Structured Context in Knowledge Management and DataOps
Little‑known but important insight
If you don’t structure context at ingestion, you’ll pay it back with interest during audits, reanalysis, and stakeholder disputes. Most “data quality” fires are actually context failures (ambiguous definitions, missing lineage, drifting semantics).
1. Schema Design (Context by Contract)
2. Context‑as‑Code (Automate, don’t rely on memory)
3. Front Matter Standards (Reusable context blocks)
4. Taxonomies and Controlled Vocabularies
5. Metadata Pipelines (Enrich at ingestion)
6. Dashboards with Structured Context (Numbers plus their story)
Key Principles for Durable Data Across Teams and Time
Future‑proofing
Anyone six months from now should understand a number without tribal knowledge.
Interpretability
Definitions, units, and timeframes must be explicit and versioned.
Auditability and lineage
Every figure is traceable from report back to raw source and transformation steps.
Reanalysis and reproducibility
You can rerun the analysis and get the same result (or explain why not).
Portability and interoperability
Context travels with the data across tools, teams, and vendors.
Governance and access
Context includes who can use the data, for what purpose, and under which privacy/compliance rules.
Common Pitfalls (and how to avoid them)
Semantic drift
The meaning of a metric changes silently over time. Prevent with versioned metric specs and deprecation notes.
Lossy transforms
Pipelines drop fields required for later analysis. Prevent with minimum context fields and schema tests.
Timezone and window ambiguity
Dates look aligned but aren’t. Stamp everything with timezone and business calendar.
Vocabulary sprawl
Too many near‑duplicate tags. Lock labels to a dictionary and run periodic concordance jobs.
Orphaned “single‑source‑of‑truth”
Multiple dashboards claim to be canonical. Register authoritative datasets and enforce discoverability via a catalog.
Minimum Definition of Done for Data Products
ExperimentsInHonesty commentedon Aug 18, 2025
Project Data Checklist
Use this checklist to ensure that data in your project is reliable, reusable, and future-proof.
1. Data Definition
2. Metadata and Context
3. Data Lineage and Provenance
4. Governance and Compliance
5. Quality and Reliability
6. Documentation and Discoverability
7. Reproducibility
8. Portability and Interoperability
9. Lifecycle and Stewardship
Guiding Question
Could someone new to the project, six months from now, look at this dataset or dashboard and: