Skip to content

community-graph/twitter-import

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neo4j Twitter Import for Community Graph (and others)

Currently uses Python and iPython Notebook, the Twitter Search API via requests.

Run the script and notebook server with these environment variables:

nb.sh
cat ../nb.sh
export NEO4J_URL=bolt://localhost
export NEO4J_USER=neo4j
export NEO4J_PASSWORD=****
export TWITTER_BEARER='...'
# export TWITTER_SEARCH='#neo4j'

ipython notebook

Approach

  • Use Twitter search API

  • Control direction of ingest with catchUp: False → backward in history using max_id, catchUp: True → newer tweets using since_id

  • Optionally provide twitter search via env-param

  • Use idempotent Cypher statement to merge Tweets, Users, Tags

Data Model

Uses the Twitter part of this data model:

community graph

Queries

TODO

  • store in json files and then import those

  • save a "hash" of the query used with the tweet, so we can compute "maxId" for different queries

About

Import Scripts for Twitter Data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published