Tweets Scrape, Analysis, and Visualization using Pattern, Hugging Face, and Plotly #EarthDay2022

Quick Scrape — Extract — Visualize — Analyze exercise using Pre-trained NLP models for Text Analytics

Nabanita Roy
10 min readMay 17, 2022
Photo by NASA on Unsplash

If you are working on a last-minute text analytics project, you are probably at the right place. The idea here is to apply text analysis techniques and analyze tweets that were posted on Earth Day, i.e. on the 22nd of April.

I’ll start by narrating why I chose these libraries.

Patter for Scraping Data — Pattern is an easy-to-use Python library that provides a wrapper for the popular social media account for scraping data apart from other text processing features.

Hugging Face for Feature Extraction — We have progressed ahead from building models from scratch to using pre-trained models & Hugging Face🤗 has made it easier by crowd-sourcing pre-trained models in one place called Model Hub and building the pipeline() function for inference tasks.

Plotly for Data Visualization — Interactivity in visualizations and adding dropdown filters are the main reasons for using Plotly for me. Plotly has a wealth advantage over the likes of more popular libraries like Matplotlib and Seaborn, or visualization toolkits like Tableau

--

--

Nabanita Roy

Data Scientist @ EY (UK & Ireland) | Education Lead @ Women in AI Ireland | ❤ NLP