TATR: Graphing Twitter Data


This recipe is part of the Text Analysis for Twitter Research (TATR) series and describes how to begin plotting basic graphs using Twitter data.

  • Open a new Jupyter Notebook and import the following libraries:
    • NLTK
    • PANDAS
    • NUMPY
  • Import Twitter data
    • Index the Tweets by date to make them more readable
  • Write a graphing function that:
    • Plots one column of the data
    • Plots different columns and compares them against each other over time
  • Plot the graphs and save the resulting visualizations

The TATR library was presented as an academic poster in 2018’s Congress held in Regina, SK. For a PDF version of the full poster, please visit:

Next steps / further information 

Certain aspects of this recipe draw upon code from the companion TATR notebooks and recipes. In particular, please see:

TATR: Panda Dataframe Manipulation

This recipe describes components that are fundamental for some of the more advanced TATR notebooks.