This project is a web dashboard that displays data and provides the results of a t-test analysis, inspired by a Tik-Tok video discussing the increase in Google searches related to changing votes.
-
Votes Data: Due to the unavailability of real-time vote data from providers at the project's inception, votes data is scraped from Routers. The scraping script can be found at scrap_script.py, and the raw data is saved at
data/raw. -
Geo Data: This dataset is taken from MappingAPI.
-
Google Trends Data: This data is manually downloaded from Google Trends.
You can see the dashboard here (recommended) or host it yourself.
If you want to host it, you can run the web dashboard locally and interact with the data and t-test results.
-
Clone the Git Repository
To clone the repository, open your terminal and run the following command:
git clone https://github.com/AleksandrZin/google-election -
Go to the new folder
cd google_election -
Create a Virtual Environment
To create a virtual environment, navigate to the project directory and run the following command:
python3 -m venv venv -
Activate the Virtual Environment
To activate the virtual environment, run the following command:
-
On Linux/macOS:
source venv/bin/activate -
On Windows:
venv\Scripts\activate
-
-
Install Requirements
To install the required packages, run the following command:
pip install -r requirements.txt -
Run the Web Dashboard
To run the web dashboard, activate the virtual environment and run the following command:
python dashboard.pyThe web dashboard will be accessible at
http://localhost:5000.