Author: David Sanchez
-
R Markdown Reflection
Author : David SanchezDate : November 17 2025 For this assignment, I got a chance to actually work inside an R Markdown file instead of just hearing about it. I learned that Markdown syntax is pretty simple once you get used to it using # for headings, *…* for italics, **…** for bold, and dashes…
-
Social Network Visualization in Python with Plotnine
David SanchezNovember 17, 2025 Overview For this week’s assignment, I created a simple social network visualization using Python’s networkx and plotnine libraries.Each node represents a person (labeled A–J), and edges represent connections between them. Code Summary I first generated a random undirected graph with 10 nodes using: Then I converted it into two pandas DataFrames…
-
Debugging Log: Tukey Outlier Function in R (&& vs &)
Author: David Sanchez Goal: Reproduce the problem, diagnose the bug, fix it, and validate the results. Github : https://raw.githubusercontent.com/DxSanUSF/School-Projects-R-Class/main/Assignment%20%2311-%20Debugging%20and%20Defensive%20Programming The Buggy Function The function below tries to flag rows of a numeric matrix that are outliers in every column using the Tukey (IQR) rule. There is a subtle bug: it uses && instead of &…
-
Dot–Dash Plot in ggplot2 (R)
Name: David SanchezDate: November 9, 2025Course/Practice: R Data Visualization For this exercise I wanted to recreate a “dot–dash” style plot in R using ggplot2. The idea behind the chart is pretty simple: each year gets a dot to show the value, and then a vertical dashed line (the “dash”) connects the dot back down to…
-
Module # 8 Correlation Analysis and ggplot2
David Sanchez 2025-10-20 Reflection : Moved up my reflection so that it is easier to access to the reader but the following is what i noticed as a result of the outputted code. Horsepower and weight both show strong negative correlations with mpg, meaning that as either variable increases, fuel efficiency decreases. The facet plots…
-
Matrix Operations in R: Addition, Diagonals, and Custom Structures
Task 1:The addition and subtraction operations combine the corresponding elements of matrices A and B. The results show element-wise arithmetic where A + B adds each position and A – B subtracts them. Task 2:The diag() function created a 4×4 diagonal matrix where only the diagonal entries (4, 1, 2, 3) are non-zero and all…
-
Visualizing Fuel Efficiency Differences in R
For my visualization, I used the built-in mtcars dataset to compare how fuel efficiency (MPG) differs by the number of cylinders. I created a deviation chart showing how each group’s average MPG varies from the overall mean of 20.09. The chart clearly reveals that four-cylinder cars perform well above the average, six-cylinder cars fall slightly…
-
Debugging the myMean Function in R
For this week’s assignment, I explored some foundational R concepts, specifically writing and debugging functions. The task asked me to test a custom function called myMean on a provided dataset and then explain why it failed or succeeded. The Dataset The Original Function Testing the Function When I ran: I received the following error: Why…
-
The Impact of Global Crises on Drug Use: An Analytical Perspective
Final Project Advanced Statistics and Analytics Professor: Taiwo Ajani Name: David Sanchez Date: 4/20/24 Introduction: In a world increasingly prone to experiencing global crises—ranging from pandemics to geopolitical conflicts—the consequent impact on public health, particularly mental health and substance use, is profound. This analysis seeks to understand how these significant stressors are correlated with spikes…
-
Analyzing Student Credit Card Charges with Time Series Analysis
Introduction: In this blog post, we will explore a dataset of student credit card charges over a two-year period. Our goal is to understand the patterns and trends in the data and create a predictive model using exponential smoothing. We will use R to perform the analysis and discuss the results. Data: The dataset consists…