Module 10: Time Series and Visualization

    For this module, I learned how to create and customize visualizations in RStudio using ggplot2, focusing on patterns that change over time. I worked with two datasets, the famous Nathan’s Hot Dog Eating Contest results from FlowingData and the built-in economics dataset in R, to practice turning numbers into something visual and meaningful.

Hot Dog Contest Data

    I started with the hot dog eating contest data that tracked how many hot dogs the winner ate each year from 1980 to 2010. Using R, I made a basic bar chart that showed each year’s result, then highlighted the years where a new world record was set. The original version used gray and dark red bars, but I changed the colors and title to make it more my own.

    In my customized version, I used a clean theme, blue and light gray colors, and angled the x-axis labels so they’re easier to read. The chart makes it obvious how eating records exploded in the early 2000s when Takeru Kobayashi started competing, the jump from around 20 hot dogs to over 50 is crazy to see visually. 


Economics Data and Time Series

    Next, I used the economics dataset that comes with ggplot2. It tracks U.S. unemployment over several decades, so it’s perfect for time-series graphs. I made two line plots: one for the unemployment rate (unemployed / total population) and another for the median number of weeks people stay unemployed. The line plots help show trends you can’t easily spot in raw data, like how unemployment spikes during recessions but eventually recovers.




    Then I made a more complex visualization: a path plot that compares unemployment rate and duration over time, coloring each year differently. Each point represents a month, and the line connects them in order, so it almost “moves” through time. The result shows how the economy loops through cycles, when unemployment rises, people also stay jobless longer. I added a dashed trend line to make the pattern clearer.

My Design Choices

When I was editing my charts, I tried to apply what we learned about good visualization design:

  1. Color for meaning — I didn’t just pick random colors. Red and blue highlight specific things (record years or higher values) instead of being decorative.

  2. Clear labeling — I changed labels like “Dogs eaten” to “Hot Dogs Eaten” and added subtitles so anyone can understand the plot without reading my code.

  3. Minimal theme — I used theme_minimal() to remove unnecessary grid lines and keep the focus on the data.

What I Learned

    This module made me realize how much easier it is to understand data visually. Looking at a spreadsheet of numbers doesn’t really show you trends, but once it’s plotted over time, you immediately see when something changes or why a certain period stands out.

    I also learned how small style changes, like color, spacing, and label placement, make a huge difference in how people read a chart. Visualizing time series helps reveal patterns, like how unemployment behaves in economic cycles or how records improve over time. Overall, this assignment helped me get more comfortable using ggplot2 and thinking critically about design, not just data.


Comments

Popular posts from this blog

Student Loan Program Trends in the United States (2007–2025)

My Geographic Map of Florida COVID-19 Cases by ZIP Code

Spotting Differences in R: Comparing Fuel Efficiency by Cylinder Count