Posts

Showing posts from April, 2024

LIS 4317 Final Project: R Chart showing Game Price changes over time

Image
 For this final project, I remembered the concept of used game prices tending to increase over time, especially older ones (more than 15 years old or so). With the lack on any decent visually-based references to measure the change in time these prices have had, I took it upon myself to make my own. Since no database I could find contained price listings, I obtained my own using PriceCharting.com. I selected a few random games released for the Nintendo GameCube, and recorded the price listing for "loose" games (only the disc). I then compiled all of the prices into an Excel CSV and imported it into RStudio. For clarification, the games I chose were (from left to right): Sonic Classics Collection Need For Speed: Most Wanted Shrek: Extra Large SpongeBob Squarepants: Battle For Bikini Bottom Lego Star Wars: The Video Game Super Monkey Ball TimeSplitters 2 Turok: Evolution Geist Batman: Dark Tomorrow Donkey Kong Jungle Beat I then made a ggplot function that would allow me to easi

Final Project: DescribeR v1.0.0

 After some time, I'm thrilled to finally release the source code for my first ever R package. Alongside the first three functions I described in the original description file, I've also added an additional interactive_heatmap function that can create heatmaps of correlating numerical data in a given dataset. It's my hope that this package will make exploratory analysis easier for those dealing with unfamiliar sets of data, leaving more time to figure out more advanced uses for said data. GitHub repository for DescribeR: https://github.com/Retrolovania/DescribeR

Module 13: Animating in R

Image
 Using Yihui Xie's animation package, I opted to try to make a simple animation of a bouncing ball. While I'm more than pleased with the results, I'm still at a loss as to why the ball isn't bouncing as it should (it's meant to flatten somewhat at the bottom). Regardless, it's still fascinating to see an actual animation having been created with only R code. Code: library (animation) # Function to create the animation frames bounce_animation <- function (height = 10 , gravity = 0.1 , nframes = 25 , x = 0.5 , filename = "bounce_animation.gif" ) {   # Initialize variables   y <- height   velocity <- 0   squished <- FALSE      # Create and save the animation   saveGIF({     for (i in 1 :nframes) {       # Update position and velocity       y <- y + velocity       velocity <- velocity - gravity              # Squish effect when ball hits the ground       if (y < 0 ) {         y <- 0         velocity <- -velocity * 0.9   # Loss