<?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: Metra</title>
    <description>The latest articles on DEV Community by Metra (@openmetrics).</description>
    <link>https://dev.to/openmetrics</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%2F3881227%2Fa8913449-cd02-46e9-b9fb-653bf45752ae.jpg</url>
      <title>DEV Community: Metra</title>
      <link>https://dev.to/openmetrics</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/openmetrics"/>
    <language>en</language>
    <item>
      <title>I Compared 195 Foods Using USDA Data — The Results Changed How I Think About Nutrition</title>
      <dc:creator>Metra</dc:creator>
      <pubDate>Wed, 15 Apr 2026 20:57:38 +0000</pubDate>
      <link>https://dev.to/openmetrics/i-compared-195-foods-using-usda-data-the-results-changed-how-i-think-about-nutrition-mpn</link>
      <guid>https://dev.to/openmetrics/i-compared-195-foods-using-usda-data-the-results-changed-how-i-think-about-nutrition-mpn</guid>
      <description>&lt;p&gt;I wanted to settle debates like "is chicken actually better than salmon?" with real numbers. So I pulled data from the USDA FoodData Central API and built a side-by-side comparison tool for 195 common foods.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Setup
&lt;/h2&gt;

&lt;p&gt;Every food is compared on 10 metrics per 100g serving:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Calories, Protein, Fat, Carbs, Fiber, Sugar&lt;/li&gt;
&lt;li&gt;Vitamin C, Calcium, Iron, Potassium&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The tool shows who "wins" each category and gives an overall winner based on total categories won.&lt;/p&gt;

&lt;h2&gt;
  
  
  5 Findings That Surprised Me
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Broccoli Has Respectable Protein
&lt;/h3&gt;

&lt;p&gt;At 2.8g protein per 100g with only 34 calories, broccoli has one of the best protein-to-calorie ratios among vegetables. It won't replace chicken breast (31g protein), but for a vegetable, it's surprisingly competitive.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Sweet Potato vs Regular Potato Is Closer Than You Think
&lt;/h3&gt;

&lt;p&gt;Everyone assumes sweet potatoes are the "healthy" option. The data shows it's not that simple:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Sweet Potato&lt;/th&gt;
&lt;th&gt;Regular Potato&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Calories&lt;/td&gt;
&lt;td&gt;86&lt;/td&gt;
&lt;td&gt;77&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Protein&lt;/td&gt;
&lt;td&gt;1.6g&lt;/td&gt;
&lt;td&gt;2.0g&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fiber&lt;/td&gt;
&lt;td&gt;3.0g&lt;/td&gt;
&lt;td&gt;2.2g&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vitamin C&lt;/td&gt;
&lt;td&gt;2.4mg&lt;/td&gt;
&lt;td&gt;19.7mg&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Potassium&lt;/td&gt;
&lt;td&gt;337mg&lt;/td&gt;
&lt;td&gt;425mg&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Regular potatoes actually win on protein, vitamin C, and potassium. Sweet potatoes win on fiber and vitamin A (not shown). It's a genuine toss-up depending on what you need.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Almonds vs Walnuts — Not What I Expected
&lt;/h3&gt;

&lt;p&gt;Both are "healthy nuts" but they're surprisingly different:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Almonds&lt;/strong&gt;: 579 cal, 21g protein, 12g fiber, 269mg calcium&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Walnuts&lt;/strong&gt;: 654 cal, 15g protein, 7g fiber, 98mg calcium&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Almonds dominate on protein, fiber, and calcium. Walnuts win on omega-3s (not in our dataset, but worth noting).&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Egg vs Tofu — The Complete Protein Debate
&lt;/h3&gt;

&lt;p&gt;Per 100g: eggs have 13g protein at 155 cal, while tofu has 8g protein at 76 cal. But tofu has better protein-per-calorie ratio if you're counting. The "which is better" answer genuinely depends on your goals.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. The Most Nutrient-Dense Foods Per Calorie
&lt;/h3&gt;

&lt;p&gt;When you sort our 195 foods by nutrients-per-calorie, leafy greens dominate: spinach, kale, and watercress pack the most vitamins and minerals for the fewest calories. Not surprising, but the gap is bigger than I expected.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data&lt;/strong&gt;: &lt;a href="https://fdc.nal.usda.gov/" rel="noopener noreferrer"&gt;USDA FoodData Central&lt;/a&gt; SR Legacy dataset — 195 foods with complete nutrition profiles&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Framework&lt;/strong&gt;: &lt;a href="https://astro.build/" rel="noopener noreferrer"&gt;Astro&lt;/a&gt; generating static HTML (zero JavaScript, instant loads)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hosting&lt;/strong&gt;: Cloudflare Pages (free)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pages&lt;/strong&gt;: 18,900+ comparison pages (every possible pair of 195 foods)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The comparison tool lets you pick any two foods and see them side-by-side with visual bars showing who wins each metric.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;The full tool is free at &lt;a href="https://food-nutrition-3xm.pages.dev/" rel="noopener noreferrer"&gt;food-nutrition-3xm.pages.dev&lt;/a&gt; — search for any food, pick two, compare. There's also a random comparison button if you want to discover surprising matchups.&lt;/p&gt;

&lt;p&gt;This is part of a series where I'm building free tools from government data APIs. The solar ROI calculator (&lt;a href="https://solar-roi-13a.pages.dev/" rel="noopener noreferrer"&gt;using NREL data&lt;/a&gt;) was the first — nutrition was the second.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;All nutrition data from USDA FoodData Central. Values per 100g serving.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>nutrition</category>
      <category>data</category>
      <category>webdev</category>
      <category>health</category>
    </item>
    <item>
      <title>I Analyzed Solar Panel ROI Across All 50 US States Using Government Data — Here's What Surprised Me</title>
      <dc:creator>Metra</dc:creator>
      <pubDate>Wed, 15 Apr 2026 20:56:31 +0000</pubDate>
      <link>https://dev.to/openmetrics/i-analyzed-solar-panel-roi-across-all-50-us-states-using-government-data-heres-what-surprised-me-4hc6</link>
      <guid>https://dev.to/openmetrics/i-analyzed-solar-panel-roi-across-all-50-us-states-using-government-data-heres-what-surprised-me-4hc6</guid>
      <description>&lt;p&gt;Solar panel ROI varies wildly across the United States — but not for the reasons most people think. I built a free calculator using data from the NREL PVWatts API and EIA electricity rates to compare every state. Here's what the data shows.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Surprising Finding: Electricity Rates Matter More Than Sunshine
&lt;/h2&gt;

&lt;p&gt;Most people assume the sunniest states have the best solar ROI. The data tells a different story.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Arizona gets the most sunshine&lt;/strong&gt; (6.54 kWh/m²/day) but only ranks mid-pack for ROI at 2.5x with about a 10-year payback. Why? Because electricity is cheap there — so each kWh your panels generate saves you less money.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hawaii has the highest ROI at 5.9x&lt;/strong&gt; with a 4.2-year payback — not because of more sun (5.82 kWh/m²/day, less than Arizona), but because electricity costs are extremely high. Every kWh produced saves significantly more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Massachusetts beats Arizona on ROI&lt;/strong&gt; (3.7x vs 2.5x) despite getting way less sun (4.7 vs 6.54 kWh/m²/day). Again — higher electricity rates drive better financial returns.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Top 5 States for Solar ROI
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;State&lt;/th&gt;
&lt;th&gt;ROI&lt;/th&gt;
&lt;th&gt;Payback&lt;/th&gt;
&lt;th&gt;Solar Irradiance&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Hawaii&lt;/td&gt;
&lt;td&gt;5.9x&lt;/td&gt;
&lt;td&gt;4.2 years&lt;/td&gt;
&lt;td&gt;5.82 kWh/m²/day&lt;/td&gt;
&lt;td&gt;Extremely high electricity costs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;California&lt;/td&gt;
&lt;td&gt;4.5x&lt;/td&gt;
&lt;td&gt;5.6 years&lt;/td&gt;
&lt;td&gt;5.87 kWh/m²/day&lt;/td&gt;
&lt;td&gt;High rates + strong sun&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Massachusetts&lt;/td&gt;
&lt;td&gt;3.7x&lt;/td&gt;
&lt;td&gt;6.8 years&lt;/td&gt;
&lt;td&gt;4.70 kWh/m²/day&lt;/td&gt;
&lt;td&gt;High electricity rates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;New York&lt;/td&gt;
&lt;td&gt;2.5x&lt;/td&gt;
&lt;td&gt;10 years&lt;/td&gt;
&lt;td&gt;4.48 kWh/m²/day&lt;/td&gt;
&lt;td&gt;Above-average rates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Arizona&lt;/td&gt;
&lt;td&gt;2.5x&lt;/td&gt;
&lt;td&gt;10 years&lt;/td&gt;
&lt;td&gt;6.54 kWh/m²/day&lt;/td&gt;
&lt;td&gt;Best sun, but cheap power&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  The Worst State
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Alaska&lt;/strong&gt; comes in last at 1.4x ROI with a 17+ year payback. Only 2.4 kWh/m²/day of solar irradiance makes it almost impossible for panels to generate enough energy to justify the cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built This
&lt;/h2&gt;

&lt;p&gt;I pulled data from two free government APIs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://developer.nrel.gov/" rel="noopener noreferrer"&gt;NREL PVWatts API&lt;/a&gt;&lt;/strong&gt; — models solar energy production based on location-specific irradiance, weather, and panel angles. Assumes a standard 6kW residential system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://www.eia.gov/" rel="noopener noreferrer"&gt;EIA&lt;/a&gt;&lt;/strong&gt; — provides state-level residential electricity rates.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The ROI formula: (annual production × electricity rate × 25 years) / system cost.&lt;/p&gt;

&lt;p&gt;I built the calculator with &lt;a href="https://astro.build/" rel="noopener noreferrer"&gt;Astro&lt;/a&gt; (zero JavaScript, static HTML) and deployed on Cloudflare Pages for free. Each state page lets you adjust system size, cost, and electricity rate to see personalized estimates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It Yourself
&lt;/h2&gt;

&lt;p&gt;The full calculator is free at &lt;a href="https://solar-roi-13a.pages.dev/" rel="noopener noreferrer"&gt;solar-roi-13a.pages.dev&lt;/a&gt; — no signup, no ads. Pick your state, adjust the inputs, see your ROI.&lt;/p&gt;

&lt;p&gt;All the data comes from official government sources. I'd love to hear if the estimates match what you've seen from real-world solar installations.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Location economics &amp;gt; weather&lt;/strong&gt; for solar ROI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Government APIs are underused&lt;/strong&gt; — NREL, BLS, USDA, FCC all have free, high-quality data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Static sites are powerful&lt;/strong&gt; — 500+ pages, zero hosting cost, instant page loads&lt;/li&gt;
&lt;li&gt;This is part of a larger project where I'm building &lt;a href="https://solar-roi-13a.pages.dev/about/" rel="noopener noreferrer"&gt;free data tools from government APIs&lt;/a&gt; covering solar, nutrition, salaries, and more.&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;em&gt;Data sourced from NREL PVWatts API and EIA. Estimates don't include the federal 30% ITC tax credit, state incentives, or utility rebates, which would improve ROI further.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>solar</category>
      <category>data</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
