# 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:event-mentions
name: Event Mentions 2.0
version: 0.1.0
status: draft
domain: global-media
tags:
- gdelt
- events
description:
  purpose: Trace sources and successive references to an event and inspect extraction confidence.
  usage: Join to Events on GlobalEventID. For web sources the mention identifier can also match the GKG
    document identifier. Download the open archives and credit the GDELT Project.
  limitations: The proposed key is best-effort. Preserve source rows and investigate collisions before
    deduplicating. 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-Event_Codebook-V2.0.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 .mentions.CSV.zip files from the manifest. Extract the tab-delimited records and
    assign field labels by position. Feed slots are 15 minutes.
  customProperties:
  - property: channel
    value: archive
schema:
- name: event-mentions
  description: Trace sources and successive references to an event and inspect extraction confidence.
  dataGranularityDescription: One coded event mention within a source document.
  properties:
  - name: GlobalEventID
    logicalType: integer
    required: true
    description: Identifier of the referenced event
    primaryKey: true
    primaryKeyPosition: 1
  - name: EventTimeDate
    logicalType: string
    required: true
    description: Initial event batch timestamp as YYYYMMDDHHMMSS
  - name: MentionTimeDate
    logicalType: string
    required: true
    description: Mention batch timestamp as YYYYMMDDHHMMSS
    primaryKey: true
    primaryKeyPosition: 2
  - name: MentionType
    logicalType: integer
    required: true
    description: Code for the source collection
  - name: MentionSourceName
    logicalType: string
    required: false
    description: Name or domain of the source
  - name: MentionIdentifier
    logicalType: string
    required: true
    description: Source-specific identifier such as an article URL
    primaryKey: true
    primaryKeyPosition: 3
  - name: SentenceID
    logicalType: integer
    required: true
    description: One-based position of the sentence
    primaryKey: true
    primaryKeyPosition: 4
  - name: Actor1CharOffset
    logicalType: integer
    required: false
    description: Character offset of the first actor in processed text
  - name: Actor2CharOffset
    logicalType: integer
    required: false
    description: Character offset of the second actor in processed text
  - name: ActionCharOffset
    logicalType: integer
    required: false
    description: Character offset of the action in processed text
  - name: InRawText
    logicalType: integer
    required: false
    description: Flag for whether GDELT found the event in the original text
  - name: Confidence
    logicalType: integer
    required: false
    description: Extraction confidence as a percentage
  - name: MentionDocLen
    logicalType: integer
    required: false
    description: Processed document length in characters
  - name: MentionDocTone
    logicalType: number
    required: false
    description: Tone of this document
  - name: MentionDocTranslationInfo
    logicalType: string
    required: false
    description: Machine translation provenance when provided
  - name: Extras
    logicalType: string
    required: false
    description: Reserved source field
  quality:
  - id: primary_key_unique
    metric: duplicateValues
    mustBe: 0
    arguments:
      properties:
      - GlobalEventID
      - MentionTimeDate
      - MentionIdentifier
      - SentenceID
    dimension: uniqueness
    severity: warning
    description: Check duplicate keys within a consistent source extract.
customProperties:
- property: vendorDataGroup
  value: events
- property: licensedData
  value: false
- property: timezone
  value: UTC
- property: knownIssues
  value:
  - Primary key is inferred for the documented row grain.
