Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 1.74 KB

README.adoc

File metadata and controls

59 lines (40 loc) · 1.74 KB

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