Creating a Customized Global GKG GeoJSON Feed

After posting about the new GDELT GKG Global GeoJSON files, we heard from quite a number of you that you were really excited about the ability to create global maps, but that the filesize requirements of those global files were far too much for your own CartoDB accounts (together they can require up to 1GB of disk during high-volume news periods).

Thus, with the release of the new GDELT GKG GeoJSON API yesterday, we're excited to note that you can now create fully customized versions of those global GeoJSON files, filtered to just the content you want to map, allowing you to generate minimized files that fit within most CartoDB mapping accounts or that can be imported into various spatial analytics platforms.

The URLs below show how to use the new GDELT GKG GeoJSON API to generate the Global GeoJSON files that power our example CartoDB maps.  These can require up to 1GB of disk available in your CartoDB account if you try to use them as-is.  Instead, use these as templates to modify to your specific needs, using the QUERY parameter to have the feed return only records of interest, reducing the set of returned fields using OUTPUTFIELDS and reducing the maximum number of returned records with MAXROWS.

 

Hourly URL GeoJSON

This creates a clickable layer of news coverage from the last hour.  Add a query to the QUERY parameter to filter the returned coverage and modify the list of OUTPUTFIELDS to only those you plan to use on your map.  If you need, adjust MAXROWS down to 30,000 or even lower to reduce the maximum number of returned rows to dramatically reduce the filesize.

 

Minimized Non-US Hourly URL GeoJSON

This feed is similar to above, but adds "excgeoname:United States" to the QUERY parameter, telling it to exclude all US-based location matches from the output.  It also reduces MAXROWS down to a maximum of 30,000 returned rows.  Add additional clauses to the QUERY to further filter the feed to just records of interest and reduce the list of OUTPUTFIELDS to only those fields you plan to add to your map.

 

24 Hour Animation GeoJSON

This creates a feed optimized for creating animation layers.  Instead of returning each matching article, it collapses all matches for each location within a given 15 minute interval and records the average/total statistics for all mentions of that location during that given 15 minute interval.  This results in a highly compact table that minimizes the required amount of disk.  Modify the QUERY and OUTPUTFIELDS parameters below to filter to just the records you want for your animation and reduce MAXROWS to a lower number if the resulting file is still too large.