# Generated by contracts/export_public_catalog.py from contracts/public_sources/gdelt.yaml -- do not edit by hand.
# Open Data Contract Standard v3.2.0 (https://bitol-io.github.io/open-data-contract-standard/).
apiVersion: v3.2.0
kind: DataContract
id: urn:alphaswarm:datacontract:gdelt:global-knowledge-graph
name: Global Knowledge Graph 2.1
version: 0.1.0
status: draft
domain: global-media
tags:
- gdelt
- knowledge-graph
description:
  purpose: Explore themes, people, organizations, places, and tone extracted from documents.
  usage: Preserve the GKG record identifier as text. Parse nested lists with the delimiter rules for each
    field in the codebook. Download the open archives and credit the GDELT Project.
  limitations: Coverage varies by source and language. Empty annotations can occur and V2.1DATE can be
    zero in special collections. GDELT records machine-coded media coverage. Source coverage, geocoding,
    and translation can introduce bias or errors.
  authoritativeDefinitions:
  - type: documentation
    url: https://data.gdeltproject.org/documentation/GDELT-Global_Knowledge_Graph_Codebook-V2.1.pdf
    description: Dataset documentation
  - type: documentation
    url: https://gdeltproject.org/data.html
    description: GDELT data guide
servers:
- server: gdelt-archive
  type: custom
  environment: vendor
  location: http://data.gdeltproject.org/gdeltv2/masterfilelist.txt
  description: Select .gkg.csv.zip files from the manifest. Extract the tab-delimited records and assign
    the listed codebook labels by position. Feed slots are 15 minutes.
  customProperties:
  - property: channel
    value: archive
schema:
- name: global-knowledge-graph
  description: Explore themes, people, organizations, places, and tone extracted from documents.
  dataGranularityDescription: One GKG record per coded source document.
  properties:
  - name: GKGRECORDID
    logicalType: string
    required: true
    description: Batch-based GKG record identifier
    primaryKey: true
    primaryKeyPosition: 1
  - name: V2.1DATE
    logicalType: string
    required: true
    description: Source document timestamp as YYYYMMDDHHMMSS when available
  - name: V2SourceCollectionIdentifier
    logicalType: integer
    required: true
    description: Numeric source collection code
  - name: V2SourceCommonName
    logicalType: string
    required: false
    description: Common source name or domain
  - name: V2DocumentIdentifier
    logicalType: string
    required: true
    description: Source-specific document identity such as a URL
  - name: V1Counts
    logicalType: string
    required: false
    description: Legacy extracted counts
  - name: V2.1Counts
    logicalType: string
    required: false
    description: Extracted counts with offsets
  - name: V1Themes
    logicalType: string
    required: false
    description: Matched theme codes
  - name: V2EnhancedThemes
    logicalType: string
    required: false
    description: Matched theme codes with offsets
  - name: V1Locations
    logicalType: string
    required: false
    description: Geocoded location references
  - name: V2EnhancedLocations
    logicalType: string
    required: false
    description: Geocoded locations with offsets and extra detail
  - name: V1Persons
    logicalType: string
    required: false
    description: Extracted person names
  - name: V2EnhancedPersons
    logicalType: string
    required: false
    description: Extracted person names with offsets
  - name: V1Organizations
    logicalType: string
    required: false
    description: Extracted organization names
  - name: V2EnhancedOrganizations
    logicalType: string
    required: false
    description: Extracted organization names with offsets
  - name: V1.5Tone
    logicalType: string
    required: false
    description: Comma-separated tone and document metrics
  - name: V2.1EnhancedDates
    logicalType: string
    required: false
    description: Date references with offsets
  - name: V2GCAM
    logicalType: string
    required: false
    description: Encoded Global Content Analysis Measures
  - name: V2.1SharingImage
    logicalType: string
    required: false
    description: Preferred sharing image URL when available
  - name: V2.1RelatedImages
    logicalType: string
    required: false
    description: Related image URLs
  - name: V2.1SocialImageEmbeds
    logicalType: string
    required: false
    description: Embedded social image URLs
  - name: V2.1SocialVideoEmbeds
    logicalType: string
    required: false
    description: Embedded video URLs
  - name: V2.1Quotations
    logicalType: string
    required: false
    description: Extracted quotations and associated offsets
  - name: V2.1AllNames
    logicalType: string
    required: false
    description: Detected proper names with offsets
  - name: V2.1Amounts
    logicalType: string
    required: false
    description: Detected numerical amounts with objects and offsets
  - name: V2.1TranslationInfo
    logicalType: string
    required: false
    description: Machine translation provenance
  - name: V2ExtrasXML
    logicalType: string
    required: false
    description: XML reserved for collection-specific metadata
  quality:
  - id: primary_key_unique
    metric: duplicateValues
    mustBe: 0
    arguments:
      properties:
      - GKGRECORDID
    dimension: uniqueness
    severity: error
    description: Check duplicate keys within a consistent source extract.
customProperties:
- property: vendorDataGroup
  value: knowledge-graph
- property: licensedData
  value: false
- property: timezone
  value: UTC
