This library provides a resource to interact with the GDELT public data source.
It is part of the Social Analytics Framework. ease visit the repo for more information on the framework, its mission and how to use it.
Initialize resource to interact with the GDELT public data source
Configurations:
Example:
my_gdelt_resource = gdelt_resource.initiate_gdelt_resource()
Fetches the latest url for a specific GDELT asset.
Parameters:
events
, mentions
or gkg
Returns:
Example:
latest_asset_url = context.resources.gdelt_resource.get_url_to_latest_asset(gdelt_asset)
Mines the latest asset from GDELT.
Parameters:
Returns:
Example:
df_latest_asset = context.resources.gdelt_resource.mine_latest_asset(gdelt_asset_url)
Filters the latest events from GDELT using the passed configs.
Parameters:
Returns:
Example:
df_latest_events_filtered = context.resources.gdelt_resource.filter_latest_events(df_latest_events, filter_event_code, filter_countries)
Filters the latest mentions from GDELT using the filtered list of events.
Parameters:
Returns:
Example:
df_latest_mentions_filtered = context.resources.gdelt_resource.filter_latest_mentions(df_latest_mentions, df_latest_events_filtered)
Filters the latest gkg from GDELT using the filtered list of events.
Parameters:
Returns:
Example:
df_latest_gkg_filtered = context.resources.gdelt_resource.filter_latest_gkg(df_latest_gkg, df_latest_events_filtered)
python setup.py bdist_wheel