Google BigQuery APIs

As part of my consulting assignment I need to download geopolitical event data from the GDELT Project. This data is available as a public dataset on Google’s BigQuery. There are APIs for BigQuery in Python and R. Google provides a tutorial for BigQuery using Python or Java. Hadley Wickham has written an R API that is available from GitHub (it’s not on CRAN yet).

It is very helpful to be able to access these data sources from R or Python programmatically. One little pitfall I encountered using the Python API and OAuth2.0: The authentication request returned an error telling me that I needed a project name. Since that wasn’t part of the client_secret.json I was confused. It turns out that one has to set the project name on the Consent screen portion of the Google Developers Console. After doing that I was able to obtain a credential for my application.