Web application deployed with Heroku: https://viz-wiz-app.herokuapp.com/
Our goal was to develop a creative design using innovative visualization tools. We explored mediums we didn't have previous experience with to expand our boundaries and increase our knowledge.
Data • How to Use • Visuals • How to Install • Methodology & Motivation • Team Members • Future Work •
Google's Political Advertising Transparency Report. Which aims to provide transparency around political advertising on Google, YouTube, and partner properties. It includes information about targeting by ad campaign and spending by advertiser, region, and keyword.
Polling information on 2020 US primary from fivethirtyeight.
Survey of 2018 state political party identification and leaning conducted by Gallup.
On first data visualization, use dropdown menu to change between "Poll Winners", "Poll Ratings", and "Google Keywords Total Spend". For "Poll Winners" and "Poll Ratings" user can also select a specific date range and toggle between "Democratic" and "Republican" candidates.
Scroll down on page.
On second visualization, use dropdown menu to change between "Poll Winners", "State Party Identification", "Ad Targeting", and "Ad Spending". For "Poll Winners" user can also select a specific date range.
This is a lightweight app that is run using python. We used python 3.6 for development, so we would encourage you to use the same. For installation we recommend creating a virtual environment and installing the python packages using the requirements.txt file. You can create an environment using an Anaconda Prompt:
conda create -n myenv python=3.6
Next you would activate the environment:
conda activate myenv
To install the required packages, execute the command:
pip install -r requirements.txt
After the packages are installed, Run app.py on a local server through preferred method. Typically shown as:
python app.py
In Google Chrome (the one and only browser we tested on), open up a new window and go to localhost, post 3050. In our case the url is simply http://127.0.0.1:3050/
We first explored using Tableau as our visualization tool. Attracted by out-of-the-box visuals that are flexible and easily tailored to fit different data sets. As well as analysis capabilities that can blend different data sources and slice and dice the data quickly to explore many different views.
However, we ended up pivoting our focus to explore new technologies. We decided using tools that we were unfamiliar with would force us to learn and investigate more.
With this decision, we began to create a web application.
We leveraged several python libraries, like plotly's python library for graphing and visualizations and pandas for data manipulation and analysis. The first framework we explored was Flask, but ran into difficulty with rendering graph objects. As a result, we changed our framework to Dash, which is built on top of Flask, Plotly. js, React and React Js.
Once we had a few basic choropleth map visualizations, we explored using javascript to create other visuals. Although time intensive, we found the visual created with javascript was especially flexible and gave the most room for creativity.
Future improvements we would like to incorporate include:
- Expand data development and extrapolation
- Connect to Google Cloud Platform (GCP) to receive real-time data
- Further connect visuals and allow cross-filtering between visualizations
- Incorporate time-slicing into all data sources