Homework 10
Below are the visualizations I generated for homework 10. I chose to work with the bigfoot dataset. It is linked below.
1. Histogram of Bigfoot Sightings by State
The following histogram shows the number of bigfoot sightings by state. On the x axis, I’ve included states. On the y axis, I’ve aggregated the number of recorded sightings per state. I set the mark to bar, the width to 600, the height to 350, and the color to darkblue. All of these choices allow users to compare the number of sightings in each state more easily on a histogram that has an appealing color and adequate size. This visualization was created using Javascript in Vega-lite after exploring the dataset in Python. I didn’t have to do much in terms of data transformations in order to generate this plot; although, I did have to aggregate the count of sightings by state in Javascript.
Here’s a link to this visualization and its code in Vega-lite.
2. Visualization Two
The following plot shows the relationships between high temperature, low temperature, and season in the bigfoot dataset. This plot is also interactive. By hovering over data points, users can view the state location of the bigfoot sighting. This could be helpful to assess outlier points in terms of their locations or study the relationships between location, season, and temps of bigfoot sightings.
The x axis shows low temps. The y axis shows high temps. The mark is set to point. The width is set to 600. The height is set to 400. The color is set to season with fall indicated by blue, spring by orange, summer by red, unknown by light blue, and winter by green. The interactivity is created by the tooltip encoding and is set to show state.
Here’s a link to this visualization and its code in Vega-lite.
Click on “The Data” to go to the raw dataset. Click on “The Analysis” to view my Python Notebook used for preprocessing. This notebook is also proof that I figured out how to generate these visualizations in Python using Altair.