Posts

Showing posts from November, 2025

Social Network Visualization Using Python

Image
     For this assignment, I created a simple undirected social network graph using Python, NetworkX, and Plotnine. The goal was to build a small network, convert it into a DataFrame, and visualize it using a ggplot2-style plotting library. Process & Reflection      To start, I generated a random graph with 10 nodes using the gnp_random_graph() function in NetworkX. This part worked really well, NetworkX makes it extremely easy to build graph structures and assign attributes like labels. I labeled each node from A through J and used the spring layout algorithm to position everything. Converting the graph into two pandas DataFrames (one for nodes and one for edges) turned out to be helpful because Plotnine works best when the data is structured in a tidy format.      The visualization step was surprisingly smooth. Since Plotnine is based on ggplot2, the syntax felt familiar: I used geom_segment to draw the connections, geom_point for th...

Module 11: Dot-Dash Plot in lattice

Image
       For this week’s visualization, I recreated the dot-dash plot using the lattice package in R. This type of plot was mentioned in Dr. Piwek’s discussion of Edward Tufte’s design principles, which emphasize simplicity and data-focused graphics. My version uses the built-in mtcars dataset, plotting miles per gallon (mpg) against car weight (wt). Each point represents a car, while the small dashes (created with panel.rug() ) along the x- and y-axes show the data distribution without needing full histograms.      The minimalist style follows Tufte’s “data-ink ratio” idea, using only the essential visual elements to highlight the relationship between variables. The clean background and limited color make it easy to focus on the pattern of the points rather than decorative elements. I like this design because it feels both simple and professional, showing how much you can communicate visually with very little clutter. ...

Module 10: Time Series and Visualization

Image
     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 Ta...