title: How do I make a line graph that combines multiple entries per day over a period of time?
body: <p>Not sure if my title makes sense, but I'm trying to graph out spending over time. Here is my dput:</p>
  <pre><code>structure(list(case = c(1L, 1L, 1L, 1L, 1L, 2L), year = c(2021L, 
  2021L, 2021L, 2021L, 2021L, 2021L), month = c(11L, 11L, 11L, 
  11L, 11L, 11L), day = c(11L, 11L, 11L, 11L, 11L, 12L), type1 = c(&quot;food&quot;, 
  &quot;food&quot;, &quot;drink&quot;, &quot;misc&quot;, &quot;drink&quot;, &quot;drink&quot;), type2 = c(&quot;restaurant&quot;, 
  &quot;tang_kee&quot;, &quot;coffee&quot;, &quot;headphone&quot;, &quot;cola&quot;, &quot;coffee_grounds&quot;), 
      amount = c(210, 12, 9, 50, 18, 39)), row.names = c(NA, 6L
  ), class = &quot;data.frame&quot;)
  </code></pre>
  <p>When I just make a simple line graph with gglines, it makes this:</p>
  <pre><code>ggline(slack_budget,
           x=&quot;case&quot;,
           y=&quot;amount&quot;)+
    theme_bw()+
    labs(title = &quot;Progression of Spending November and December&quot;,
         subtitle = &quot;Non-Rent / Non-Utility Spending Line Graph&quot;,
         caption = &quot;*Data obtained from local matrix.&quot;)+
    theme(plot.title = element_text(face = &quot;bold&quot;),
          plot.caption = element_text(face = &quot;italic&quot;))
  </code></pre>
  <p>Which creates this:</p>
  <p><a href="https://i.stack.imgur.com/mo4Zz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mo4Zz.png" alt="enter image description here" /></a></p>
  <p>As you can see here, it graphs a point for every individual entry for spending on that day. This looks a little ugly in my opinion because it doesn't really tell a picture of how much is actually being spent day to day in total.</p>
  <p>What I'm more looking for is combining all the entries for each day without combining each month's spending (hence why I have x = case instead of x = day). If there is an easier way of achieving that, it would be great to know.</p>
  <h1>Solution:</h1>
  <p>Thanks to Stefan for his answer. I have now created this lovely plot after aggregating the data:</p>
  <p><a href="https://i.stack.imgur.com/KdLCT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KdLCT.png" alt="enter image description here" /></a></p>