preshitambade / ResBaz-UA-Python-Twitter

code and files for workshop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Twitter Scraping and Basic Descriptive Analysis in Python

This repository was created for UArizona's Research Bazaar workshop on Scraping Twitter in Python. This code was written with the intention of providing an interactive workshop using Python in Spyder.

Getting Started

See the .pdf for Getting Started for Scraping Twitter specifically for this workshop.

Prerequisites

Applying for a Twitter Developer Account

  • Apply for and create a Twitter developer account
  • Once your account is approved, create an app by logging in with the account above and following the instructions.
  • Here is more information on Twitter apps.
  • Once your app is created, locate your individual Consumer API Keys and Access tokens.

What you need in Python

pip install tweepy pip install wordcloud

We are using glob to concatenate the csv files, and I have an older version. You may need to install this if you've never used it before:

pip install glob2

Installing

  • Open your command line (Command Prompt or Powershell for PC users).
  • Type the above commands and press enter.

pip install tweepy

  • This can also be done in Spyder.

!pip install tweepy

Resources on Regular Expressions

We will be using some regular expressions to parse tweets. Here are some quick guides and resources.

Built With and Versioning

This code and workshop was written using Python 3.7.4 with the Anaconda distribution.

Authors

  • Darla Still

Acknowledgments and Sources

About

code and files for workshop


Languages

Language:Python 100.0%