惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Latest news
Latest news
C
Check Point Blog
H
Help Net Security
Engineering at Meta
Engineering at Meta
Y
Y Combinator Blog
Stack Overflow Blog
Stack Overflow Blog
MyScale Blog
MyScale Blog
P
Proofpoint News Feed
Recorded Future
Recorded Future
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
H
Heimdal Security Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
B
Blog RSS Feed
W
WeLiveSecurity
G
Google Developers Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
P
Proofpoint News Feed
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Martin Fowler
Martin Fowler
酷 壳 – CoolShell
酷 壳 – CoolShell
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
宝玉的分享
宝玉的分享
Apple Machine Learning Research
Apple Machine Learning Research
The GitHub Blog
The GitHub Blog
C
CERT Recently Published Vulnerability Notes
aimingoo的专栏
aimingoo的专栏
D
DataBreaches.Net
PCI Perspectives
PCI Perspectives
The Register - Security
The Register - Security
阮一峰的网络日志
阮一峰的网络日志
罗磊的独立博客
H
Hacker News: Front Page
Google DeepMind News
Google DeepMind News
有赞技术团队
有赞技术团队
The Last Watchdog
The Last Watchdog
GbyAI
GbyAI
L
Lohrmann on Cybersecurity
B
Blog
NISL@THU
NISL@THU
T
The Exploit Database - CXSecurity.com
Microsoft Azure Blog
Microsoft Azure Blog
博客园_首页
N
Netflix TechBlog - Medium
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
L
LangChain Blog
J
Java Code Geeks
SecWiki News
SecWiki News
博客园 - 三生石上(FineUI控件)
P
Privacy & Cybersecurity Law Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
I Built a Carbon Footprint Calculator That Generates Unique SVG Fingerprints — Here’s How (Earth Day 2026 🌍)
Mamoor Ahmad · 2026-04-22 · via DEV Community

I Built a Carbon Footprint Calculator That Generates Unique SVG Fingerprints — Here's How (Earth Day 2026 🌍)

TL;DR: Carbon Fingerprint is a single-file web app that calculates your carbon footprint from 5 lifestyle questions, then renders a unique organic SVG fingerprint seeded from your answers. It's backed by real NASA GISS temperature data (1880–2025), IPCC AR6 emission factors, and covers 5,012 cities across 157+ countries. Zero backend. Zero API keys. Just one index.html.

Carbon Fingerprint — Hero / Landing Page
The landing page — dark mode with animated SVG particles and a glowing radial gradient backdrop.


Why Another Carbon Calculator?

Most carbon footprint calculators feel like tax forms — long, boring, and forgettable. You fill them out, get a number, and never think about it again.

I wanted something different. Something visual, personal, and shareable. Something where the result itself feels like yours — not just a number, but a pattern that's as unique as your actual environmental impact.

That's where the fingerprint idea came from.

The Concept: Your Carbon = Your Fingerprint

The core idea: your answers to 5 simple questions get transformed into a procedurally generated SVG fingerprint. No two people get the same visualization because the pattern is seeded from their specific answer combination.

// Seed from user's answers for unique fingerprint
const seed = answers.reduce((a, b) => a * 7 + b, 42);

function seededNoise(i, j) {
  const x = Math.sin(seed * 127.1 + i * 311.7 + j * 74.7) * 43758.5453;
  return x - Math.floor(x);
}

Enter fullscreen mode Exit fullscreen mode

The fingerprint uses organic ridge patterns — concentric rings perturbed by multiple sine waves, a central spiral whorl, and category-specific arc segments that glow based on your highest emission areas. It's not just decorative; it encodes real data.

The 5 Questions (Backed by Real Science)

Each question maps to a lifestyle category with IPCC AR6-calibrated emission factors:

Quiz Question —
One of 5 quiz questions — each option shows the CO₂ equivalent and the scientific source.

# Category Example Options Source
1 🚗 Transport Walk/bike (0.2t) → Frequent flights (4.5t) IPCC AR6 WG3 Ch.10
2 🥗 Diet Plant-based (1.0t) → Heavy meat (3.5t) Poore & Nemecek 2018
3 ⚡ Energy Renewable (0.3t) → Fossil heavy (3.2t) IEA 2023
4 📦 Consumption Minimal (0.4t) → High volume (2.8t) UNEP / IPCC AR6 WG3 Ch.5
5 ✈️ Flights None (0t) → 3+ flights (4.0t) IPCC AR6 WG3 Ch.10

A base emission of 1.5 tonnes is added to every result (shared infrastructure, government services, etc.). Total CO₂ determines your label:

  • ≤2.5t → 🌱 Climate Champion
  • ≤4.5t → 🌿 Eco-Conscious
  • ≤7t → 🌳 Growing Awareness
  • ≤12t → 🔥 Above Average
  • >12t → 💨 Heavy Footprint

Under the Hood: The Fingerprint Generator

This is the part I'm most proud of. The SVG is built entirely in JavaScript — no images, no canvas, no libraries.

Ridge Pattern Generation

The fingerprint consists of ~26 concentric organic rings, each perturbed by three overlapping sine waves:

for (let r = 18; r < 148; r += 5) {
  for (let i = 0; i <= segments; i++) {
    const angle = (i / segments) * Math.PI * 2;
    // Three-layer organic perturbation
    const n1 = Math.sin(angle * 3 + r * 0.1 + seed * 0.01) * (2 + r * 0.03);
    const n2 = Math.sin(angle * 7 + r * 0.05) * (1 + r * 0.015);
    const n3 = Math.cos(angle * 5 + seed * 0.02) * (1.5 + r * 0.02);
    const perturbedR = r + n1 + n2 + n3;
    // ... build SVG path with cubic bezier smoothing
  }
}

Enter fullscreen mode Exit fullscreen mode

The seed parameter comes from the user's answers, so different response combinations produce visibly different ridge shapes — just like real fingerprints.

Category Arcs

Overlaid on the ridges are segmented arcs — one ring per emission category. The arc length and opacity scale with the CO₂ value for that category:

// Transport arc (blue gradient)
const transportArc = createArc(cx, cy, 55, 270, 270 + (categoryCO2.transport / maxVal) * 180);
// Diet arc (green gradient)  
const dietArc = createArc(cx, cy, 70, 180, 180 + (categoryCO2.diet / maxVal) * 180);

Enter fullscreen mode Exit fullscreen mode

So a heavy meat eater gets a longer, brighter diet arc. A frequent flyer gets a dominant transport ring. The fingerprint literally reflects your lifestyle.

Animated Entry

Results Page — SVG Fingerprint + Category Breakdown
The full results view — unique SVG fingerprint, CO₂ score, category breakdown bars, comparison chart vs global/US averages and the 1.5°C target, and city-specific climate data.

The whole thing draws itself with a CSS stroke-dashoffset animation:

.fingerprint-svg path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawRidge 2s ease forwards;
}

@keyframes drawRidge {
  to { stroke-dashoffset: 0; }
}

Enter fullscreen mode Exit fullscreen mode

Each ring has a staggered delay, creating that "drawing itself" effect.

Real Climate Data: 144 Years of NASA Temperature Data

The app embeds real NASA GISS temperature anomaly data from 1880 to 2025 — not estimates, actual measurements:

const GISS_GLOBAL_ANOMALY = [
  -0.17, -0.8, -0.11, -0.17, -0.28, -0.33, // 1880-1885
  // ... 140+ years of data ...
  1.17, 1.28, 1.19  // 2023-2025
];

Enter fullscreen mode Exit fullscreen mode

This data renders as an animated timeline chart in the results section, showing the unmistakable warming trend from the late 1800s to today. When someone sees their carbon fingerprint next to real temperature data spanning their great-grandparents' lifetimes, it hits differently than a bar chart.

Climate Data — 144 Years of NASA GISS Temperature Anomalies
The climate section — NASA GISS temperature anomaly timeline (1880–2025), searchable city dropdown (5,012 cities), and local climate indicators.

5,012 Cities with Local Climate Indicators

Each city carries four data points from IPCC AR6 regional chapters and national meteorological services:

Indicator Example (New Delhi) Source
🌡️ Local Temperature 25.8°C, +2.1°C rise IMD / IPCC AR6 WG2 Ch.10
🏭 CO₂ Concentration 421 ppm Global (Mauna Loa)
🌊 Sea Level Rise 0m (inland) IPCC AR6 WG2
⚡ Extreme Weather Days 72 days/year IMD / IPCC AR6 WG2

Coverage spans 157+ countries — from Whitehorse, Canada (temp rise: +2.8°C 🥶) to Darwin, Australia (65 extreme weather days/year 🌀).

The Share Card: From SVG to PNG

Users can export their results as a 1080×1350px PNG (Instagram-ready). The pipeline:

  1. Build a hidden div with the fingerprint, breakdown, comparison bars, and city data
  2. Lazy-load html2canvas from CDN (only when the user clicks "Share")
  3. Render to canvas → convert to PNG → trigger download
async function generateShareCard() {
  await loadHtml2canvas(); // lazy, ~45KB gzipped
  const card = document.getElementById('shareCard');
  const canvas = await html2canvas(card, {
    scale: 2,
    backgroundColor: '#0a0f1a',
    useCORS: true
  });
  canvas.toBlob(blob => {
    const url = URL.createObjectURL(blob);
    // download or native share...
  });
}

Enter fullscreen mode Exit fullscreen mode

The share card also includes a shareable URL — answers are base64-encoded in the query string (?r=MjIxMDE), so you can send your exact fingerprint to a friend and they see it instantly.

10 Languages, 1 File

The entire i18n system is a nested object with string keys:

const translations = {
  en: { hero_title_1: 'Discover Your', hero_title_2: 'Carbon Fingerprint', ... },
  es: { hero_title_1: 'Descubre Tu', hero_title_2: 'Huella de Carbono', ... },
  zh: { hero_title_1: '发现你的', hero_title_2: '碳指纹', ... },
  // + hi, pt, fr, de, ja, ko, ar
};

Enter fullscreen mode Exit fullscreen mode

Browser language is auto-detected. A manual selector sits in the header. Every UI element — quiz options, results, methodology, share card — is translated.

Technical Choices I'd Make Again

Single HTML File

The entire app is one 9,400-line index.html. CSS is in <style>, JS is in <script>, data is embedded. No build step, no bundler, no node_modules.

Why it works: For a project like this, the complexity of a framework would add nothing. The quiz has 5 screens. The state is a single array. The "hardest" part (the SVG fingerprint) is pure math. Vercel deploys it with zero config.

PWA + Offline Support

The manifest.json makes it installable on phones. After the first load, everything works offline — the NASA data, city data, translations, all embedded.

Privacy-Respecting Analytics

Just anonymous hit counters via countapi.xyz. No cookies, no PII, no tracking scripts. You don't need to know who took the quiz, just that people are engaging.

Accessibility Built In

  • ARIA roles on all interactive elements
  • Keyboard navigation throughout
  • prefers-reduced-motion disables all animations
  • Skip-to-content link
  • Screen reader labels on the fingerprint visualization

What I Learned Building This

  1. SVG math is addictive. Once I started generating organic patterns with sine wave perturbation, I couldn't stop tweaking parameters. The fingerprint went through ~30 iterations.

  2. Real data > synthetic data. Embedding actual NASA temperature anomalies made the results feel credible. People trust a number more when they can see the 144-year dataset behind it.

  3. i18n from day one is worth it. Adding 10 languages after the fact would have been painful. Doing it as a translations[key] pattern from the start was maybe 2 extra hours.

  4. Single-file apps have superpowers. No CI/CD pipeline. No dependency audits. No framework migrations. Just index.html on Vercel. For a focused tool, this is the way.

Try It

👉 carbonprint.earth

Take the quiz in 60 seconds. Get your fingerprint. Share it. Compare with friends.

Star the repo on GitHub if you find it useful.

Happy Earth Day 2026. 🌍 Our Power, Our Planet.


Built with vanilla JS, SVG math, and 144 years of climate data. No frameworks were harmed in the making of this app.