Created
May 13, 2014 18:50
-
-
Save sandsfish/528e4ba3c26378e09c10 to your computer and use it in GitHub Desktop.
"Heart Disease" Phrase WordCount Query on Media Cloud
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mediacloud | |
import json | |
mc_query = u'+"heart disease"' | |
mc_filter = u'+publish_date: [2010-01-01T00:00:00Z TO 2011-01-01T00:00:00Z]' | |
print('query: ' + mc_query) | |
print('filter: ' + mc_filter) | |
mc = mediacloud.api.MediaCloud('MY_API_KEY') | |
wc = mc.wordCount(mc_query, mc_filter) | |
print(json.dumps(wc)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment