<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>Sumaiya Alvi</title>
<link>https://sumaiyaalvi.github.io/projects.html</link>
<atom:link href="https://sumaiyaalvi.github.io/projects.xml" rel="self" type="application/rss+xml"/>
<description></description>
<generator>quarto-1.8.25</generator>
<lastBuildDate>Tue, 10 Mar 2026 15:41:46 GMT</lastBuildDate>
<item>
  <title>Urban Wildlife During COVID-19: Analyzing Coyote Movement in Los Angeles</title>
  <link>https://sumaiyaalvi.github.io/projects/coyotes/</link>
  <description><![CDATA[ 




<section id="overview" class="level2">
<h2 class="anchored" data-anchor-id="overview">Overview</h2>
<p><strong>Timeline:</strong> November-December 2025<br>
<strong>Methods:</strong> Convex Hull Analysis, Buffer Analysis, Spatial Join, Kernel Density Analysis<br>
<strong>Course:</strong> GEOG 176A - Intro to GIS</p>
<p>This project examined how changes in human activity during the COVID-19 lockdowns influenced urban wildlife behavior, using <strong>coyote sightings in Los Angeles</strong> as a case study. During 2020, many people reported seeing wildlife in urban spaces more often, which raised questions about how strongly human mobility shapes animal movement in cities.</p>
<p>To explore this, my partner and I compared coyote sightings from <strong>April 2019, April 2020, and April 2021</strong> to capture conditions before, during, and after the lockdown period. Using <strong>public wildlife observation data, parking citation data as a proxy for human mobility, and ArcGIS Pro</strong>, we analyzed how the extent, distribution, and density of coyote activity changed across the three years.</p>
</section>
<section id="tools-and-skills" class="level2">
<h2 class="anchored" data-anchor-id="tools-and-skills">Tools and Skills</h2>
<ul>
<li><strong>ArcGIS Pro</strong></li>
<li><strong>Spatial Analysis</strong></li>
<li><strong>Convex Hull Analysis</strong></li>
<li><strong>Buffer Analysis</strong></li>
<li><strong>Spatial Join</strong></li>
<li><strong>Kernel Density Analysis</strong></li>
<li><strong>Map Design</strong></li>
<li><strong>Environmental Data Interpretation</strong></li>
<li><strong>Collaborative Research</strong></li>
</ul>
</section>
<section id="project-goals" class="level2">
<h2 class="anchored" data-anchor-id="project-goals">Project Goals</h2>
<p>This project focused on a few main questions:</p>
<ul>
<li>Did reduced human mobility during the COVID-19 lockdown allow coyotes to expand into new urban areas?</li>
<li>How did the spatial extent of coyote sightings change before, during, and after lockdown?</li>
<li>Was reduced human activity associated with changes in where coyotes were observed?</li>
<li>What can these patterns tell us about coexistence between wildlife and people in urban environments?</li>
</ul>
</section>
<section id="my-role" class="level2">
<h2 class="anchored" data-anchor-id="my-role">My Role</h2>
<p>This project was completed in collaboration with one partner, and responsibilities were shared evenly across all stages of the analysis. I worked extensively on importing and cleaning our CSV datasets, converting them into spatial point layers in <strong>ArcGIS Pro</strong>, and helping conduct the spatial analyses used throughout the project. We also worked together on map design, interpretation of results, and presenting our findings in a clear and visually effective way.</p>
</section>
<section id="methods" class="level2">
<h2 class="anchored" data-anchor-id="methods">Methods</h2>
<p>We combined multiple datasets and spatial analysis techniques to investigate how coyote activity changed as human mobility declined during the pandemic.</p>
<section id="data-collection-and-preparation" class="level3">
<h3 class="anchored" data-anchor-id="data-collection-and-preparation">Data Collection and Preparation</h3>
<p>We used <strong>coyote sighting data from iNaturalist</strong>, <strong>parking citation data from the Los Angeles Open Data Portal</strong>, and <strong>land cover data from ArcGIS Online</strong>. All datasets were filtered spatially to <strong>Los Angeles County</strong> and temporally to <strong>April 2019, April 2020, and April 2021</strong> in order to control for seasonal variation and make meaningful comparisons across years.</p>
<p>After filtering the data, we imported CSV files into ArcGIS Pro and converted them into spatial point layers using latitude and longitude fields. This preparation allowed us to compare wildlife sightings and human mobility patterns within the same geographic space.</p>
</section>
<section id="convex-hull-analysis" class="level3">
<h3 class="anchored" data-anchor-id="convex-hull-analysis">Convex Hull Analysis</h3>
<p>To examine the overall spatial extent of coyote sightings, we used <strong>convex hull analysis</strong> for each study year. This created polygons representing the outer boundary of sightings and allowed us to compare how far coyote activity extended across Los Angeles over time.</p>
<p>The analysis showed that the geographic extent of coyote sightings expanded noticeably in <strong>April 2020</strong> compared to <strong>2019</strong>, suggesting that coyotes occupied a wider range of areas during the lockdown. In <strong>2021</strong>, the extent contracted again, appearing more similar to pre-lockdown conditions.</p>
</section>
<section id="buffer-analysis-and-spatial-join" class="level3">
<h3 class="anchored" data-anchor-id="buffer-analysis-and-spatial-join">Buffer Analysis and Spatial Join</h3>
<p>To investigate the relationship between wildlife presence and human activity, we created <strong>1500-meter buffers</strong> around coyote sightings and used a <strong>spatial join</strong> to count nearby parking citations. Parking citations served as a proxy for human mobility, since fewer people moving around the city would likely correspond with fewer citations being issued.</p>
<p>This analysis revealed a sharp drop in citations near coyote sightings during lockdown. In <strong>April 2019</strong>, there were <strong>5,530</strong> parking citations within 1500 meters of coyote sightings; in <strong>April 2020</strong>, that number dropped to <strong>1,452</strong>; and in <strong>April 2021</strong>, it increased to <strong>10,579</strong>, indicating a strong rebound in human mobility.</p>
</section>
<section id="kernel-density-analysis" class="level3">
<h3 class="anchored" data-anchor-id="kernel-density-analysis">Kernel Density Analysis</h3>
<p>We also used <strong>kernel density analysis</strong> to identify areas with higher concentrations of coyote sightings. The 2020 density maps showed a more widespread distribution of coyote activity compared to the other years, with increased sightings in more urbanized areas such as the <strong>San Fernando Valley</strong> and areas near <strong>Santa Monica</strong>.</p>
<p>This suggested that during the lockdown, coyotes were not only observed more often, but were also active across a broader range of urban environments rather than remaining concentrated near parks or natural open spaces.</p>
</section>
</section>
<section id="key-takeaways" class="level2">
<h2 class="anchored" data-anchor-id="key-takeaways">Key Takeaways</h2>
<p>A few major patterns emerged from the analysis:</p>
<ul>
<li>The spatial extent of coyote sightings expanded during the 2020 lockdown compared to 2019 and 2021</li>
<li>Parking citations near coyote sightings dropped sharply in 2020, reflecting reduced human mobility</li>
<li>Kernel density maps showed more widespread coyote activity in urban areas during lockdown</li>
<li>Together, these findings suggest that reduced human presence coincided with broader and more visible coyote movement throughout Los Angeles</li>
</ul>
</section>
<section id="deliverables" class="level2">
<h2 class="anchored" data-anchor-id="deliverables">Deliverables</h2>
<p>This project resulted in several final deliverables, which are linked below.</p>
<ul>
<li><a href="../../projects/coyotes/176A.pdf" target="_blank">View the final presentation (PDF)</a></li>
<li><a href="https://docs.google.com/document/d/1EPLdGc6Zpx2B4ksjTrxDC-OHBIef4WEUCXclU9oSY7s/edit?usp=sharing" target="_blank">Read the written project report</a></li>
</ul>
</section>
<section id="reflection" class="level2">
<h2 class="anchored" data-anchor-id="reflection">Reflection</h2>
<p>This project gave me hands-on experience using <strong>ArcGIS Pro</strong> to work with spatial data and apply analytical techniques to a real-world environmental question. It strengthened my skills in data preparation, spatial thinking, and map-based storytelling, while also showing me how geographic analysis can be used to better understand the relationship between people and wildlife in urban environments.</p>
<p>What I found especially valuable was being able to connect technical spatial methods to a broader question about coexistence and city planning. The project reinforced how changes in human behavior can shape ecological patterns in ways that become visible through careful spatial analysis.</p>
<iframe src="../../projects/coyotes/176A.pdf" width="100%" height="800px">
</iframe>


</section>

 ]]></description>
  <category>ArcGIS Pro</category>
  <category>Spatial Analysis</category>
  <guid>https://sumaiyaalvi.github.io/projects/coyotes/</guid>
  <pubDate>Tue, 10 Mar 2026 15:41:46 GMT</pubDate>
  <media:content url="https://sumaiyaalvi.github.io/projects/coyotes/coyote.png" medium="image" type="image/png" height="74" width="144"/>
</item>
<item>
  <title>What Factors Influence My Daily Screen Time?</title>
  <link>https://sumaiyaalvi.github.io/projects/screentime/</link>
  <description><![CDATA[ 




<section id="overview" class="level2">
<h2 class="anchored" data-anchor-id="overview">Overview</h2>
<p><strong>Timeline:</strong> January–February 2026<br>
<strong>Course:</strong> ENV S 193DS - Statistics for Environmental Science<br>
<strong>Methods:</strong> Daily data collection, exploratory visualization, affective visualization, trend analysis</p>
<p>This project explored how my daily screen time changes depending on different parts of my routine during the school quarter. I collected data from <strong>January to February</strong> on my daily screen time, along with other factors such as <strong>class and study time, sleep, commuting time, social plans, and whether I had an exam or project due</strong>.</p>
<p>The goal of this project was both analytical and personal. I wanted to better understand my own habits, identify patterns that might explain why my screen time changes from day to day, and think about how data can be represented in a way that feels more reflective and human. To do this, I combined standard plots made in <strong>R with ggplot2</strong> and a hand-drawn <strong>affective visualization</strong> inspired by Giorgia Lupi and Stefanie Posavec’s <em>Week of Goodbyes</em>.</p>
</section>
<section id="tools-and-skills" class="level2">
<h2 class="anchored" data-anchor-id="tools-and-skills">Tools and Skills</h2>
<ul>
<li><strong>R</strong></li>
<li><strong>ggplot2</strong></li>
<li><strong>Exploratory Data Analysis</strong></li>
<li><strong>Personal Data Collection</strong></li>
<li><strong>Affective Visualization</strong></li>
<li><strong>Visual Encoding</strong></li>
<li><strong>Data Interpretation</strong></li>
<li><strong>Reflective Design</strong></li>
</ul>
</section>
<section id="project-goals" class="level2">
<h2 class="anchored" data-anchor-id="project-goals">Project Goals</h2>
<p>This project focused on a few main questions:</p>
<ul>
<li>How does my screen time vary across different days of the week?</li>
<li>Is there a relationship between class/study time and screen time?</li>
<li>How do other contextual factors, such as sleep, social plans, commuting, or deadlines, shape my daily screen use?</li>
<li>How can personal data be visualized in a way that captures both patterns and lived experience?</li>
</ul>
</section>
<section id="methods" class="level2">
<h2 class="anchored" data-anchor-id="methods">Methods</h2>
<p>This project combined quantitative data analysis with more interpretive visual design.</p>
<section id="data-collection" class="level3">
<h3 class="anchored" data-anchor-id="data-collection">Data Collection</h3>
<p>I recorded daily observations on my <strong>screen time</strong>, measured in hours, along with several explanatory variables related to my routine. These included:</p>
<ul>
<li><strong>Class + study time (hours)</strong></li>
<li><strong>Day of the week</strong></li>
<li><strong>Sleep hours from the night before</strong></li>
<li><strong>Time spent commuting</strong></li>
<li><strong>Whether I had social plans</strong></li>
<li><strong>Whether I had an exam or project due</strong></li>
</ul>
<p>Because the data was collected over a specific academic quarter, the results are shaped by my schedule during that time. Even so, the project still helped reveal broader patterns in how my responsibilities and habits interact.</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(tidyverse) <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#general use</span></span>
<span id="cb1-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(DT) <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#package for making interactive tables</span></span>
<span id="cb1-3"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(plotly) <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#package for making interactive figures</span></span>
<span id="cb1-4"></span>
<span id="cb1-5">screentime <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">read_csv</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"screentime.csv"</span>)</span></code></pre></div></div>
</div>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb2-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Using package DT to create an interactive table</span></span>
<span id="cb2-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">datatable</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">data =</span> screentime)</span></code></pre></div></div>
<div class="cell-output-display">
<div class="datatables html-widget html-fill-item" id="htmlwidget-40c5ed2999497d3fce2a" style="width:100%;height:auto;"></div>
<script type="application/json" data-for="htmlwidget-40c5ed2999497d3fce2a">{"x":{"filter":"none","vertical":false,"data":[["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"],["01/11/2026","01/12/2026","01/13/2026","01/14/2026","01/23/2026","01/24/2026","01/25/2026","01/26/2026","01/27/2026","01/28/2026","01/29/2026","01/30/2026","01/31/2026","02/01/2026","02/02/2026","02/03/2026","02/04/2026","02/05/2026","02/06/2026","02/07/2026","02/08/2026","02/09/2026","02/10/2026","02/11/2026","02/12/2026","02/13/2026","02/18/2026","02/19/2026","02/21/2026","02/22/2026"],["Sunday","Monday","Tuesday","Wednesday","Friday","Saturday","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Wednesday","Thursday","Saturday","Sunday"],[7.85,5.62,4,5.68,3.73,6.92,4.17,4.82,3.6,6.4,6.65,7.22,5.25,5.82,5.65,6.85,4.13,5.08,4.22,3.5,4.3,5.8,6.22,6.4,2.93,3.25,4.07,5.4,4.22,3.63],[0,4,2.5,3,2,5,9,6,7,3,4,2,0,0,7,3,5,6,5.5,9.5,6,8.5,7,5,2,0,5,3,1,3],[30,40,45,60,80,45,30,40,60,50,30,185,120,185,60,60,50,75,20,35,40,60,60,45,40,75,60,60,120,45],["Yes","No","No","No","Yes","Yes","Yes","No","Yes","No","No","Yes","Yes","Yes","No","No","Yes","Yes","Yes","No","No","No","No","Yes","Yes","Yes","Yes","Yes","Yes","Yes"],[8,9,9,7,7,7,7.5,6,6,8,8,6.5,6,5.5,9,9,9,9,7.5,7,9,8,7,7.5,8,8,8,8,7,7.5]],"container":"<table class=\"display\">\n  <thead>\n    <tr>\n      <th> <\/th>\n      <th>Date<\/th>\n      <th>Day of Week<\/th>\n      <th>Screen Time (hours)<\/th>\n      <th>Class + Study time (hours)<\/th>\n      <th>Time spent commuting (minutes)<\/th>\n      <th>Social Plans<\/th>\n      <th>Sleep Time (hours) the night before<\/th>\n    <\/tr>\n  <\/thead>\n<\/table>","options":{"columnDefs":[{"className":"dt-right","targets":[3,4,5,7]},{"orderable":false,"targets":0},{"name":" ","targets":0},{"name":"Date","targets":1},{"name":"Day of Week","targets":2},{"name":"Screen Time (hours)","targets":3},{"name":"Class + Study time (hours)","targets":4},{"name":"Time spent commuting (minutes)","targets":5},{"name":"Social Plans","targets":6},{"name":"Sleep Time (hours) the night before","targets":7}],"order":[],"autoWidth":false,"orderClasses":false}},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</section>
</section>
<section id="code-based-visualizations" class="level1">
<h1>Code-Based Visualizations</h1>
<section id="visualization-1-screen-time-across-days-of-the-week" class="level2">
<h2 class="anchored" data-anchor-id="visualization-1-screen-time-across-days-of-the-week">Visualization 1: Screen Time Across Days of the Week</h2>
<p>This visualization shows how my daily screen time varies across different days of the week. Each point represents one day, allowing variation in screen time to be compared across weekdays and weekends.</p>
<p>I used <strong>jittered points</strong> so that observations on the same day would not overlap, and assigned a different color to each day of the week to make patterns easier to compare visually.</p>
<p>The code also extracts the <strong>most recent observation date</strong> from the dataset and displays it in the subtitle so the time frame of the data is clear.</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb3-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#finding most recent observation date</span></span>
<span id="cb3-2">most_recent_date <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">max</span>(screentime<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>Date)</span>
<span id="cb3-3"></span>
<span id="cb3-4">plot1_static <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ggplot</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">data =</span> screentime, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#starting with my dataframe</span></span>
<span id="cb3-5">       <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">aes</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">x =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Day of Week</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#x-axis: categorical variable</span></span>
<span id="cb3-6">           <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">y =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Screen Time (hours)</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#y-axis: response variable</span></span>
<span id="cb3-7">           <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">color =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Day of Week</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#coloring by day of week</span></span>
<span id="cb3-8">           <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">text =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">paste</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Date:"</span>, Date, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#for interactive plot points</span></span>
<span id="cb3-9">                        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;br&gt;Day:"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Day of Week</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span>,</span>
<span id="cb3-10">                        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;br&gt;Screen Time:"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Screen Time (hours)</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"hours"</span>))) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> </span>
<span id="cb3-11">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">geom_jitter</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">width =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.15</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#adding horizontal jitter</span></span>
<span id="cb3-12">              <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">alpha =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.7</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#making points slightly transparent</span></span>
<span id="cb3-13">              <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">size =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#point size</span></span>
<span id="cb3-14">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">labs</span>(</span>
<span id="cb3-15">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">x =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Day of Week"</span>,</span>
<span id="cb3-16">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">y =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Screen Time (hours)"</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#changing axes labels</span></span>
<span id="cb3-17">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">title =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Screen time by day of the week"</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#title summarizing main message,</span></span>
<span id="cb3-18">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#subtitle for most recent observation</span></span>
<span id="cb3-19">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">subtitle =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">paste</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Most recent observation:"</span>, most_recent_date)</span>
<span id="cb3-20">  ) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> </span>
<span id="cb3-21">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">scale_color_manual</span>( <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#changing colors from default</span></span>
<span id="cb3-22">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">values =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">c</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Monday"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"firebrick"</span>,</span>
<span id="cb3-23">               <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Tuesday"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"darkorange"</span>,</span>
<span id="cb3-24">               <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Wednesday"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"yellow3"</span>,</span>
<span id="cb3-25">               <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Thursday"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"green3"</span>,</span>
<span id="cb3-26">               <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Friday"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"blue4"</span>,</span>
<span id="cb3-27">               <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Saturday"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"slateblue4"</span>,</span>
<span id="cb3-28">               <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Sunday"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"pink3"</span>)</span>
<span id="cb3-29">  ) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span id="cb3-30">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">theme_light</span>() <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#changing theme from default</span></span>
<span id="cb3-31">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">theme</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">legend.position =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"none"</span>) <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#removing legend</span></span>
<span id="cb3-32"></span>
<span id="cb3-33"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># convert to interactive plotly</span></span>
<span id="cb3-34">plot1_interactive <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ggplotly</span>(plot1_static, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">tooltip =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"text"</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb3-35">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">layout</span>(</span>
<span id="cb3-36">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">font =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">list</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">family =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Sans"</span>),  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#editing font for figure title and axes</span></span>
<span id="cb3-37">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">hoverlabel =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">list</span>(</span>
<span id="cb3-38">      <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">font =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">list</span>(</span>
<span id="cb3-39">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">family =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Sans"</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#hover text font</span></span>
<span id="cb3-40">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">size =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">13</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#hover text font size</span></span>
<span id="cb3-41">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">color =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#FFFFFF"</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#font color for hover text</span></span>
<span id="cb3-42">      )</span>
<span id="cb3-43">    )</span>
<span id="cb3-44">  )</span>
<span id="cb3-45"></span>
<span id="cb3-46"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#display interactive version of the plot</span></span>
<span id="cb3-47">plot1_interactive</span></code></pre></div></div>
<div class="cell-output-display">
<div class="plotly html-widget html-fill-item" id="htmlwidget-92fb028ac4b7628fb925" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-92fb028ac4b7628fb925">{"x":{"data":[{"x":[0.92970857000909746,1.0488837973447516,1.1433119719615206,1.0592830711510033],"y":[3.73318071629107,7.2201415937878188,4.2249665606096389,3.2550611713305115],"text":["Date: 01/23/2026 <br>Day: Friday <br>Screen Time: 3.73 hours","Date: 01/30/2026 <br>Day: Friday <br>Screen Time: 7.22 hours","Date: 02/06/2026 <br>Day: Friday <br>Screen Time: 4.22 hours","Date: 02/13/2026 <br>Day: Friday <br>Screen Time: 3.25 hours"],"type":"scatter","mode":"markers","marker":{"autocolorscale":false,"color":"rgba(0,0,139,1)","opacity":0.69999999999999996,"size":7.559055118110237,"symbol":"circle","line":{"width":1.8897637795275593,"color":"rgba(0,0,139,1)"}},"hoveron":"points","name":"Friday","legendgroup":"Friday","showlegend":true,"xaxis":"x","yaxis":"y","hoverinfo":"text","frame":null},{"x":[1.9475037390831857,1.9665734565118327,2.1173363166395576,1.8652189296670258],"y":[5.6191767390705643,4.8216920155845582,5.6560215558782225,5.8014238646216691],"text":["Date: 01/12/2026 <br>Day: Monday <br>Screen Time: 5.62 hours","Date: 01/26/2026 <br>Day: Monday <br>Screen Time: 4.82 hours","Date: 02/02/2026 <br>Day: Monday <br>Screen Time: 5.65 hours","Date: 02/09/2026 <br>Day: Monday <br>Screen Time: 5.8 hours"],"type":"scatter","mode":"markers","marker":{"autocolorscale":false,"color":"rgba(178,34,34,1)","opacity":0.69999999999999996,"size":7.559055118110237,"symbol":"circle","line":{"width":1.8897637795275593,"color":"rgba(178,34,34,1)"}},"hoveron":"points","name":"Monday","legendgroup":"Monday","showlegend":true,"xaxis":"x","yaxis":"y","hoverinfo":"text","frame":null},{"x":[2.8839899910846727,2.976405355660245,3.0407940790057184,2.9897699325811118],"y":[6.9132130205854772,5.2439784760847683,3.5010594131127002,4.2143048506304615],"text":["Date: 01/24/2026 <br>Day: Saturday <br>Screen Time: 6.92 hours","Date: 01/31/2026 <br>Day: Saturday <br>Screen Time: 5.25 hours","Date: 02/07/2026 <br>Day: Saturday <br>Screen Time: 3.5 hours","Date: 02/21/2026 <br>Day: Saturday <br>Screen Time: 4.22 hours"],"type":"scatter","mode":"markers","marker":{"autocolorscale":false,"color":"rgba(71,60,139,1)","opacity":0.69999999999999996,"size":7.559055118110237,"symbol":"circle","line":{"width":1.8897637795275593,"color":"rgba(71,60,139,1)"}},"hoveron":"points","name":"Saturday","legendgroup":"Saturday","showlegend":true,"xaxis":"x","yaxis":"y","hoverinfo":"text","frame":null},{"x":[3.9247608610196041,3.9055028960341587,4.0778039479162542,4.1318177740555253,3.9931336882524193],"y":[7.8570010642446579,4.1779450249038641,5.8224377322718501,4.3004669872075318,3.6372412377372383],"text":["Date: 01/11/2026 <br>Day: Sunday <br>Screen Time: 7.85 hours","Date: 01/25/2026 <br>Day: Sunday <br>Screen Time: 4.17 hours","Date: 02/01/2026 <br>Day: Sunday <br>Screen Time: 5.82 hours","Date: 02/08/2026 <br>Day: Sunday <br>Screen Time: 4.3 hours","Date: 02/22/2026 <br>Day: Sunday <br>Screen Time: 3.63 hours"],"type":"scatter","mode":"markers","marker":{"autocolorscale":false,"color":"rgba(205,145,158,1)","opacity":0.69999999999999996,"size":7.559055118110237,"symbol":"circle","line":{"width":1.8897637795275593,"color":"rgba(205,145,158,1)"}},"hoveron":"points","name":"Sunday","legendgroup":"Sunday","showlegend":true,"xaxis":"x","yaxis":"y","hoverinfo":"text","frame":null},{"x":[5.0686919292202219,5.0218961669830602,4.9259946176549416,5.0890519244829191],"y":[6.6528405983224514,5.0747036201283331,2.9287238051407041,5.4033760267049082],"text":["Date: 01/29/2026 <br>Day: Thursday <br>Screen Time: 6.65 hours","Date: 02/05/2026 <br>Day: Thursday <br>Screen Time: 5.08 hours","Date: 02/12/2026 <br>Day: Thursday <br>Screen Time: 2.93 hours","Date: 02/19/2026 <br>Day: Thursday <br>Screen Time: 5.4 hours"],"type":"scatter","mode":"markers","marker":{"autocolorscale":false,"color":"rgba(0,205,0,1)","opacity":0.69999999999999996,"size":7.559055118110237,"symbol":"circle","line":{"width":1.8897637795275593,"color":"rgba(0,205,0,1)"}},"hoveron":"points","name":"Thursday","legendgroup":"Thursday","showlegend":true,"xaxis":"x","yaxis":"y","hoverinfo":"text","frame":null},{"x":[6.0946327712154016,6.0057437469251456,6.0180238002212718,5.8937804565997798],"y":[4.0002740958295764,3.5964594603143634,6.849530541215092,6.2232415672056378],"text":["Date: 01/13/2026 <br>Day: Tuesday <br>Screen Time: 4 hours","Date: 01/27/2026 <br>Day: Tuesday <br>Screen Time: 3.6 hours","Date: 02/03/2026 <br>Day: Tuesday <br>Screen Time: 6.85 hours","Date: 02/10/2026 <br>Day: Tuesday <br>Screen Time: 6.22 hours"],"type":"scatter","mode":"markers","marker":{"autocolorscale":false,"color":"rgba(255,140,0,1)","opacity":0.69999999999999996,"size":7.559055118110237,"symbol":"circle","line":{"width":1.8897637795275593,"color":"rgba(255,140,0,1)"}},"hoveron":"points","name":"Tuesday","legendgroup":"Tuesday","showlegend":true,"xaxis":"x","yaxis":"y","hoverinfo":"text","frame":null},{"x":[7.0305166615173222,6.9005028490442779,7.0986272069159897,7.0772510715760291,7.0941219923552126],"y":[5.6742943628542122,6.3977156362272805,4.1361758597791196,6.3953667231723665,4.0620528391785919],"text":["Date: 01/14/2026 <br>Day: Wednesday <br>Screen Time: 5.68 hours","Date: 01/28/2026 <br>Day: Wednesday <br>Screen Time: 6.4 hours","Date: 02/04/2026 <br>Day: Wednesday <br>Screen Time: 4.13 hours","Date: 02/11/2026 <br>Day: Wednesday <br>Screen Time: 6.4 hours","Date: 02/18/2026 <br>Day: Wednesday <br>Screen Time: 4.07 hours"],"type":"scatter","mode":"markers","marker":{"autocolorscale":false,"color":"rgba(205,205,0,1)","opacity":0.69999999999999996,"size":7.559055118110237,"symbol":"circle","line":{"width":1.8897637795275593,"color":"rgba(205,205,0,1)"}},"hoveron":"points","name":"Wednesday","legendgroup":"Wednesday","showlegend":true,"xaxis":"x","yaxis":"y","hoverinfo":"text","frame":null}],"layout":{"margin":{"t":40.840182648401829,"r":7.3059360730593621,"b":37.260273972602747,"l":31.415525114155255},"plot_bgcolor":"rgba(255,255,255,1)","paper_bgcolor":"rgba(255,255,255,1)","font":{"color":"rgba(0,0,0,1)","family":"Sans","size":14.611872146118724},"title":{"text":"Screen time by day of the week","font":{"color":"rgba(0,0,0,1)","family":"","size":17.534246575342465},"x":0,"xref":"paper"},"xaxis":{"domain":[0,1],"automargin":true,"type":"linear","autorange":false,"range":[0.40000000000000002,7.5999999999999996],"tickmode":"array","ticktext":["Friday","Monday","Saturday","Sunday","Thursday","Tuesday","Wednesday"],"tickvals":[1,2,3,4.0000000000000009,5,6,7],"categoryorder":"array","categoryarray":["Friday","Monday","Saturday","Sunday","Thursday","Tuesday","Wednesday"],"nticks":null,"ticks":"outside","tickcolor":"rgba(179,179,179,1)","ticklen":3.6529680365296811,"tickwidth":0.33208800332088001,"showticklabels":true,"tickfont":{"color":"rgba(77,77,77,1)","family":"","size":11.68949771689498},"tickangle":-0,"showline":false,"linecolor":null,"linewidth":0,"showgrid":true,"gridcolor":"rgba(222,222,222,1)","gridwidth":0.33208800332088001,"zeroline":false,"anchor":"y","title":{"text":"Day of Week","font":{"color":"rgba(0,0,0,1)","family":"","size":14.611872146118724}},"hoverformat":".2f"},"yaxis":{"domain":[0,1],"automargin":true,"type":"linear","autorange":false,"range":[2.6823099421855066,8.1034149271998555],"tickmode":"array","ticktext":["3","4","5","6","7","8"],"tickvals":[3,4,5,6,7,8],"categoryorder":"array","categoryarray":["3","4","5","6","7","8"],"nticks":null,"ticks":"outside","tickcolor":"rgba(179,179,179,1)","ticklen":3.6529680365296811,"tickwidth":0.33208800332088001,"showticklabels":true,"tickfont":{"color":"rgba(77,77,77,1)","family":"","size":11.68949771689498},"tickangle":-0,"showline":false,"linecolor":null,"linewidth":0,"showgrid":true,"gridcolor":"rgba(222,222,222,1)","gridwidth":0.33208800332088001,"zeroline":false,"anchor":"x","title":{"text":"Screen Time (hours)","font":{"color":"rgba(0,0,0,1)","family":"","size":14.611872146118724}},"hoverformat":".2f"},"shapes":[{"type":"rect","fillcolor":"rgba(255,255,255,1)","line":{"color":"rgba(179,179,179,1)","width":0.66417600664176002,"linetype":"solid"},"yref":"paper","xref":"paper","layer":"below","x0":0,"x1":1,"y0":0,"y1":1}],"showlegend":false,"legend":{"bgcolor":"rgba(255,255,255,1)","bordercolor":"transparent","borderwidth":1.8897637795275593,"font":{"color":"rgba(0,0,0,1)","family":"","size":11.68949771689498}},"hovermode":"closest","barmode":"relative","hoverlabel":{"font":{"family":"Sans","size":13,"color":"#FFFFFF"}}},"config":{"doubleClick":"reset","modeBarButtonsToAdd":["hoverclosest","hovercompare"],"showSendToCloud":false},"source":"A","attrs":{"48356b8e76fb":{"x":{},"y":{},"colour":{},"text":{},"type":"scatter"}},"cur_data":"48356b8e76fb","visdat":{"48356b8e76fb":["function (y) ","x"]},"highlight":{"on":"plotly_click","persistent":false,"dynamic":false,"selectize":false,"opacityDim":0.20000000000000001,"selected":{"opacity":1},"debounce":0},"shinyEvents":["plotly_hover","plotly_click","plotly_selected","plotly_relayout","plotly_brushed","plotly_brushing","plotly_clickannotation","plotly_doubleclick","plotly_deselect","plotly_afterplot","plotly_sunburstclick"],"base_url":"https://plot.ly"},"evals":[],"jsHooks":[]}</script>
</div>
</div>
<p><strong>Figure 1.</strong> Screen time (hours) across days of the week. Each point represents one daily observation, showing variation in screen use depending on the day. Screen time appears somewhat higher and more variable on weekends compared to some weekdays, suggesting that daily schedule may influence overall screen use.</p>
</section>
<section id="visualization-2-screen-time-vs.-classstudy-time" class="level2">
<h2 class="anchored" data-anchor-id="visualization-2-screen-time-vs.-classstudy-time">Visualization 2: Screen Time vs.&nbsp;Class/Study Time</h2>
<p>This visualization examines the relationship between <strong>class/study time and screen time</strong> using a scatterplot. Each point represents one day, allowing the two variables to be compared directly.</p>
<p>A <strong>linear trend line</strong> is added to summarize the overall relationship between the variables. This helps identify whether days with more academic work tend to correspond to higher or lower screen time.</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb4-1">plot2_static <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ggplot</span>(</span>
<span id="cb4-2">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">data =</span> screentime, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#starting with my dataframe</span></span>
<span id="cb4-3">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">aes</span>(</span>
<span id="cb4-4">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">x =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Class + Study time (hours)</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#x-axis: continuous predictor</span></span>
<span id="cb4-5">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">y =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Screen Time (hours)</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#y-axis: response variable</span></span>
<span id="cb4-6">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#custom hover text for the interactive plot</span></span>
<span id="cb4-7">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">text =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">paste</span>(</span>
<span id="cb4-8">      <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Date:"</span>, Date,</span>
<span id="cb4-9">      <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;br&gt;Class + Study Time:"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Class + Study time (hours)</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"hours"</span>,</span>
<span id="cb4-10">      <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;br&gt;Screen Time:"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Screen Time (hours)</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"hours"</span></span>
<span id="cb4-11">    )</span>
<span id="cb4-12">  )</span>
<span id="cb4-13">) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span id="cb4-14">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">geom_point</span>(</span>
<span id="cb4-15">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">color =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"darkorange"</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#changing color from default</span></span>
<span id="cb4-16">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">size =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#point size</span></span>
<span id="cb4-17">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">alpha =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.8</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#making points slightly transparent</span></span>
<span id="cb4-18">  ) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span id="cb4-19">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#adding linear regression trend line to show overall relationship</span></span>
<span id="cb4-20">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">geom_smooth</span>(</span>
<span id="cb4-21">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">method =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"lm"</span>,</span>
<span id="cb4-22">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">se =</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#showing confidence interval around regression line</span></span>
<span id="cb4-23">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">color =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#014f86"</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#custom color for trend line</span></span>
<span id="cb4-24">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">inherit.aes =</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#preventing hover text from applying to regression line</span></span>
<span id="cb4-25">    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">aes</span>(</span>
<span id="cb4-26">      <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">x =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Class + Study time (hours)</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span>,</span>
<span id="cb4-27">      <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">y =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">Screen Time (hours)</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span></span>
<span id="cb4-28">    )</span>
<span id="cb4-29">  ) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span id="cb4-30">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">labs</span>(</span>
<span id="cb4-31">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">x =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Class + Study Time (hours)"</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#changing axes labels</span></span>
<span id="cb4-32">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">y =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Screen Time (hours)"</span>,</span>
<span id="cb4-33">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">title =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Relationship between class/study time and screen time"</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#title summarizing main message</span></span>
<span id="cb4-34">    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#subtitle showing most recent observation date</span></span>
<span id="cb4-35">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">subtitle =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">paste</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Most recent observation:"</span>, most_recent_date)</span>
<span id="cb4-36">  ) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span id="cb4-37">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">theme_light</span>() <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#changing theme from default</span></span>
<span id="cb4-38"></span>
<span id="cb4-39"></span>
<span id="cb4-40"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#using plotly package to make the figure interactive</span></span>
<span id="cb4-41">plot2_interactive <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ggplotly</span>(plot2_static, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">tooltip =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"text"</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb4-42">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">layout</span>(</span>
<span id="cb4-43">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">font =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">list</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">family =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Sans"</span>), <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#editing font for figure title and axes</span></span>
<span id="cb4-44">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">hoverlabel =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">list</span>(</span>
<span id="cb4-45">      <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">font =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">list</span>(</span>
<span id="cb4-46">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">family =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Sans"</span>,</span>
<span id="cb4-47">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">size =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">13</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#font size for hover text</span></span>
<span id="cb4-48">        <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">color =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#FFFFFF"</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#font color for hover text</span></span>
<span id="cb4-49">      )</span>
<span id="cb4-50">    )</span>
<span id="cb4-51">  )</span>
<span id="cb4-52"></span>
<span id="cb4-53"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#display interactive version of the plot</span></span>
<span id="cb4-54">plot2_interactive</span></code></pre></div></div>
<div class="cell-output-display">
<div class="plotly html-widget html-fill-item" id="htmlwidget-b30f7a8e500a07c4cefa" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-b30f7a8e500a07c4cefa">{"x":{"data":[{"x":[0,4,2.5,3,2,5,9,6,7,3,4,2,0,0,7,3,5,6,5.5,9.5,6,8.5,7,5,2,0,5,3,1,3],"y":[7.8499999999999996,5.6200000000000001,4,5.6799999999999997,3.73,6.9199999999999999,4.1699999999999999,4.8200000000000003,3.6000000000000001,6.4000000000000004,6.6500000000000004,7.2199999999999998,5.25,5.8200000000000003,5.6500000000000004,6.8499999999999996,4.1299999999999999,5.0800000000000001,4.2199999999999998,3.5,4.2999999999999998,5.7999999999999998,6.2199999999999998,6.4000000000000004,2.9300000000000002,3.25,4.0700000000000003,5.4000000000000004,4.2199999999999998,3.6299999999999999],"text":["Date: 01/11/2026 <br>Class + Study Time: 0 hours <br>Screen Time: 7.85 hours","Date: 01/12/2026 <br>Class + Study Time: 4 hours <br>Screen Time: 5.62 hours","Date: 01/13/2026 <br>Class + Study Time: 2.5 hours <br>Screen Time: 4 hours","Date: 01/14/2026 <br>Class + Study Time: 3 hours <br>Screen Time: 5.68 hours","Date: 01/23/2026 <br>Class + Study Time: 2 hours <br>Screen Time: 3.73 hours","Date: 01/24/2026 <br>Class + Study Time: 5 hours <br>Screen Time: 6.92 hours","Date: 01/25/2026 <br>Class + Study Time: 9 hours <br>Screen Time: 4.17 hours","Date: 01/26/2026 <br>Class + Study Time: 6 hours <br>Screen Time: 4.82 hours","Date: 01/27/2026 <br>Class + Study Time: 7 hours <br>Screen Time: 3.6 hours","Date: 01/28/2026 <br>Class + Study Time: 3 hours <br>Screen Time: 6.4 hours","Date: 01/29/2026 <br>Class + Study Time: 4 hours <br>Screen Time: 6.65 hours","Date: 01/30/2026 <br>Class + Study Time: 2 hours <br>Screen Time: 7.22 hours","Date: 01/31/2026 <br>Class + Study Time: 0 hours <br>Screen Time: 5.25 hours","Date: 02/01/2026 <br>Class + Study Time: 0 hours <br>Screen Time: 5.82 hours","Date: 02/02/2026 <br>Class + Study Time: 7 hours <br>Screen Time: 5.65 hours","Date: 02/03/2026 <br>Class + Study Time: 3 hours <br>Screen Time: 6.85 hours","Date: 02/04/2026 <br>Class + Study Time: 5 hours <br>Screen Time: 4.13 hours","Date: 02/05/2026 <br>Class + Study Time: 6 hours <br>Screen Time: 5.08 hours","Date: 02/06/2026 <br>Class + Study Time: 5.5 hours <br>Screen Time: 4.22 hours","Date: 02/07/2026 <br>Class + Study Time: 9.5 hours <br>Screen Time: 3.5 hours","Date: 02/08/2026 <br>Class + Study Time: 6 hours <br>Screen Time: 4.3 hours","Date: 02/09/2026 <br>Class + Study Time: 8.5 hours <br>Screen Time: 5.8 hours","Date: 02/10/2026 <br>Class + Study Time: 7 hours <br>Screen Time: 6.22 hours","Date: 02/11/2026 <br>Class + Study Time: 5 hours <br>Screen Time: 6.4 hours","Date: 02/12/2026 <br>Class + Study Time: 2 hours <br>Screen Time: 2.93 hours","Date: 02/13/2026 <br>Class + Study Time: 0 hours <br>Screen Time: 3.25 hours","Date: 02/18/2026 <br>Class + Study Time: 5 hours <br>Screen Time: 4.07 hours","Date: 02/19/2026 <br>Class + Study Time: 3 hours <br>Screen Time: 5.4 hours","Date: 02/21/2026 <br>Class + Study Time: 1 hours <br>Screen Time: 4.22 hours","Date: 02/22/2026 <br>Class + Study Time: 3 hours <br>Screen Time: 3.63 hours"],"type":"scatter","mode":"markers","marker":{"autocolorscale":false,"color":"rgba(255,140,0,1)","opacity":0.80000000000000004,"size":7.559055118110237,"symbol":"circle","line":{"width":1.8897637795275593,"color":"rgba(255,140,0,1)"}},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","frame":null},{"x":[0,0.12025316455696203,0.24050632911392406,0.36075949367088611,0.48101265822784811,0.60126582278481011,0.72151898734177222,0.84177215189873422,0.96202531645569622,1.0822784810126582,1.2025316455696202,1.3227848101265822,1.4430379746835444,1.5632911392405064,1.6835443037974684,1.8037974683544304,1.9240506329113924,2.0443037974683547,2.1645569620253164,2.2848101265822787,2.4050632911392404,2.5253164556962027,2.6455696202531644,2.7658227848101267,2.8860759493670889,3.0063291139240507,3.1265822784810129,3.2468354430379747,3.3670886075949369,3.4873417721518987,3.6075949367088609,3.7278481012658227,3.8481012658227849,3.9683544303797471,4.0886075949367093,4.2088607594936711,4.3291139240506329,4.4493670886075947,4.5696202531645573,4.6898734177215191,4.8101265822784809,4.9303797468354436,5.0506329113924053,5.1708860759493671,5.2911392405063289,5.4113924050632916,5.5316455696202533,5.6518987341772151,5.7721518987341778,5.8924050632911396,6.0126582278481013,6.1329113924050631,6.2531645569620258,6.3734177215189876,6.4936708860759493,6.6139240506329111,6.7341772151898738,6.8544303797468356,6.9746835443037973,7.09493670886076,7.2151898734177218,7.3354430379746836,7.4556962025316453,7.575949367088608,7.6962025316455698,7.8164556962025316,7.9367088607594942,8.0569620253164551,8.1772151898734187,8.2974683544303804,8.4177215189873422,8.537974683544304,8.6582278481012658,8.7784810126582276,8.8987341772151893,9.0189873417721529,9.1392405063291147,9.2594936708860764,9.3797468354430382,9.5],"y":[5.3976812048948846,5.3893891322739123,5.3810970596529408,5.3728049870319685,5.3645129144109962,5.3562208417900239,5.3479287691690525,5.3396366965480802,5.3313446239271078,5.3230525513061364,5.3147604786851641,5.3064684060641918,5.2981763334432204,5.2898842608222481,5.2815921882012757,5.2733001155803034,5.265008042959332,5.2567159703383597,5.2484238977173874,5.240131825096416,5.2318397524754436,5.2235476798544713,5.215255607233499,5.2069635346125276,5.1986714619915553,5.190379389370583,5.1820873167496115,5.1737952441286392,5.1655031715076669,5.1572110988866955,5.1489190262657232,5.1406269536447509,5.1323348810237786,5.1240428084028071,5.1157507357818348,5.1074586631608625,5.0991665905398911,5.0908745179189188,5.0825824452979464,5.0742903726769741,5.0659983000560027,5.0577062274350304,5.0494141548140581,5.0411220821930867,5.0328300095721143,5.024537936951142,5.0162458643301697,5.0079537917091983,4.999661719088226,4.9913696464672537,4.9830775738462822,4.9747855012253099,4.9664934286043376,4.9582013559833662,4.9499092833623939,4.9416172107414216,4.9333251381204493,4.9250330654994778,4.9167409928785055,4.9084489202575332,4.9001568476365618,4.8918647750155895,4.8835727023946172,4.8752806297736448,4.8669885571526734,4.8586964845317011,4.8504044119107288,4.8421123392897574,4.8338202666687851,4.8255281940478127,4.8172361214268413,4.808944048805869,4.8006519761848967,4.7923599035639253,4.784067830942953,4.7757757583219806,4.7674836857010083,4.7591916130800369,4.7508995404590646,4.7426074678380923],"text":"","type":"scatter","mode":"lines","name":"fitted values","line":{"width":3.7795275590551185,"color":"rgba(1,79,134,1)","dash":"solid"},"hoveron":"points","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","frame":null},{"x":[0,0.12025316455696203,0.24050632911392406,0.36075949367088611,0.48101265822784811,0.60126582278481011,0.72151898734177222,0.84177215189873422,0.96202531645569622,1.0822784810126582,1.2025316455696202,1.3227848101265822,1.4430379746835444,1.5632911392405064,1.6835443037974684,1.8037974683544304,1.9240506329113924,2.0443037974683547,2.1645569620253164,2.2848101265822787,2.4050632911392404,2.5253164556962027,2.6455696202531644,2.7658227848101267,2.8860759493670889,3.0063291139240507,3.1265822784810129,3.2468354430379747,3.3670886075949369,3.4873417721518987,3.6075949367088609,3.7278481012658227,3.8481012658227849,3.9683544303797471,4.0886075949367093,4.2088607594936711,4.3291139240506329,4.4493670886075947,4.5696202531645573,4.6898734177215191,4.8101265822784809,4.9303797468354436,5.0506329113924053,5.1708860759493671,5.2911392405063289,5.4113924050632916,5.5316455696202533,5.6518987341772151,5.7721518987341778,5.8924050632911396,6.0126582278481013,6.1329113924050631,6.2531645569620258,6.3734177215189876,6.4936708860759493,6.6139240506329111,6.7341772151898738,6.8544303797468356,6.9746835443037973,7.09493670886076,7.2151898734177218,7.3354430379746836,7.4556962025316453,7.575949367088608,7.6962025316455698,7.8164556962025316,7.9367088607594942,8.0569620253164551,8.1772151898734187,8.2974683544303804,8.4177215189873422,8.537974683544304,8.6582278481012658,8.7784810126582276,8.8987341772151893,9.0189873417721529,9.1392405063291147,9.2594936708860764,9.3797468354430382,9.5,9.5,9.5,9.3797468354430382,9.2594936708860764,9.1392405063291147,9.0189873417721529,8.8987341772151893,8.7784810126582276,8.6582278481012658,8.537974683544304,8.4177215189873422,8.2974683544303804,8.1772151898734187,8.0569620253164551,7.9367088607594942,7.8164556962025316,7.6962025316455698,7.575949367088608,7.4556962025316453,7.3354430379746836,7.2151898734177218,7.09493670886076,6.9746835443037973,6.8544303797468356,6.7341772151898738,6.6139240506329111,6.4936708860759493,6.3734177215189876,6.2531645569620258,6.1329113924050631,6.0126582278481013,5.8924050632911396,5.7721518987341778,5.6518987341772151,5.5316455696202533,5.4113924050632916,5.2911392405063289,5.1708860759493671,5.0506329113924053,4.9303797468354436,4.8101265822784809,4.6898734177215191,4.5696202531645573,4.4493670886075947,4.3291139240506329,4.2088607594936711,4.0886075949367093,3.9683544303797471,3.8481012658227849,3.7278481012658227,3.6075949367088609,3.4873417721518987,3.3670886075949369,3.2468354430379747,3.1265822784810129,3.0063291139240507,2.8860759493670889,2.7658227848101267,2.6455696202531644,2.5253164556962027,2.4050632911392404,2.2848101265822787,2.1645569620253164,2.0443037974683547,1.9240506329113924,1.8037974683544304,1.6835443037974684,1.5632911392405064,1.4430379746835444,1.3227848101265822,1.2025316455696202,1.0822784810126582,0.96202531645569622,0.84177215189873422,0.72151898734177222,0.60126582278481011,0.48101265822784811,0.36075949367088611,0.24050632911392406,0.12025316455696203,0,0],"y":[4.4762838764724329,4.4868601055250643,4.4972643455378094,4.5074854483228739,4.5175114051331065,4.5273292780242738,4.5369251271545776,4.5462839343072492,4.5553895231221224,4.5642244767786471,4.5727700541966652,4.5810061062237022,4.588910993769284,4.5964615104373037,4.6036328129023119,4.6103983630740926,4.6167298869864872,4.6225973563054614,4.6279689993322117,4.6328113493070546,4.6370893385944791,4.6407664478077937,4.6438049189358885,4.6461660408578869,4.647810514053818,4.6486988986383224,4.6487921459176169,4.6480522084722331,4.6464427174511043,4.6439297087065148,4.6404823722360424,4.6360737929845488,4.6306816463893306,4.6242888100977266,4.6168838548002178,4.608461382432357,4.5990221888674707,4.5885732398100663,4.5771274615743565,4.5647033611981245,4.5513245013440615,4.5370188634545716,4.5218181369623682,4.5057569729333355,4.4888722377844923,4.4712022975067738,4.4527863561255749,4.4336638649224538,4.4138740120244915,4.393455295911127,4.3724451815097591,4.3508798339518027,4.3287939226792673,4.3062204872656862,4.2831908558336913,4.2597346070957975,4.2358795676144574,4.2116518367038047,4.187075832347098,4.1621743524848345,4.1369686469736875,4.1114784963859314,4.085722294591525,4.0597171327328692,4.033478882766766,4.0070222792160024,3.9803609981542341,3.9535077327533701,3.9264742649637987,3.8992715330849537,3.8719096951264822,3.8443981879670721,3.8167457823958717,3.7889606341764788,3.7610503313107038,3.7330219377027123,3.7048820334370722,3.6766367518892906,3.6482918138866958,3.6198525591326507,3.6198525591326507,5.8653623765435334,5.8535072670314339,5.8417464742707832,5.8300853379649444,5.8185295789412486,5.8070853305752017,5.7957591729513718,5.7845581699739217,5.7734899096446659,5.7625625477272004,5.7517848550106718,5.741166268373771,5.7307169458261447,5.7204478256672235,5.7103706898473998,5.7004982315385808,5.6908441268144205,5.6814231101977093,5.6722510536452475,5.6633450482994361,5.6547234880302319,5.646406153409913,5.638414294295151,5.6307707086264411,5.6234998143870456,5.6166277108910965,5.6101822247010462,5.6041929345294079,5.5986911684988172,5.5937099661828054,5.5892839970233803,5.5854494261519605,5.5822437184959428,5.5797053725347645,5.5778735763955103,5.5767877813597364,5.5764871914528378,5.5770101726657479,5.5783935914154892,5.5806720987679439,5.5838773841558238,5.5880374290215364,5.5931757960277713,5.5993109922123114,5.606455943889368,5.6146176167634518,5.6237968067078876,5.6339881156582265,5.6451801143049529,5.6573556802954039,5.6704924890668762,5.6845636255642296,5.6995382797850453,5.7153824875816062,5.7320598801028435,5.7495324099292926,5.7677610283671683,5.7867062955311095,5.806328911901149,5.8265901663564081,5.8474523008857773,5.868878796102563,5.890834584371258,5.9132861989321768,5.9362018680865143,5.9595515635002396,5.9833070112071924,6.0074416731171567,6.0319307059046814,6.056750903173663,6.0818806258336258,6.1072997247320933,6.1329894587889111,6.1589324111835273,6.185112405555774,6.211514423688886,6.2381245257410631,6.2649297737680723,6.2919181590227602,6.3190785333173363,4.4762838764724329],"text":"","type":"scatter","mode":"lines","line":{"width":3.7795275590551185,"color":"rgba(1,79,134,0.4)","dash":"solid"},"fill":"toself","fillcolor":"rgba(153,153,153,0.4)","hoveron":"points","hoverinfo":"x+y","showlegend":false,"xaxis":"x","yaxis":"y","frame":null}],"layout":{"margin":{"t":40.840182648401829,"r":7.3059360730593621,"b":37.260273972602747,"l":31.415525114155255},"plot_bgcolor":"rgba(255,255,255,1)","paper_bgcolor":"rgba(255,255,255,1)","font":{"color":"rgba(0,0,0,1)","family":"Sans","size":14.611872146118724},"title":{"text":"Relationship between class/study time and screen time","font":{"color":"rgba(0,0,0,1)","family":"","size":17.534246575342465},"x":0,"xref":"paper"},"xaxis":{"domain":[0,1],"automargin":true,"type":"linear","autorange":false,"range":[-0.47500000000000003,9.9749999999999996],"tickmode":"array","ticktext":["0.0","2.5","5.0","7.5"],"tickvals":[0,2.5,5,7.5],"categoryorder":"array","categoryarray":["0.0","2.5","5.0","7.5"],"nticks":null,"ticks":"outside","tickcolor":"rgba(179,179,179,1)","ticklen":3.6529680365296811,"tickwidth":0.33208800332088001,"showticklabels":true,"tickfont":{"color":"rgba(77,77,77,1)","family":"","size":11.68949771689498},"tickangle":-0,"showline":false,"linecolor":null,"linewidth":0,"showgrid":true,"gridcolor":"rgba(222,222,222,1)","gridwidth":0.33208800332088001,"zeroline":false,"anchor":"y","title":{"text":"Class + Study Time (hours)","font":{"color":"rgba(0,0,0,1)","family":"","size":14.611872146118724}},"hoverformat":".2f"},"yaxis":{"domain":[0,1],"automargin":true,"type":"linear","autorange":false,"range":[2.6840000000000002,8.0960000000000001],"tickmode":"array","ticktext":["3","4","5","6","7","8"],"tickvals":[3,4,5,6,7,8],"categoryorder":"array","categoryarray":["3","4","5","6","7","8"],"nticks":null,"ticks":"outside","tickcolor":"rgba(179,179,179,1)","ticklen":3.6529680365296811,"tickwidth":0.33208800332088001,"showticklabels":true,"tickfont":{"color":"rgba(77,77,77,1)","family":"","size":11.68949771689498},"tickangle":-0,"showline":false,"linecolor":null,"linewidth":0,"showgrid":true,"gridcolor":"rgba(222,222,222,1)","gridwidth":0.33208800332088001,"zeroline":false,"anchor":"x","title":{"text":"Screen Time (hours)","font":{"color":"rgba(0,0,0,1)","family":"","size":14.611872146118724}},"hoverformat":".2f"},"shapes":[{"type":"rect","fillcolor":"rgba(255,255,255,1)","line":{"color":"rgba(179,179,179,1)","width":0.66417600664176002,"linetype":"solid"},"yref":"paper","xref":"paper","layer":"below","x0":0,"x1":1,"y0":0,"y1":1}],"showlegend":false,"legend":{"bgcolor":"rgba(255,255,255,1)","bordercolor":"transparent","borderwidth":1.8897637795275593,"font":{"color":"rgba(0,0,0,1)","family":"","size":11.68949771689498}},"hovermode":"closest","barmode":"relative","hoverlabel":{"font":{"family":"Sans","size":13,"color":"#FFFFFF"}}},"config":{"doubleClick":"reset","modeBarButtonsToAdd":["hoverclosest","hovercompare"],"showSendToCloud":false},"source":"A","attrs":{"483529f6f4":{"x":{},"y":{},"text":{},"type":"scatter"},"483543140d41":{"x":{},"y":{}}},"cur_data":"483529f6f4","visdat":{"483529f6f4":["function (y) ","x"],"483543140d41":["function (y) ","x"]},"highlight":{"on":"plotly_click","persistent":false,"dynamic":false,"selectize":false,"opacityDim":0.20000000000000001,"selected":{"opacity":1},"debounce":0},"shinyEvents":["plotly_hover","plotly_click","plotly_selected","plotly_relayout","plotly_brushed","plotly_brushing","plotly_clickannotation","plotly_doubleclick","plotly_deselect","plotly_afterplot","plotly_sunburstclick"],"base_url":"https://plot.ly"},"evals":[],"jsHooks":[]}</script>
</div>
</div>
<p><strong>Figure 2.</strong> Relationship between class/study time (hours) and screen time (hours). Each point represents one day, with the line showing the overall linear trend. The slight negative trend suggests that on days with more class and/or study time, screen time tends to be slightly lower, although the relationship does not appear very strong.</p>
</section>
</section>
<section id="affective-visualization" class="level1">
<h1>Affective Visualization</h1>
<p>Alongside the code-based plots, I created a <strong>hand-drawn affective visualization</strong> to represent the same dataset in a more symbolic and personal way. The project was inspired by <strong>Giorgia Lupi and Stefanie Posavec’s <em>Week of Goodbyes</em></strong>, which uses hand-drawn marks to encode personal experiences. Rather than focusing only on statistical relationships, this piece emphasizes how daily habits feel when viewed together over time.</p>
<p>The visualization uses a custom visual language:</p>
<ul>
<li><strong>Shape</strong> represents screen time level<br>
</li>
<li><strong>Fill pattern</strong> represents class/study time<br>
</li>
<li><strong>Outline style</strong> indicates social plans<br>
</li>
<li><strong>Red underline</strong> marks low sleep<br>
</li>
<li><strong>Red dot</strong> marks an exam or project due</li>
</ul>
<p>This format allowed me to visualize my habits in a way that feels more reflective than a conventional chart, while still encoding several variables at once.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://sumaiyaalvi.github.io/projects/screentime/draft.png" class="img-fluid quarto-figure quarto-figure-center figure-img" style="width:70.0%"></p>
</figure>
</div>
</section>
<section id="key-takeaways" class="level1">
<h1>Key Takeaways</h1>
<p>Several patterns emerged from this project:</p>
<ul>
<li>Screen time varies across days of the week, with some weekend days showing more variability.</li>
<li>There appears to be a slight negative relationship between class/study time and screen time.</li>
<li>Contextual factors such as sleep, deadlines, and social plans likely shape screen time in ways that are not fully captured by a simple regression line.</li>
<li>Affective visualization can reveal patterns and experiences that traditional charts may not communicate as clearly.</li>
</ul>
</section>
<section id="reflection" class="level1">
<h1>Reflection</h1>
<p>This project helped me think about data in two different ways: as something to analyze statistically, and as something to represent personally. The <strong>ggplot visualizations</strong> helped identify general trends, while the <strong>hand-drawn affective visualization</strong> captured the context and variability of daily life.</p>


</section>

 ]]></description>
  <category>R</category>
  <category>ggplot2</category>
  <category>Affective Visualization</category>
  <guid>https://sumaiyaalvi.github.io/projects/screentime/</guid>
  <pubDate>Tue, 10 Mar 2026 15:41:46 GMT</pubDate>
  <media:content url="https://sumaiyaalvi.github.io/projects/screentime/snippet.png" medium="image" type="image/png" height="62" width="144"/>
</item>
<item>
  <title>Modeling Diamond Prices with Regression Analysis</title>
  <link>https://sumaiyaalvi.github.io/projects/diamonds/</link>
  <description><![CDATA[ 




<section id="overview" class="level2">
<h2 class="anchored" data-anchor-id="overview">Overview</h2>
<p><strong>Timeline:</strong> Spring 2025<br>
<strong>Methods:</strong> Exploratory Data Analysis, ANOVA, Simple Linear Regression, Multiple Linear Regression, Log Transformation, Model Diagnostics<br>
<strong>Course:</strong> PSTAT 126 - Regression Analysis</p>
<p>This project explored how different diamond characteristics influence price using a random sample of 1,000 observations from a larger diamonds dataset. The goal was to determine which features were most useful for predicting diamond prices, and to build a regression model that balanced strong fit with clear interpretation.</p>
<p>Using <strong>R</strong>, I analyzed relationships between price and several predictors, including <strong>carat, cut, color, and depth</strong>. Through exploratory data analysis, hypothesis testing, and model comparison, I found that <strong>carat, cut, and color</strong> were the most important predictors of diamond price, while <strong>depth</strong> did not meaningfully improve the model.</p>
</section>
<section id="tools-and-skills" class="level2">
<h2 class="anchored" data-anchor-id="tools-and-skills">Tools and Skills</h2>
<ul>
<li><strong>R</strong></li>
<li><strong>ggplot2</strong></li>
<li><strong>dplyr</strong></li>
<li><strong>Exploratory Data Analysis (EDA)</strong></li>
<li><strong>ANOVA</strong></li>
<li><strong>Simple Linear Regression</strong></li>
<li><strong>Multiple Linear Regression</strong></li>
<li><strong>Log Transformation</strong></li>
<li><strong>Residual Analysis</strong></li>
<li><strong>Model Selection</strong></li>
</ul>
</section>
<section id="project-goals" class="level2">
<h2 class="anchored" data-anchor-id="project-goals">Project Goals</h2>
<p>This project focused on a few main questions:</p>
<ul>
<li>Which diamond characteristics are most strongly associated with price?</li>
<li>How well can diamond price be predicted using carat, cut, color, and depth?</li>
<li>Do transformations improve model fit and better satisfy regression assumptions?</li>
<li>Which combination of predictors produces the strongest and most interpretable final model?</li>
</ul>
</section>
<section id="my-role" class="level2">
<h2 class="anchored" data-anchor-id="my-role">My Role</h2>
<p>In this project, I completed the full analysis independently in <strong>R</strong>. This included selecting a random sample from the dataset, creating visualizations, fitting and interpreting regression models, checking model assumptions, comparing adjusted <img src="https://latex.codecogs.com/png.latex?R%5E2"> values across models, and identifying the final best-performing model.</p>
</section>
<section id="methods" class="level2">
<h2 class="anchored" data-anchor-id="methods">Methods</h2>
<p>I combined visualization, statistical testing, and regression modeling to understand the drivers of diamond price.</p>
<section id="data-collection-and-sampling" class="level3">
<h3 class="anchored" data-anchor-id="data-collection-and-sampling">Data Collection and Sampling</h3>
<p>I worked with a diamonds dataset from <strong>Kaggle</strong> that included variables such as price, carat, cut, color, depth, and clarity. For this project, I selected a random sample of <strong>1,000 diamonds</strong> and focused on <strong>carat, cut, color, depth, and price</strong> in order to build a manageable and interpretable regression analysis.</p>
</section>
<section id="exploratory-data-analysis" class="level3">
<h3 class="anchored" data-anchor-id="exploratory-data-analysis">Exploratory Data Analysis</h3>
<p>I began by creating summary statistics, histograms for the quantitative variables, and bar plots for the categorical variables. The distributions showed that <strong>carat</strong> and <strong>price</strong> were both strongly right-skewed, indicating that the sample contained many lower-carat, lower-priced diamonds and relatively few high-end diamonds.</p>
<p>The bar plots also showed that <strong>Ideal</strong> cuts were the most common, while the distribution of diamond colors was fairly even except for <strong>J</strong>, which appeared much less frequently. These early patterns suggested that carat, cut, and color might all influence price in different ways.</p>
</section>
<section id="initial-relationship-testing" class="level3">
<h3 class="anchored" data-anchor-id="initial-relationship-testing">Initial Relationship Testing</h3>
<p>To examine relationships between variables, I calculated correlations among the quantitative predictors and used <strong>ANOVA</strong> to test whether price differed across levels of cut and color. The strongest relationship was between <strong>price and carat</strong>, with a correlation of about <strong>0.92</strong>, indicating that larger diamonds tended to be much more expensive.</p>
<p>The ANOVA results also showed statistically significant differences in price across both <strong>cut</strong> and <strong>color</strong> categories. In contrast, <strong>depth</strong> showed almost no linear relationship with price, suggesting that it would likely be less useful as a predictor.</p>
</section>
<section id="regression-modeling" class="level3">
<h3 class="anchored" data-anchor-id="regression-modeling">Regression Modeling</h3>
<p>I first fit a <strong>multiple linear regression model</strong> using price as the response and carat, depth, cut, and color as predictors. This model explained a large proportion of the variability in price, but it also showed that <strong>depth was not statistically significant</strong>, while some levels of cut and color were.</p>
<p>I then fit a <strong>simple linear regression model</strong> using <strong>carat alone</strong> to better understand its individual effect on price. Carat was a highly significant predictor, but residual diagnostics showed clear violations of the linearity and constant variance assumptions.</p>
</section>
<section id="model-transformation-and-diagnostics" class="level3">
<h3 class="anchored" data-anchor-id="model-transformation-and-diagnostics">Model Transformation and Diagnostics</h3>
<p>To address these issues, I transformed the variables by taking the logs of both <strong>price</strong> and <strong>carat</strong>. After fitting a model with <strong>log(price)</strong> as the response and <strong>log(carat)</strong> as the predictor, the residual plots improved substantially and the assumptions of linearity, normality, and homoscedasticity were much better satisfied.</p>
<p>I confirmed the improvement using both the <strong>residuals vs.&nbsp;fitted plot</strong> and a <strong>Q-Q plot</strong>. The transformed model also produced a stronger fit, with the <img src="https://latex.codecogs.com/png.latex?R%5E2"> increasing from about <strong>0.85</strong> in the simple linear model to about <strong>0.93</strong> after the log transformation.</p>
</section>
<section id="model-selection" class="level3">
<h3 class="anchored" data-anchor-id="model-selection">Model Selection</h3>
<p>To determine the best final model, I compared adjusted <img src="https://latex.codecogs.com/png.latex?R%5E2"> values after adding <strong>depth, cut, and color</strong> to the transformed model. Adding <strong>depth</strong> slightly decreased adjusted <img src="https://latex.codecogs.com/png.latex?R%5E2">, indicating that it did not improve the model. Adding <strong>cut</strong> and <strong>color</strong>, however, both improved fit, and the best-performing model included:</p>
<ul>
<li><strong>log(carat)</strong></li>
<li><strong>cut</strong></li>
<li><strong>color</strong></li>
</ul>
<p>This final model achieved an <img src="https://latex.codecogs.com/png.latex?R%5E2"> of about <strong>0.9447</strong>, showing that it explained nearly <strong>94% of the variation in log diamond price</strong>.</p>
</section>
</section>
<section id="key-takeaways" class="level2">
<h2 class="anchored" data-anchor-id="key-takeaways">Key Takeaways</h2>
<p>A few major findings emerged from the analysis:</p>
<ul>
<li><strong>Carat</strong> was the strongest predictor of diamond price</li>
<li><strong>Cut</strong> and <strong>color</strong> both improved the model and helped explain additional variation in price</li>
<li><strong>Depth</strong> did not meaningfully contribute to predicting price and was dropped from the final model</li>
<li>Log-transforming <strong>price</strong> and <strong>carat</strong> substantially improved the regression assumptions and overall model fit</li>
<li>The final model using <strong>log(carat), cut, and color</strong> explained about <strong>94%</strong> of the variability in log price</li>
</ul>
</section>
<section id="view-the-full-report" class="level2">
<h2 class="anchored" data-anchor-id="view-the-full-report">View the full report</h2>
<iframe src="../../projects/diamonds/finalproject.pdf" width="100%" height="800px">
</iframe>
</section>
<section id="reflection" class="level2">
<h2 class="anchored" data-anchor-id="reflection">Reflection</h2>
<p>This project strengthened my understanding of how regression modeling can be used not just to make predictions, but also to compare predictors, evaluate assumptions, and improve model performance through thoughtful transformations. It gave me more experience interpreting categorical and quantitative predictors together in a multiple regression setting, and helped me see how model diagnostics directly shape the decisions made during analysis.</p>
<p>What I found especially valuable was the process of refining the model rather than stopping at the first strong result. Seeing how the log transformation improved the residual patterns, and how model comparison helped justify dropping depth while keeping cut and color, made the final model feel much more intentional and statistically sound.</p>


</section>

 ]]></description>
  <category>R</category>
  <category>Regression Analysis</category>
  <guid>https://sumaiyaalvi.github.io/projects/diamonds/</guid>
  <pubDate>Tue, 10 Mar 2026 15:41:46 GMT</pubDate>
  <media:content url="https://sumaiyaalvi.github.io/projects/diamonds/diamonds.png" medium="image" type="image/png" height="58" width="144"/>
</item>
<item>
  <title>Analyzing UCSB Housing Costs Through Data Journalism</title>
  <link>https://sumaiyaalvi.github.io/projects/housing/</link>
  <description><![CDATA[ 




<section id="overview" class="level2">
<h2 class="anchored" data-anchor-id="overview">Overview</h2>
<p><strong>Timeline:</strong> October 2024 – February 2025<br>
<strong>Publication:</strong> UCSB Daily Nexus<br>
<strong>Methods:</strong> Data collection, exploratory analysis, data visualization, interviews, public records research</p>
<p>This project was a <strong>data-driven article published in the UCSB Daily Nexus</strong> that analyzed how housing costs at UC Santa Barbara have changed over the past decade. The goal was to investigate long-term trends in campus housing prices and communicate those findings in a way that would be accessible and meaningful for students making housing decisions.</p>
<p>Working as a journalist in the Daily Nexus <strong>Data Section</strong>, I helped analyze housing data from UCSB Campus Housing and created visualizations showing how prices have changed over time across different housing types and occupancy arrangements. The article combined quantitative analysis with interviews and reporting to explain how rising housing costs affect students.</p>
</section>
<section id="tools-and-skills" class="level2">
<h2 class="anchored" data-anchor-id="tools-and-skills">Tools and Skills</h2>
<ul>
<li><strong>Data Journalism</strong></li>
<li><strong>Datawrapper</strong></li>
<li><strong>Python</strong></li>
<li><strong>Exploratory Data Analysis</strong></li>
<li><strong>Public Records Research</strong></li>
<li><strong>Interviewing</strong></li>
<li><strong>Data Visualization</strong></li>
<li><strong>Storytelling with Data</strong></li>
</ul>
</section>
<section id="project-goals" class="level2">
<h2 class="anchored" data-anchor-id="project-goals">Project Goals</h2>
<p>This project focused on a few main questions:</p>
<ul>
<li>How have UCSB housing prices changed over the past decade?</li>
<li>How do costs compare between residence halls and university apartments?</li>
<li>How do occupancy types (single, double, triple) affect overall cost?</li>
<li>How have the cost differences between occupancies changed over time?</li>
<li>What do these trends mean for students trying to find affordable housing?</li>
</ul>
</section>
<section id="my-role" class="level2">
<h2 class="anchored" data-anchor-id="my-role">My Role</h2>
<p>As part of the <strong>Daily Nexus Data Section</strong>, I worked on analyzing housing price data and translating those findings into visuals and narrative reporting. My responsibilities included collecting and organizing housing data, performing exploratory analysis, building charts using <strong>Datawrapper</strong>, and contributing to the reporting and writing of the final article.</p>
<p>The project also involved gathering context through <strong>interviews with students and university officials</strong> and incorporating those perspectives alongside the quantitative findings.</p>
</section>
<section id="methods" class="level2">
<h2 class="anchored" data-anchor-id="methods">Methods</h2>
<p>This project combined traditional journalism with data analysis to explain long-term housing trends at UCSB.</p>
<section id="data-collection" class="level3">
<h3 class="anchored" data-anchor-id="data-collection">Data Collection</h3>
<p>Housing cost data was gathered from <strong>UCSB Campus Housing Services</strong>, which publishes historical pricing information for residence halls and university apartments. The dataset included annual housing rates across multiple occupancy types and meal plan combinations.</p>
<p>In addition to housing price data, I conducted <strong>interviews with students and university representatives</strong> to provide context for the numbers and explain how these changes affect the student experience.</p>
</section>
<section id="exploratory-analysis" class="level3">
<h3 class="anchored" data-anchor-id="exploratory-analysis">Exploratory Analysis</h3>
<p>Using the historical housing dataset, I analyzed how prices changed between the <strong>2013–14 and 2024–25 academic years</strong>. The analysis focused on identifying overall trends, comparing housing types, and examining how the cost differences between <strong>single, double, and triple occupancies</strong> evolved over time.</p>
<p>The data showed that housing costs have risen consistently over the past decade, with residence halls increasing faster than university apartments. Overall, housing prices increased by roughly <strong>33% on average</strong>, with residence hall rates rising by about <strong>45%</strong> during the same period.</p>
</section>
<section id="data-visualization" class="level3">
<h3 class="anchored" data-anchor-id="data-visualization">Data Visualization</h3>
<p>To communicate these trends clearly, I created several charts using <strong>Datawrapper</strong>, including:</p>
<ul>
<li>A comparison of occupancy price differences</li>
<li>A time-series visualization showing how occupancy price gaps changed over time</li>
<li>Visual comparisons between residence halls and apartment costs</li>
</ul>
<p>These visualizations helped translate complex housing data into clear patterns that readers could quickly understand.</p>
</section>
</section>
<section id="key-takeaways" class="level2">
<h2 class="anchored" data-anchor-id="key-takeaways">Key Takeaways</h2>
<p>Several important trends emerged from the analysis:</p>
<ul>
<li>UCSB housing prices have risen steadily over the past decade</li>
<li>Residence hall costs have increased faster than university apartment costs</li>
<li>Meal plan requirements contribute significantly to residence hall expenses</li>
<li>The cost savings from choosing triple occupancy have narrowed over time</li>
<li>Rising housing prices are pushing more students to consider off-campus options</li>
</ul>
</section>
<section id="deliverables" class="level2">
<h2 class="anchored" data-anchor-id="deliverables">Deliverables</h2>
<p>This project resulted in a published article and accompanying data visualizations.</p>
<ul>
<li><a href="https://dailynexus.com/2025-02-13/a-decade-of-increases-ucsb-housing-costs-show-consistent-climb/" target="_blank">Read the full article in the Daily Nexus</a></li>
</ul>
</section>
<section id="visualizations" class="level2">
<h2 class="anchored" data-anchor-id="visualizations">Visualizations</h2>
<iframe title="Difference in residence hall costs for different occupancies" aria-label="Interactive line chart" id="datawrapper-chart-6B8Rb" src="https://datawrapper.dwcdn.net/6B8Rb/8/" scrolling="no" frameborder="0" style="width: 0; min-width: 100% !important; border: none;" height="567" data-external="1">
</iframe>
<script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(a){if(void 0!==a.data["datawrapper-height"]){var e=document.querySelectorAll("iframe");for(var t in a.data["datawrapper-height"])for(var r=0;r<e.length;r++)if(e[r].contentWindow===a.source){var i=a.data["datawrapper-height"][t]+"px";e[r].style.height=i}}}))}();
</script>
<iframe title="2024-2025 difference in residence hall costs by occupancy" aria-label="Column Chart" id="datawrapper-chart-972jW" src="https://datawrapper.dwcdn.net/972jW/8/" scrolling="no" frameborder="0" style="width: 0; min-width: 100% !important; border: none;" height="495" data-external="1">
</iframe>
<script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(a){if(void 0!==a.data["datawrapper-height"]){var e=document.querySelectorAll("iframe");for(var t in a.data["datawrapper-height"])for(var r=0;r<e.length;r++)if(e[r].contentWindow===a.source){var i=a.data["datawrapper-height"][t]+"px";e[r].style.height=i}}}))}();
</script>
</section>
<section id="reflection" class="level2">
<h2 class="anchored" data-anchor-id="reflection">Reflection</h2>
<p>This project strengthened my skills in <strong>data journalism and communicating quantitative findings to a broad audience</strong>. It required balancing statistical analysis with narrative storytelling, making sure that the data remained accurate while also being understandable to readers without a technical background.</p>
<p>Working on this article also showed me how data analysis can play a role in public conversations about affordability and student life. By combining data visualization with interviews and reporting, the project helped translate housing cost trends into a story that directly impacts the UCSB community.</p>


</section>

 ]]></description>
  <category>Data Journalism</category>
  <category>Datawrapper</category>
  <category>Python</category>
  <guid>https://sumaiyaalvi.github.io/projects/housing/</guid>
  <pubDate>Tue, 10 Mar 2026 15:41:46 GMT</pubDate>
  <media:content url="https://sumaiyaalvi.github.io/projects/housing/housing.png" medium="image" type="image/png" height="78" width="144"/>
</item>
<item>
  <title>Analyzing Vegan Dining Hall Options to Support Campus Food Advocacy</title>
  <link>https://sumaiyaalvi.github.io/projects/vegan/</link>
  <description><![CDATA[ 




<section id="overview" class="level2">
<h2 class="anchored" data-anchor-id="overview">Overview</h2>
<p><strong>Timeline:</strong> August 2025<br>
<strong>Context:</strong> Advocacy project for an Associated Students senator<br>
<strong>Methods:</strong> Spreadsheet analysis, categorization, frequency counts, data visualization</p>
<p>This project was created to support advocacy for more vegan dining hall options at UCSB. The goal was to quantify how many dining hall items were vegan, and more importantly, how many of those options were actually nutritionally sufficient and served frequently enough to be considered realistic meal choices for students.</p>
<p>Using a <strong>Google Sheet</strong> containing dining hall menu data, I analyzed the total number of food options, identified which items were vegan, and then narrowed that subset further to the vegan options that could be considered nutritionally sufficient. I also examined how often these items were served throughout the year, with a particular focus on entrees offered <strong>30 or more times</strong>, in order to show that the number of consistent and substantial vegan choices was much smaller than it might initially appear.</p>
</section>
<section id="tools-and-skills" class="level2">
<h2 class="anchored" data-anchor-id="tools-and-skills">Tools and Skills</h2>
<ul>
<li><strong>Google Sheets</strong></li>
<li><strong>Data Cleaning</strong></li>
<li><strong>Categorization</strong></li>
<li><strong>Frequency Analysis</strong></li>
<li><strong>Data Interpretation</strong></li>
<li><strong>Datawrapper</strong></li>
<li><strong>Data Visualization</strong></li>
<li><strong>Advocacy-Focused Communication</strong></li>
</ul>
</section>
<section id="project-goals" class="level2">
<h2 class="anchored" data-anchor-id="project-goals">Project Goals</h2>
<p>This project focused on a few main questions:</p>
<ul>
<li>How many dining hall options were offered overall?</li>
<li>How many of those options were vegan?</li>
<li>Of the vegan options, how many could reasonably be considered nutritionally sufficient entrees?</li>
<li>How often were those nutritious vegan entrees actually served throughout the academic year?</li>
<li>How could these findings be communicated clearly to support campus dining advocacy?</li>
</ul>
</section>
<section id="my-role" class="level2">
<h2 class="anchored" data-anchor-id="my-role">My Role</h2>
<p>In this project, I independently analyzed dining hall menu data to support a campus advocacy effort focused on vegan food access. I worked directly in <strong>Google Sheets</strong> to organize the data, count and compare subsets of menu items, and identify patterns in how frequently different vegan options appeared. I then created <strong>Datawrapper</strong> visuals to present the results in a way that would be easy to understand and useful for advocacy.</p>
</section>
<section id="methods" class="level2">
<h2 class="anchored" data-anchor-id="methods">Methods</h2>
<p>This project combined spreadsheet-based analysis with visual storytelling to highlight the difference between simply offering vegan items and offering vegan meals that are both nutritious and consistently available.</p>
<section id="data-organization-and-categorization" class="level3">
<h3 class="anchored" data-anchor-id="data-organization-and-categorization">Data Organization and Categorization</h3>
<p>I started with a Google Sheet containing dining hall menu items collected over the course of the year. From this dataset, I identified the <strong>total number of food options</strong> served and then isolated the subset that qualified as <strong>vegan</strong>.</p>
<p>From there, I further narrowed the data to focus on vegan items that could reasonably be classified as <strong>nutritionally sufficient entrees</strong>. This distinction was important because the existence of vegan options alone does not necessarily mean students have access to balanced or filling meal choices.</p>
</section>
<section id="frequency-analysis" class="level3">
<h3 class="anchored" data-anchor-id="frequency-analysis">Frequency Analysis</h3>
<p>After identifying the nutritionally sufficient vegan options, I analyzed how often they appeared in the dining halls. One key threshold I used was whether an item had been served <strong>30 or more times</strong> over the data collection period.</p>
<p>This helped separate items that appeared only occasionally from those that students could actually expect to encounter on a regular basis. The results showed that while there were many vegan options in total, far fewer were both nutritious and served consistently.</p>
</section>
<section id="data-visualization" class="level3">
<h3 class="anchored" data-anchor-id="data-visualization">Data Visualization</h3>
<p>To communicate the findings, I created a series of <strong>Datawrapper</strong> charts. These visuals helped compare:</p>
<ul>
<li>vegan versus non-vegan dining options overall</li>
<li>nutritious vegan entrees as a portion of all vegan options</li>
<li>the small number of nutritionally sufficient vegan entrees that were served regularly</li>
</ul>
<p>By presenting the analysis visually, the project made it easier to communicate a policy-relevant point: that the number of meaningful vegan dining choices was much smaller than the raw menu count suggested.</p>
</section>
</section>
<section id="key-takeaways" class="level2">
<h2 class="anchored" data-anchor-id="key-takeaways">Key Takeaways</h2>
<p>A few major patterns emerged from the analysis:</p>
<ul>
<li>Vegan options made up a minority of overall dining hall offerings</li>
<li>Within the vegan subset, many items could not be considered nutritionally sufficient entrees</li>
<li>Only a relatively small number of nutritious vegan entrees were served consistently throughout the year</li>
<li>Looking only at the total count of vegan items overstated how accessible substantial vegan dining options actually were</li>
<li>Clear visualizations made the findings more effective for advocacy and communication</li>
</ul>
</section>
<section id="final-visuals" class="level2">
<h2 class="anchored" data-anchor-id="final-visuals">Final Visuals</h2>
<iframe title="Number of Vegan vs. Non-Vegan Dining 'Options'" aria-label="Pie Chart" id="datawrapper-chart-08Oa3" src="https://datawrapper.dwcdn.net/08Oa3/1/" scrolling="no" frameborder="0" style="width: 0; min-width: 70% !important; border: none;" height="500" data-external="1">
</iframe>
<script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(a){if(void 0!==a.data["datawrapper-height"]){var e=document.querySelectorAll("iframe");for(var t in a.data["datawrapper-height"])for(var r=0;r<e.length;r++)if(e[r].contentWindow===a.source){var i=a.data["datawrapper-height"][t]+"px";e[r].style.height=i}}}))}();
</script>
<iframe title="Nutritious Vegan Entrees as a Portion of Vegan Options" aria-label="Stacked column chart" id="datawrapper-chart-H8Ktj" src="https://datawrapper.dwcdn.net/H8Ktj/4/" scrolling="no" frameborder="0" style="width: 0; min-width: 80% !important; border: none;" height="454" data-external="1">
</iframe>
<script type="text/javascript">window.addEventListener("message",function(a){if(void 0!==a.data["datawrapper-height"]){var e=document.querySelectorAll("iframe");for(var t in a.data["datawrapper-height"])for(var r,i=0;r=e[i];i++)if(r.contentWindow===a.source){var d=a.data["datawrapper-height"][t]+"px";r.style.height=d}}});</script>
<div style="max-width:700px; margin:auto;">
<iframe title="Nutritious Vegan Entrees Served 30+ Times" src="https://datawrapper.dwcdn.net/fd5f8/3/" scrolling="no" frameborder="0" style="width:80%; border:none;" height="500">
</iframe>
</div>
</section>
<section id="reflection" class="level2">
<h2 class="anchored" data-anchor-id="reflection">Reflection</h2>
<p>This project showed me that even relatively simple tools like <strong>Google Sheets</strong> can be powerful when paired with a clear question and strong communication. It reinforced the importance of distinguishing between raw counts and meaningful access, especially in a policy or advocacy context where numbers can easily be misleading without proper interpretation.</p>
<p>What I found especially valuable was the challenge of turning spreadsheet analysis into a more persuasive visual story. The project strengthened my ability to work with structured data in a practical setting and to present findings in a way that supports real-world decision-making.</p>


</section>

 ]]></description>
  <category>Google Sheets</category>
  <category>Datawrapper</category>
  <category>Data Visualization</category>
  <guid>https://sumaiyaalvi.github.io/projects/vegan/</guid>
  <pubDate>Tue, 10 Mar 2026 15:41:46 GMT</pubDate>
  <media:content url="https://sumaiyaalvi.github.io/projects/vegan/dininghall.png" medium="image" type="image/png" height="81" width="144"/>
</item>
<item>
  <title>Consumer Insights &amp; Social Listening Analysis for the Beats Pill Launch</title>
  <link>https://sumaiyaalvi.github.io/projects/beats-by-dre/</link>
  <description><![CDATA[ 




<section id="overview" class="level2">
<h2 class="anchored" data-anchor-id="overview">Overview</h2>
<p><strong>Timeline:</strong> April–June 2025<br>
<strong>Methods:</strong> EDA, Sentiment Analysis, Qualitative Analysis</p>
<p>From April to June 2025, I worked on a consumer insights and social listening project centered on the <strong>Beats Pill launch</strong>. The goal of this project was to better understand how consumers were responding to the product by combining survey data with social media conversations and translating those findings into actionable recommendations.</p>
<p>Using <strong>Python in Google Colab</strong>, I collected, cleaned, and structured both qualitative and quantitative data. I then used <strong>exploratory data analysis, sentiment analysis, and qualitative review</strong> to identify major themes in consumer perception, feature preferences, and overall behavior.</p>
</section>
<section id="tools-and-skills" class="level2">
<h2 class="anchored" data-anchor-id="tools-and-skills">Tools and Skills</h2>
<ul>
<li><strong>Python</strong></li>
<li><strong>Google Colab</strong></li>
<li><strong>Exploratory Data Analysis (EDA)</strong></li>
<li><strong>Sentiment Analysis</strong></li>
<li><strong>Qualitative Analysis</strong></li>
<li><strong>Data Visualization</strong></li>
<li><strong>Dashboard Development</strong></li>
<li><strong>Stakeholder Communication</strong></li>
</ul>
</section>
<section id="project-goals" class="level2">
<h2 class="anchored" data-anchor-id="project-goals">Project Goals</h2>
<p>This project focused on a few main questions:</p>
<ul>
<li>How were consumers reacting to the Beats Pill launch?</li>
<li>What product features or qualities were mentioned most often?</li>
<li>What themes emerged from survey responses and social media discussions?</li>
<li>How could these findings be turned into useful product or marketing recommendations?</li>
</ul>
</section>
<section id="my-role" class="level2">
<h2 class="anchored" data-anchor-id="my-role">My Role</h2>
<p>In this project, I worked on the full analysis pipeline from data preparation to final presentation. This included collecting and organizing data, analyzing sentiment and discussion themes, creating visualizations, and summarizing the results in a way that would be useful for non-technical stakeholders.</p>
</section>
<section id="methods" class="level2">
<h2 class="anchored" data-anchor-id="methods">Methods</h2>
<p>I combined both quantitative and qualitative approaches to better understand consumer responses.</p>
<section id="data-collection-and-cleaning" class="level3">
<h3 class="anchored" data-anchor-id="data-collection-and-cleaning">Data Collection and Cleaning</h3>
<p>I worked with consumer survey responses and social media conversations related to the Beats Pill launch. A large part of the project involved cleaning and structuring the data so it could be analyzed consistently across sources.</p>
</section>
<section id="sentiment-analysis-and-eda" class="level3">
<h3 class="anchored" data-anchor-id="sentiment-analysis-and-eda">Sentiment Analysis and EDA</h3>
<p>Using Python, I performed sentiment analysis and exploratory data analysis to identify patterns in how people discussed the product. This helped highlight overall tone, recurring opinions, and feature-level trends in consumer reactions.</p>
<p><a href="https://colab.research.google.com/drive/1XdiDhP6dCfExjtOHgyNSwKGqtlW2_j58?usp=sharing" class="btn" target="_blank"><i class="fa-brands fa-python" aria-label="python"></i> Cleaning and Prepping Data, &amp; Exploratory Data Analysis</a></p>
</section>
<section id="qualitative-analysis" class="level3">
<h3 class="anchored" data-anchor-id="qualitative-analysis">Qualitative Analysis</h3>
<p>In addition to numerical summaries, I reviewed open-ended responses and discussion content to identify themes that might not be fully captured through sentiment scores alone. This helped provide more context around what consumers liked, disliked, or expected from the product.</p>
</section>
</section>
<section id="key-takeaways" class="level2">
<h2 class="anchored" data-anchor-id="key-takeaways">Key Takeaways</h2>
<p>A few major themes emerged from the analysis:</p>
<ul>
<li>Consumer reactions were shaped by a mix of product features, brand perception, and launch messaging</li>
<li>Social listening data revealed recurring points of praise and criticism that complemented the survey findings</li>
<li>Combining quantitative summaries with qualitative review made the recommendations more grounded and actionable</li>
<li>Clear visual storytelling was important for communicating insights to stakeholders without a technical background</li>
</ul>
<p><a href="https://colab.research.google.com/drive/1TqpU3Bv5_LH7ynEEZ1YSFTC7VmrAfaSc?usp=sharing" class="btn" target="_blank"><i class="fa-brands fa-python" aria-label="python"></i> Sharing Insights</a></p>
</section>
<section id="deliverables" class="level2">
<h2 class="anchored" data-anchor-id="deliverables">Deliverables</h2>
<p>This project resulted in several final deliverables, which are linked below.</p>
<ul>
<li><a href="../../projects/beats-by-dre/beats_presentation.pdf" target="_blank">View the final presentation (PDF)</a></li>
<li><a href="https://claude.ai/public/artifacts/cc49c7ec-1b6e-40db-93fe-6429e480c300" target="_blank">Open the Claude insights dashboard</a></li>
<li><a href="https://docs.google.com/document/d/1_2_djk76Xk8LL9TROq4A0o5ZydId4PDDbNxEnnify3k/edit?usp=sharing" target="_blank">Read the project summary</a></li>
</ul>
</section>
<section id="reflection" class="level2">
<h2 class="anchored" data-anchor-id="reflection">Reflection</h2>
<p>This project strengthened my skills in <strong>consumer analytics, storytelling, and stakeholder communication</strong>. It also gave me more experience working with messy real-world data and thinking carefully about how to turn analysis into recommendations that are both clear and useful.</p>
<p>What I found especially valuable was the balance between technical analysis and communication. Beyond identifying trends in the data, the project required me to think about how to present those findings in a consulting-style format that could support real decision-making.</p>
<iframe src="../../projects/beats-by-dre/beats_presentation.pdf" width="100%" height="800px">
</iframe>


</section>

 ]]></description>
  <category>Python</category>
  <category>Google Colab</category>
  <guid>https://sumaiyaalvi.github.io/projects/beats-by-dre/</guid>
  <pubDate>Tue, 10 Mar 2026 15:41:46 GMT</pubDate>
  <media:content url="https://sumaiyaalvi.github.io/projects/beats-by-dre/beats.png" medium="image" type="image/png" height="75" width="144"/>
</item>
</channel>
</rss>
