Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FIPS104ToISO31661 = map[string]string{}/* 258 elements not displayed */
FIPS104ToISO31661 maps FIPS 10-4 country codes to ISO 3166-1 alpha2 codes
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { // GlobalEventID is the globally unique identifier assigned to each event // record that uniquely identifies it in GDELT master dataset. GlobalEventID uint64 Day int MonthYear int Year int FractionDate float64 Actor1 ActorData Actor2 ActorData IsRootEvent int // EventCode is the raw CAMEO action code describing the action that Actor1 // performed upon Actor2. EventCode string // EventBaseCode is the level two leaf root node category, when applicable. // CAMEO event codes are defined in a three-level taxonomy. For events at // level three in the taxonomy, this yields its level two leaf root node. // For example, code "0251" ("Appeal for easing of administrative // sanctions") would yield an EventBaseCode of "025" ("Appeal to yield"). // This makes it possible to aggregate events at various resolutions of // specificity. For events at levels two or one, this field will be set // to EventCode. EventBaseCode string // EventRootCode is similar to EventBaseCode and defines the root-level // category the event code falls under. For example, code "0251" ("Appeal // for easing of administrative sanctions") has a root code of "02" // ("Appeal"). This makes it possible to aggregate events at various // resolutions of specificity. For events at levels two or one, this field // will be set to EventCode. EventRootCode string QuadClass int GoldsteinScale NullableFloat64 NumMentions int NumSources int NumArticles int AvgTone float64 Actor1Geo GeoData Actor2Geo GeoData // ActionGeo captures the location information closest to the point in the // event description that contains the actual statement of action and is // the best location to use for placing events on a map or in other spatial // context. ActionGeo GeoData // DateAdded stores the date the event was added to the master database in // "YYYYMMDDHHMMSS" format in the UTC timezone. DateAdded uint64 // SourceURL records the URL or citation of the first news report it found // this event in. In most cases this is the first report it saw the article // in, but due to the timing and flow of news reports through the processing // pipeline, this may not always be the very first report, but is at least // in the first few reports. SourceURL string }
func (*Event) AllCameoEventCodes ¶
AllCameoEventCodes returns one or more CAMEO event codes from EventCode, EventBaseCode, and EventRootCode, keeping only one unique category code per level.
type GeoData ¶
type GeoData struct { // Type specifies the geographic resolution of the match type. Type GeoType // Fullname is the full human-readable name of the matched location. In // the case of a country it is simply the country name. For US and World // states it is in the format of "State, Country Name", while for all other // matches it is in the format of "City/Landmark, State, Country". // This can be used to label locations when placing events on a map. Fullname string // CountryCode is the 2-character FIPS10-4 country code for the location. CountryCode string ADM1Code string ADM2Code string // Lat is the centroid latitude of the landmark for mapping. Lat NullableFloat64 // Long is the centroid longitude of the landmark for mapping. Long NullableFloat64 FeatureID string }
func (*GeoData) CountryCodeISO31661 ¶
type GeoType ¶
type GeoType uint8
GeoType specifies the geographic resolution of the match type.
func GeoTypeFromInt ¶
type NullableFloat64 ¶
NullableFloat64 represents a float64 value that may be null.
func ParseNullableFloat64 ¶
func ParseNullableFloat64(value string) (NullableFloat64, error)
ParseNullableFloat64 parses a string value, converting it to NullableFloat64.
Click to show internal directories.
Click to hide internal directories.