<?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>Forem: artakulov</title>
    <description>The latest articles on Forem by artakulov (@artakulov).</description>
    <link>https://forem.com/artakulov</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3862175%2Fe8444fd6-f6fb-4873-a2a0-add6ae03c14d.jpeg</url>
      <title>Forem: artakulov</title>
      <link>https://forem.com/artakulov</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/artakulov"/>
    <language>en</language>
    <item>
      <title>What I learned processing 50+ federal data sources with Node.js</title>
      <dc:creator>artakulov</dc:creator>
      <pubDate>Sun, 05 Apr 2026 11:47:23 +0000</pubDate>
      <link>https://forem.com/artakulov/what-i-learned-processing-50-federal-data-sources-with-nodejs-2eg6</link>
      <guid>https://forem.com/artakulov/what-i-learned-processing-50-federal-data-sources-with-nodejs-2eg6</guid>
      <description>&lt;p&gt;I've been working on a project that pulls environmental data from federal agencies — EPA, FEMA, USGS, CDC, Census, and about 45 others.&lt;/p&gt;

&lt;p&gt;Some things I ran into that might save you time:&lt;/p&gt;

&lt;h2&gt;
  
  
  Federal APIs are wild
&lt;/h2&gt;

&lt;p&gt;No two agencies use the same format. EPA gives you XML. USGS gives you tab-separated files from the 90s. FEMA has a decent REST API but paginated at 1,000 records. Census has its own query language.&lt;/p&gt;

&lt;p&gt;I ended up writing a separate parser for each source. No universal adapter worked.&lt;/p&gt;

&lt;h2&gt;
  
  
  Streaming EJS at scale
&lt;/h2&gt;

&lt;p&gt;I needed to render ~280K static HTML pages from templates. The first approach (one EJS render per file, sequential) took 14 hours. Switched to streaming writes with a worker pool — got it down to ~5 minutes. The bottleneck was always disk I/O, not rendering.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cloudflare R2 is underrated for static sites
&lt;/h2&gt;

&lt;p&gt;Hosting 280K HTML files on traditional hosting is painful. R2 + Workers turned out to be perfect — no file count limits, edge-cached globally, and the free tier covers a lot.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rate limits will find you
&lt;/h2&gt;

&lt;p&gt;Every federal API has different rate limits, and most don't document them well. EPA ECHO silently returns empty results after ~300 requests/minute. USGS returns 503s. I ended up building a generic retry queue with exponential backoff that handles all of them.&lt;/p&gt;




&lt;p&gt;Would love to hear from others who've worked with government data APIs. What's the worst format you've had to parse?&lt;/p&gt;

</description>
      <category>api</category>
      <category>data</category>
      <category>node</category>
      <category>performance</category>
    </item>
  </channel>
</rss>
