Skip to content

Instantly share code, notes, and snippets.

@israelst
Created May 25, 2016 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save israelst/18f30ebaaecdc93a67182e9e191858cf to your computer and use it in GitHub Desktop.
Save israelst/18f30ebaaecdc93a67182e9e191858cf to your computer and use it in GitHub Desktop.
GNIP Historical PowerTrack parse
# 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)
#!/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