Skip to content

Instantly share code, notes, and snippets.

View sparack's full-sized avatar

Suhem Parack sparack

View GitHub Profile
@sparack
sparack / tweepy_migration_guide.md
Created April 14, 2022 00:31
A guide to migrating your code in Python that uses Tweepy from the Twitter API v1.1 to the Twitter API v2

Guide to migrating your code from Twitter API v1.1 to v2 with Tweepy in Python

Tweepy is a popular library that allows developers to interact with the Twitter API in Python. Since the launch of the new Twitter API v2, Tweepy has been updated to support the new API. Many students and developers continue to use the old Twitter API v1.1 in Tweepy, because they are unware of the new API v2 or because they do not know how to migrate their code to use v2.

In this guide, I will show you how you can migrate your Tweepy code in Python that uses the old Twitter API v1.1 to use the new Twitter API v2.

In order to use the Twitter API, you first need to sign up for access. Once you have access, you need to get your keys and tokens from the developer portal to connect to the Twitter API. To learn how to get your keys and tokens based on your access levels, check out t

@sparack
sparack / tweet_counts.ipynb
Created July 8, 2021 23:04
Notebook to demo Tweet counts v2 for building visualizations
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Exploratory data analysis with the Twitter API v2

Author: Dr. Maria Y. Rodriguez

Acknowledgments

I acknowledge the traditional territory of the Haudenosaunee Confederacy and honor the sovereignty of the Six Nations–the Mohawk, the Cayuga, the Onondaga, the Oneida, the Seneca and the Tuscarora. I live and work on their land, here in Buffalo NY, and I offer my thanks to them and their ancestors for the opportunity.

I also give thanks to my ancestors, the Taino and Arawak people, my West African ancestors (predominantly from Benin, Togo and the Congo) who recreated their home as best they could on the island known then as Ayiti, now Hispaniola, after their kidnapping and enslavement, as well as the colonizers who made their home in Ayiti: the Spanish and Portuguese among others. I thank my ancestors for their guidance and protection and ask them to accompany me during this presentation.