Posts

Showing posts from November, 2024

LIS 5318 Module 13 - GIF

Image
For Module 13, the class was instructed to create a GIF file from the following code:  install.packages("animation") library(animation) saveGIF({   for (i in 1:10) plot(runif(10), ylim = 0:1) }) Below is my animation. The animation can inform a report on a set of data by visualizing the points at which variables change. Above is the same animation using R studio. This animation is clear and can be interpreted with greater detail.   

Module 12 Assignment

For assignment 12, the class was instructed to construct a network analysis of a social media website.  I attempted to collect data from Pintrest and Reddit, but their APIs are restricted to community users.  Twitter also requires users to have an account in order to collect any data.

Module 11 Assignment - Defensive Code and Debugging

 Today's assignment was to debug a block of code provided by the instructor, below: tukey_multiple <- function(x) {    outliers <- array(TRUE,dim=dim(x))    for (j in 1:ncol(x))     {     outliers[,j] <- outliers[,j] && tukey.outlier(x[,j])     } outlier.vec <- vector(length=nrow(x))     for (i in 1:nrow(x))     { outlier.vec[i] <- all(outliers[i,]) } return(outlier.vec) } Below is my debugged code: tukey_multiple <- function(x) {   outliers <- array(TRUE,dim=dim(x))   for (j in 1:ncol(x))   {     outliers[,j] <- outliers[,j] && tukey.outlier(x[,j])   }   outlier.vec <- vector(length=nrow(x))   for (i in 1:nrow(x))   { outlier.vec[i] <- all(outliers[i,]) }    return(outlier.vec)    } This code is a function. The bug in the code was in the final layer, where the return call should...

Module 10 Assignment

Image
 For Module 10, the class was instructed to create a plot using ggplot2. I created a scatter plot using Covid data. The code is below: #install packages install.packages("ggplot2") library(ggplot2) #create the dataset read.csv("/Users/kelsey/Desktop/LIS 5318 Visual Analytics/LIS 5318 Module 10/LIS5318-Visual-Analysis-2024/synthetic_covid_impact_on_work.csv") covid <- read.csv("/Users/kelsey/Desktop/LIS 5318 Visual Analytics/LIS 5318 Module 10/LIS5318-Visual-Analysis-2024/synthetic_covid_impact_on_work.csv") View(covid) #create dataframe coviddata <- data.frame(covid) #create the plot using ggplot2 covidplot <- ggplot(data = coviddata, aes(x=Hours_Worked_Per_Day, y=Meetings_Per_Day, color=Productivity_Change)) + geom_point() help(geom_point) print(covidplot) The plot can be seen below: This plot is not correlated.      This reflects the erratic work patterns of covid data. Employee outliers include a data point at 7 hours per day and nearly 10 hour...