Skip to content

Instantly share code, notes, and snippets.

@blech
Last active December 19, 2015 19:09
Show Gist options
  • Save blech/6004366 to your computer and use it in GitHub Desktop.
Save blech/6004366 to your computer and use it in GitHub Desktop.
Notes for myself with jq/sed/etc

A command line script to convert the locations in a Twitter archive download to GeoJSON.

find . -name '2013*.js' -exec sed '1d' {} \; | \
jq '.[] | {"type": "Feature", "geometry": { "type": "Point", "coordinates": .geo.coordinates}, 'properties': {'created_at': .created_at}}' \
> ~/Desktop/twitter_2013.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment