discursus-data / saf_gdelt

GDELT resource library for the Social Analytics Framework
MIT License
1 stars 0 forks source link

The OSS Social Analytics Framework - GDELT library

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.

 

Library

Methods

gdelt_resource.initiate_gdelt_resource

Initialize resource to interact with the GDELT public data source

Configurations:

Example:

my_gdelt_resource = gdelt_resource.initiate_gdelt_resource()

gdelt_resource.get_url_to_latest_asset

Fetches the latest url for a specific GDELT asset.

Parameters:

Returns:

Example:

latest_asset_url = context.resources.gdelt_resource.get_url_to_latest_asset(gdelt_asset)

gdelt_resource.mine_latest_asset

Mines the latest asset from GDELT.

Parameters:

Returns:

Example:

df_latest_asset = context.resources.gdelt_resource.mine_latest_asset(gdelt_asset_url)

gdelt_resource.filter_latest_events

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)

gdelt_resource.filter_latest_mentions

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)

gdelt_resource.filter_latest_gkg

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)

 

Development of library