Posts

Showing posts from November, 2025

Module 12. Assignment

Image
For this assignment, I constructed an undirected social network graph utilizing Python, networkx, pandas, and plotnine. The procedure for generating the random graph and transforming the node and edge positions into DataFrames was highly effective. Once all components were configured, Plotnine facilitated the creation of a clear and well-structured visualization. The primary difficulties I encountered pertained to the visualization and preservation of the graph. Initially, the plot failed to display in a window due to infrastructure issues, and I inadvertently attempted to execute Python code within RStudio, resulting in errors. I addressed this issue by transitioning to Python directly, modifying the graphical backend, and exporting the image as a PNG rather than attempting to display it. Subsequently, the graph was exported effectively without any issues. Overall, I would employ this method again. It provides extensive control over the network's configuration and facilita...

Module 11. Assignment

Image
I read Dr. Piwek's talk on Edward Tufte and Charles Minard for this module, and then I made the dot-dash plot again using basic R. I noticed that the basic R version was the only one that could make the visual displayed in my attached figure after I installed and loaded all the visualization packages. I used the code that came with the module to make a graph of per-capita budget spending. It showed a range of years from 1967 to 1977 and the y values that went with them. The plot(), axis(), and abline() methods produced the linked points and dashed reference lines at 5 and 6. The text() function added notes for the 5 percent line and an explanatory caption. The output shows Tufte's minimalist design principle: it is clean, focused on data, and simple to understand. pkgs <- c("CarletonStats","devtools","epanetReader","fmsb","ggplot2","ggthemes","latticeExtra","MASS","PerformanceAnalytics...

Module 10. Assignment

Image
  I learned how to use the ggplot2 package in R to show time-series data in this lesson. It taught me how good visual design can help turn raw data into stories that make sense after reading Visualize This by Nathan Yau and Selva Prabhakaran's Complete ggplot2 Tutorial The built-in economics information shows changes in U.S. unemployment from 1967 to 2015, so I used it to make my own images for practice. I was interested in how mapping data could help people understand and make sense of long-term business trends. The code i have use in R library(ggplot2) library(gridExtra) data("economics") # Extract year for color mapping economics$year <- as.integer(format(economics$date, "%Y")) # 1. Line graphs: unemployment rate and median duration plot1 <- qplot(date, unemploy / pop, data = economics, geom = "line") +   labs(title = "U.S. Unemployment Rate Over Time",        x = "Date", y = "Unemployed / Population") plot2 ...