# 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:events
name: Events 2.0
version: 0.1.0
status: draft
domain: global-media
tags:
- gdelt
- events
description:
  purpose: Browse dyadic events coded from news coverage with CAMEO event and actor classifications.
  usage: Use Day for the coded event date and DATEADDED for publication-batch tracking. Preserve the leading
    zeroes in CAMEO codes. Download the open archives and credit the GDELT Project.
  limitations: Geo coordinates can represent administrative centroids. Mention counts in this feed depend
    on coverage. 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 .export.CSV.zip files from the manifest. Each archive contains headerless, tab-delimited
    records in the listed field order. Feed slots are 15 minutes.
  customProperties:
  - property: channel
    value: archive
schema:
- name: events
  description: Browse dyadic events coded from news coverage with CAMEO event and actor classifications.
  dataGranularityDescription: One row per GDELT event ID.
  properties:
  - name: GlobalEventID
    logicalType: integer
    required: true
    description: GDELT event identifier
    primaryKey: true
    primaryKeyPosition: 1
  - name: Day
    logicalType: string
    required: true
    description: Coded event day as YYYYMMDD
  - name: MonthYear
    logicalType: string
    required: true
    description: Coded event month as YYYYMM
  - name: Year
    logicalType: integer
    required: true
    description: Four-digit event year
  - name: FractionDate
    logicalType: number
    required: true
    description: Approximate fractional-year representation of the event date
  - name: Actor1Code
    logicalType: string
    required: false
    description: Composite CAMEO code of the first actor
  - name: Actor1Name
    logicalType: string
    required: false
    description: Resolved name of the first actor
  - name: Actor1CountryCode
    logicalType: string
    required: false
    description: CAMEO country affiliation of the first actor
  - name: Actor1KnownGroupCode
    logicalType: string
    required: false
    description: Known-group affiliation of the first actor
  - name: Actor1EthnicCode
    logicalType: string
    required: false
    description: Ethnicity code of the first actor
  - name: Actor1Religion1Code
    logicalType: string
    required: false
    description: Primary religion code of the first actor
  - name: Actor1Religion2Code
    logicalType: string
    required: false
    description: Secondary religion code of the first actor
  - name: Actor1Type1Code
    logicalType: string
    required: false
    description: First role code of the first actor
  - name: Actor1Type2Code
    logicalType: string
    required: false
    description: Second role code of the first actor
  - name: Actor1Type3Code
    logicalType: string
    required: false
    description: Third role code of the first actor
  - name: Actor2Code
    logicalType: string
    required: false
    description: Composite CAMEO code of the second actor
  - name: Actor2Name
    logicalType: string
    required: false
    description: Resolved name of the second actor
  - name: Actor2CountryCode
    logicalType: string
    required: false
    description: CAMEO country affiliation of the second actor
  - name: Actor2KnownGroupCode
    logicalType: string
    required: false
    description: Known-group affiliation of the second actor
  - name: Actor2EthnicCode
    logicalType: string
    required: false
    description: Ethnicity code of the second actor
  - name: Actor2Religion1Code
    logicalType: string
    required: false
    description: Primary religion code of the second actor
  - name: Actor2Religion2Code
    logicalType: string
    required: false
    description: Secondary religion code of the second actor
  - name: Actor2Type1Code
    logicalType: string
    required: false
    description: First role code of the second actor
  - name: Actor2Type2Code
    logicalType: string
    required: false
    description: Second role code of the second actor
  - name: Actor2Type3Code
    logicalType: string
    required: false
    description: Third role code of the second actor
  - name: IsRootEvent
    logicalType: integer
    required: false
    description: Flag for an event extracted from the lead portion of a report
  - name: EventCode
    logicalType: string
    required: true
    description: Most specific CAMEO action code
  - name: EventBaseCode
    logicalType: string
    required: false
    description: Intermediate CAMEO action code
  - name: EventRootCode
    logicalType: string
    required: false
    description: Top-level CAMEO action code
  - name: QuadClass
    logicalType: integer
    required: false
    description: Four-way cooperation or conflict classification
  - name: GoldsteinScale
    logicalType: number
    required: false
    description: Goldstein score associated with the action type
  - name: NumMentions
    logicalType: integer
    required: false
    description: Event mentions in the initial batch
  - name: NumSources
    logicalType: integer
    required: false
    description: Distinct sources mentioning the event in the initial batch
  - name: NumArticles
    logicalType: integer
    required: false
    description: Documents mentioning the event in the initial batch
  - name: AvgTone
    logicalType: number
    required: false
    description: Mean tone of documents mentioning the event in the initial batch
  - name: Actor1Geo_Type
    logicalType: integer
    required: false
    description: Geographic match resolution for the first actor
  - name: Actor1Geo_Fullname
    logicalType: string
    required: false
    description: Display label of the first actor location
  - name: Actor1Geo_CountryCode
    logicalType: string
    required: false
    description: FIPS country code of the first actor location
  - name: Actor1Geo_ADM1Code
    logicalType: string
    required: false
    description: First-level administrative area code of the first actor location
  - name: Actor1Geo_ADM2Code
    logicalType: string
    required: false
    description: Second-level administrative area code of the first actor location
  - name: Actor1Geo_Lat
    logicalType: number
    required: false
    description: Latitude of the first actor location
  - name: Actor1Geo_Long
    logicalType: number
    required: false
    description: Longitude of the first actor location
  - name: Actor1Geo_FeatureID
    logicalType: string
    required: false
    description: Geographic feature identifier of the first actor location
  - name: Actor2Geo_Type
    logicalType: integer
    required: false
    description: Geographic match resolution for the second actor
  - name: Actor2Geo_Fullname
    logicalType: string
    required: false
    description: Display label of the second actor location
  - name: Actor2Geo_CountryCode
    logicalType: string
    required: false
    description: FIPS country code of the second actor location
  - name: Actor2Geo_ADM1Code
    logicalType: string
    required: false
    description: First-level administrative area code of the second actor location
  - name: Actor2Geo_ADM2Code
    logicalType: string
    required: false
    description: Second-level administrative area code of the second actor location
  - name: Actor2Geo_Lat
    logicalType: number
    required: false
    description: Latitude of the second actor location
  - name: Actor2Geo_Long
    logicalType: number
    required: false
    description: Longitude of the second actor location
  - name: Actor2Geo_FeatureID
    logicalType: string
    required: false
    description: Geographic feature identifier of the second actor location
  - name: ActionGeo_Type
    logicalType: integer
    required: false
    description: Geographic match resolution for the action
  - name: ActionGeo_Fullname
    logicalType: string
    required: false
    description: Display label of the action location
  - name: ActionGeo_CountryCode
    logicalType: string
    required: false
    description: FIPS country code of the action location
  - name: ActionGeo_ADM1Code
    logicalType: string
    required: false
    description: First-level administrative area code of the action location
  - name: ActionGeo_ADM2Code
    logicalType: string
    required: false
    description: Second-level administrative area code of the action location
  - name: ActionGeo_Lat
    logicalType: number
    required: false
    description: Latitude of the action location
  - name: ActionGeo_Long
    logicalType: number
    required: false
    description: Longitude of the action location
  - name: ActionGeo_FeatureID
    logicalType: string
    required: false
    description: Geographic feature identifier of the action location
  - name: DATEADDED
    logicalType: string
    required: true
    description: GDELT ingestion batch timestamp as YYYYMMDDHHMMSS
  - name: SOURCEURL
    logicalType: string
    required: false
    description: Source document identifier or URL when provided
  quality:
  - id: primary_key_unique
    metric: duplicateValues
    mustBe: 0
    arguments:
      properties:
      - GlobalEventID
    dimension: uniqueness
    severity: error
    description: Check duplicate keys within a consistent source extract.
customProperties:
- property: vendorDataGroup
  value: events
- property: licensedData
  value: false
- property: timezone
  value: UTC
