Skip to content

Data Science project analyzing Google Trends Data.

Notifications You must be signed in to change notification settings

sekerez/global_interest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Global Interest in the 2020 U.S. Election

Screenshot

Python Pandas Numpy Pytrends

Table of Contents

Description

This is a data science project tracking global interest in US-related topics through Google Trends. The scripts collect and analyze data from various sources, including online webpages and an unofficial Google Trends API. The data is stored in .csv tables. I visualized the data in a Jupyter Notebook and produced a 25-page research paper for a university course (the course did not involve coding - the scripts I wrote helped me gather the data necessary to write the paper).

Installation

The project requires no specific installation, though it does require that certain python dependencies be installed.

The project was written on a 64-bit MacOS 11 Big Sur using Python 3.8.10. It uses a few external dependencies, including pandas, numpy, and third-party apis.

To download all python dependencies with pip, type in the command line:

$ pip install -r requirements.txt

Usage

I do not recommend running the scripts now. The scraped websites and APIS used might be outdated or deprecated. Moreover, the data collected would be different, since it collects data up to the present day. It is better to view the research by reading the paper.

Nevertheless, to run the scripts, just run them through a python interpreter.

python3 scripts/country_table_creator.py
python3 scripts/hourly_df_creator.py
python3 scripts/minthly_df_creator.py
python3 scripts/sattistical_additions.py

The scripts will then save the found data in the .csv files in tables.

To visualize the data, open visualizations/grapher.ipynb in a Jupyter Notebook reader.

About

Data Science project analyzing Google Trends Data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published