Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gedankenstuecke/geolocations
getting geo locations from twitter archives/swarm
https://github.com/gedankenstuecke/geolocations
Last synced: 8 days ago
JSON representation
getting geo locations from twitter archives/swarm
- Host: GitHub
- URL: https://github.com/gedankenstuecke/geolocations
- Owner: gedankenstuecke
- License: mit
- Created: 2015-07-19T13:09:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-20T11:37:25.000Z (almost 9 years ago)
- Last Synced: 2024-11-13T14:25:36.095Z (2 months ago)
- Language: JavaScript
- Size: 378 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# geolocations
A small collection of scripts for getting geo locations from twitter archives
and swarm data.## twitter-export
This requires you to have your twitter-archive unzipped somewhere on your
machine. the script takes two parameters:1. the path to the archive-folder containing the json files for the different
months/years. usually this is **tweetarchive/data/js/tweets/**
2. a target user name, which will be flagged separately in the outputExample run:
'python twitter-export.py /home/bastian/tweets/data/js/tweets/ gedankenstuecke'
The output contains 11 columns:
1. source
2. date
3. time
4. user
5. is this tweet a reply? yes/no (1/0)
6. is this tweet mentioning the target username? yes/no (1/0)
7. the tweet's text
8. latitude
9. longitude
10. last latitude
11. last longitude## swarm export
This script exports your swarm checkins' latitude/longitudes along with the
name of the user that checked in with you into to a csv file, it also saves
the original JSON. It requires 3 parameters:1. your swarm OAuth token (can be found here https://developer.foursquare.com/docs/explore)
2. the filename to which you want to save the JSON output
3. the filename to which you want to save the CSV outputExample run:
'python swarm-export.py MYKEY swarm.json swarm.csv'
The output contains 9 columns:
1. source
2. date
3. time
4. user
5. latitude
6. longitude
7. with whom the checkin was
8. the last latitude
9. the last longitude