Package: gdelt2py
gdelt2pygdelt2pyis package to help you download the data from gdelt2 gkg data.Installpip install gdelt2pyUsagestart_date:The beginning date, in format with '20201020'optional default: '20201020'end_date:The end date, same formatoptional default: latestdate in gdelt2themes:Currently this package only supports gkg but will support another later.default: 'gkg'out_file:The name of the output file name like "output.csv"default: 'output.csv'data_dir:The data directory for your file downloadsdefault: current directoryNote20170725 data is missing in gdelt2.fromgdelt2importGdelt2t=Gdelt2()t.required(themes=["WB_678_DIGITAL_GOVERNMENT"])t.optional(locations=["#JA#","#CG#","#AG#","#US#"])t.download_files()Gdelt2 data formatThe Gdelt Global Knowledge Graph (GKG) Data format Codebook v2.1GKGRecordIdYYYYMMDDHHMMSS-XExample:  The fifth GKG record generated in 3:30AM on February 3, 2015. 20150203033000-5YYYYMMDDHHMMSS-TX20150203033000-T5 French-language documentDateYYYYMMDD (GKG2.0)YYYYMMDDHHMMSS (GKG2.1)SourceIdentifier1: WEB (The document originates from the open web and the DocumentIdentifier is a fully-qualified URL that can be used to access the document on the web).2: CITATIONONLY (The document originates from a broadcast, print, or other offline source in which only a textual citation is available for the document. In this case the DocumentIdentifier contains the textual citation for the document).3: CORE (The document originates from the CORE archive and the DocumentIdentifier contains its DOI, suitable for accessing the original document through the CORE website).4: DTIC (The document originates from the DTIC archive and the DocumentIdentifier contains its DOI, suitable for accessing the original document through the DTIC website).5: JSTOR (The document originates from the JSTOR archive and the DocumentIdentifier contains its DOI, suitable for accessing the original document through your JSTOR
subscription if your institution subscribes to it).6: NONTEXTUALSOURCE (The document originates from a textual proxy (such as closed
captioning) of a non-textual information source (such as a video) available via a URL and the DocumentIdentifier provides the URL of the non-textual original source. At present, this Collection Identifier is used for processing of the closed captioning streams of the Internet Archive Television News Archive in which each broadcast is available via a URL, but the URL offers access only to the video of the broadcast and does not provide any access to the textual closed captioning used to generate the metadata. This code is used in order to draw a distinction between URL-based textual material (Collection Identifier 1 (WEB) and URL-based non-textual material like the Television News Archive).SourceCommonNameDocumentIdentifierV1CountsAFFECT, ARREST, KIDNAP, KILL, PROTEST, SEIZE, or WOUNDCount NumberObject TypeLocation TypeLocation FullNameLocation CountryCodeLocation ADM1CodeLocation LatitudeLocation LongitudeLocation FeatureIDV2CountsV1ThemesGKG V1V2ThemesGKG V2V1LocationsV2LocationsV1PersonsV2PersonsV1_OrganizationsV2_OrganizationsToneV2EnhancedDateGCAMurlImageurlImageRelatedurlSocialMediaImageEmbedsurlSocialMediaVideoEmbedsquotationsV2AllNamesV2AmountsV2TranslationInfoxmlExtras