<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: WhereMyRefund</title>
    <description>The latest articles on DEV Community by WhereMyRefund (@wheremyrefund).</description>
    <link>https://dev.to/wheremyrefund</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4254738%2F8d780d58-af3e-4067-86a7-26d3b90927b4.png</url>
      <title>DEV Community: WhereMyRefund</title>
      <link>https://dev.to/wheremyrefund</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wheremyrefund"/>
    <language>en</language>
    <item>
      <title>How to chart weekly federal tax refund data</title>
      <dc:creator>WhereMyRefund</dc:creator>
      <pubDate>Fri, 20 Nov 2026 02:59:28 +0000</pubDate>
      <link>https://dev.to/wheremyrefund/how-to-chart-weekly-federal-tax-refund-data-4o6m</link>
      <guid>https://dev.to/wheremyrefund/how-to-chart-weekly-federal-tax-refund-data-4o6m</guid>
      <description>&lt;p&gt;A federal tax refund report ending May 8, 2026 lists 99,138,000 refunds. That's a total from the start of the filing season through the report's cutoff. Plotting it under the label ‘refunds this week’ would give the chart a completely different meaning. The reported total one week earlier was 97,918,000, so the difference between the two snapshots was 1,220,000. &lt;a href="https://www.irs.gov/newsroom/filing-season-statistics-for-week-ending-may-8-2026" rel="noopener noreferrer"&gt;May 8 report&lt;/a&gt; · &lt;a href="https://www.irs.gov/newsroom/filing-season-statistics-for-week-ending-may-1-2026" rel="noopener noreferrer"&gt;May 1 report&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The same mistake can sneak into a dashboard even when the numbers are loaded correctly. Here's a way to structure the dataset so the meaning of each number survives the trip from an agency table to a chart.&lt;/p&gt;

&lt;h2&gt;
  
  
  Give each season its own date
&lt;/h2&gt;

&lt;p&gt;The federal filing season reports compare two years side by side. The May 8 release compares Friday, May 8, 2026 with Friday, May 9, 2025. Keep a row for each season and preserve its actual cutoff date. A week number can help align points by position on a chart, but it can't replace the date that belongs to each observation. Saving both dates also gives a reviewer a straightforward way to check the number against the source. &lt;a href="https://www.irs.gov/newsroom/filing-season-statistics-by-year" rel="noopener noreferrer"&gt;Filing season report index&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Four fields are enough for a chart of refund counts. Keep the filing season, the cutoff date, the cumulative refund count and the original report URL. Store the date in ISO format and the count as an integer. If you also collect the published average refund amount, keep the dollar figure in a separate column. It's a snapshot average, and subtracting consecutive averages doesn't tell you the average amount of newly issued refunds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Calculate differences within each season
&lt;/h2&gt;

&lt;p&gt;Sort on the season and cutoff date, then subtract the previous cumulative value &lt;strong&gt;within the same season&lt;/strong&gt;. Give the first row an empty difference. Its entire cumulative count doesn't automatically belong to its last seven days. If a report is missing, leave the weekly value empty as well. A change measured over fourteen days belongs on a longer interval.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timedelta&lt;/span&gt;

&lt;span class="n"&gt;previous&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;sorted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"filing_season"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"week_ending"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;season&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"filing_season"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;cutoff&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fromisoformat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"week_ending"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"refunds_issued_cumulative"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;prior&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;previous&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;season&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;difference&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;prior&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;cutoff&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;prior&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nf"&gt;timedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;days&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;difference&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;prior&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"refunds_issued_change_since_prior_report"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;difference&lt;/span&gt;
    &lt;span class="n"&gt;previous&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;season&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cutoff&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before you run that loop, check that each pair of season and cutoff date is unique. If the difference turns out negative, check the two source reports. A correction to a published cumulative figure can be important data in its own right. Converting negative values to zero would hide it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pick a consistent refund count
&lt;/h2&gt;

&lt;p&gt;The agency reports overall refunds and direct deposit refunds in separate rows. The April 17, 2026 release explains that the overall count covers refunds for current-year returns. Its direct deposit count also includes refunds for prior-year returns processed in 2026. You can compare the overall count across dates if you keep the series definition attached to the data. Mixing the two rows can produce a chart whose numbers look plausible but cover different groups of returns. &lt;a href="https://www.irs.gov/newsroom/filing-season-statistics-for-week-ending-april-17-2026" rel="noopener noreferrer"&gt;April 17 report and footnote&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Label what the chart can show
&lt;/h2&gt;

&lt;p&gt;Use a line for cumulative refunds and a separate bar chart for the change between reports. In each tooltip, show the exact cutoff date, season and either the cumulative count or the two dates behind the difference. This makes it possible to verify a number without guessing what a chart's date label represents.&lt;/p&gt;

&lt;p&gt;These series show the pace of refunds nationwide. They don't follow a cohort of returns from filing to payment. For a concrete example, the &lt;a href="https://wheremyrefund.org/irs-refund-schedule" rel="noopener noreferrer"&gt;WhereMyRefund schedule and historical tables&lt;/a&gt; let you inspect the published season totals alongside a separate acceptance-week guide. This example was prepared for &lt;a href="https://wheremyrefund.org/" rel="noopener noreferrer"&gt;WhereMyRefund&lt;/a&gt;, an independent refund information project.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Drafted with ChatGPT. The figures and dates were checked against the linked filing season reports.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>data</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
