Created
May 25, 2016 18:04
-
-
Save israelst/18f30ebaaecdc93a67182e9e191858cf to your computer and use it in GitHub Desktop.
GNIP Historical PowerTrack parse
This file contains 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
# coding: utf-8 | |
import json | |
fd = open('all.json') | |
lines = fd.readlines() | |
tweets = map(json.loads, lines) | |
ptBR_tweets = filter(lambda l: l['language']=='pt', tweets) |
This file contains 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
#!/bin/bash | |
zcat *.out | jq '{link, postedTime, language: .actor.languages[0], body}' -c > all.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment