<?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: Varun Hameer Dutia</title>
    <description>The latest articles on DEV Community by Varun Hameer Dutia (@varun_hameerdutia_3ec29c).</description>
    <link>https://dev.to/varun_hameerdutia_3ec29c</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%2F4032789%2F0c67182e-cf9d-4a14-9a36-406eaa5bcd90.jpg</url>
      <title>DEV Community: Varun Hameer Dutia</title>
      <link>https://dev.to/varun_hameerdutia_3ec29c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/varun_hameerdutia_3ec29c"/>
    <language>en</language>
    <item>
      <title>Beyond the AQI Number: Building AirAware India with AI and Google Cloud</title>
      <dc:creator>Varun Hameer Dutia</dc:creator>
      <pubDate>Wed, 26 Aug 2026 11:45:38 +0000</pubDate>
      <link>https://dev.to/varun_hameerdutia_3ec29c/beyond-the-aqi-number-building-airaware-india-with-ai-and-google-cloud-5g1g</link>
      <guid>https://dev.to/varun_hameerdutia_3ec29c/beyond-the-aqi-number-building-airaware-india-with-ai-and-google-cloud-5g1g</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fccdwi3e8d9j7dnym78ht.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fccdwi3e8d9j7dnym78ht.png" alt="Proposed Solution" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  AirAware India with AI and Google Cloud
&lt;/h2&gt;

&lt;p&gt;Air quality has become something many of us check almost like the weather. We open an app, search for a city, and see a number:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;AQI: 168 — Moderate&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I started thinking about what happens after that.&lt;/p&gt;

&lt;p&gt;What does that number actually tell an ordinary person? Which pollutant is doing most of the work? How different is the air between home and work? And can that information be explained without expecting everyone to read a table of PM2.5, PM10, NO₂ and the rest?&lt;/p&gt;

&lt;p&gt;That question became &lt;strong&gt;AirAware India&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The working app is live: &lt;a href="https://airaware-dt66p2y4ea-uc.a.run.app" rel="noopener noreferrer"&gt;airaware-dt66p2y4ea-uc.a.run.app&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  From an AQI number to something you can ask
&lt;/h2&gt;

&lt;p&gt;India already has a serious monitoring ecosystem. The &lt;strong&gt;Central Pollution Control Board (CPCB)&lt;/strong&gt; defines the national AQI (NAQI) from pollutants such as PM2.5, PM10, NO₂, SO₂, CO and O₃.&lt;/p&gt;

&lt;p&gt;The gap I wanted to close is not “there is no data.”&lt;/p&gt;

&lt;p&gt;It is the gap between &lt;strong&gt;having measurements&lt;/strong&gt; and &lt;strong&gt;being able to interrogate them in plain language&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;AirAware is an air-quality explainer, not another dashboard. You sign in, save places, see official readings, then ask Gemini about &lt;em&gt;those&lt;/em&gt; readings — not about whatever the model remembers about Delhi or Hyderabad.&lt;/p&gt;

&lt;p&gt;Typical questions:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Why is the air quality poor today?"&lt;/p&gt;

&lt;p&gt;"Which pollutant is contributing the most?"&lt;/p&gt;

&lt;p&gt;"Compare home and office."&lt;/p&gt;

&lt;p&gt;"What changed since yesterday?"&lt;/p&gt;

&lt;p&gt;"Explain this without the technical terminology."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  AI explains the data. It does not invent it.
&lt;/h2&gt;

&lt;p&gt;Large language models are good at questions and explanations. They should not be the source of environmental numbers.&lt;/p&gt;

&lt;p&gt;If you ask AirAware about current air quality, Gemini does not guess an AQI.&lt;/p&gt;

&lt;p&gt;The path is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User question
     ↓
FastAPI (Cloud Run)
     ↓
Official Air Quality API (current + ~24h history)
     ↓
Validate / normalise
     ↓
JSON of measurements
     ↓
Gemini (Vertex AI)
     ↓
Explanation grounded only on that JSON
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two jobs stay separate.&lt;/p&gt;

&lt;p&gt;The backend decides &lt;strong&gt;what was measured&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Gemini decides &lt;strong&gt;how to say it&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If Google has no reading, or history is missing, the app says so. It does not ask the model to fill the hole.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is actually running
&lt;/h2&gt;

&lt;p&gt;This started as a concept for the &lt;strong&gt;Gen AI Academy APAC Cohort 3 Ideathon&lt;/strong&gt; (Cloud Run, Firebase, Gemini). The prototype is now a single Cloud Run service: the React app and the FastAPI backend share one origin.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cloud Run
&lt;/h3&gt;

&lt;p&gt;One container serves the UI and &lt;code&gt;/api&lt;/code&gt;. No Gemini key, Firestore credential, or Air Quality key is shipped to the browser. The Air Quality API key lives in Secret Manager. Gemini uses Vertex AI and the Cloud Run service account.&lt;/p&gt;

&lt;h3&gt;
  
  
  Firebase Authentication
&lt;/h3&gt;

&lt;p&gt;Google Sign-In. Each account has its own saved places and chats.&lt;/p&gt;

&lt;h3&gt;
  
  
  Firestore
&lt;/h3&gt;

&lt;p&gt;Profiles, locations, conversations and messages sit under that user’s UID. The browser never talks to Firestore. FastAPI uses the verified Firebase ID token.&lt;/p&gt;

&lt;h3&gt;
  
  
  Gemini on Vertex AI
&lt;/h3&gt;

&lt;p&gt;Gemini only sees JSON the backend already fetched: current AQI for saved places, hourly history, index name and scale. Org policy blocked API keys, so this is Vertex + Application Default Credentials, not a Gemini API key in &lt;code&gt;.env&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Official measurements
&lt;/h3&gt;

&lt;p&gt;Current conditions and history come from the &lt;strong&gt;Google Air Quality API&lt;/strong&gt;, with India CPCB / NAQI preferred when Google returns it, otherwise Universal AQI (UAQI). Place search uses OpenStreetMap / Nominatim so the product does not depend on Maps JavaScript billing.&lt;/p&gt;




&lt;h2&gt;
  
  
  Two AQI scales (this matters)
&lt;/h2&gt;

&lt;p&gt;A number on screen is not enough. The scales run in &lt;strong&gt;opposite directions&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Universal AQI (UAQI)&lt;/strong&gt; is roughly 0–100. &lt;strong&gt;Higher is better.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
81 with “Excellent” and PM2.5 around 3 µg/m³ is clean air.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;India NAQI (CPCB)&lt;/strong&gt; is 0–500. &lt;strong&gt;Lower is better.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
88 with “Satisfactory” and PM2.5 around 45 µg/m³ is a different story.&lt;/p&gt;

&lt;p&gt;If you only show &lt;strong&gt;81&lt;/strong&gt; next to &lt;strong&gt;88&lt;/strong&gt;, people will think 88 is better. The AirAware reading card now leads with the &lt;strong&gt;category&lt;/strong&gt;, then &lt;strong&gt;value / max&lt;/strong&gt;, then the index name and whether higher or lower is better. Chat is told the same rule: never compare raw numbers across different indexes; compare the same index, or compare pollutants.&lt;/p&gt;


&lt;h2&gt;
  
  
  Beyond a coloured circle
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Why is my air bad?
&lt;/h3&gt;

&lt;p&gt;The card and the chat both see official pollutant concentrations. Gemini can point at the dominant pollutant &lt;em&gt;if it is in the JSON&lt;/em&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Compare my locations
&lt;/h3&gt;

&lt;p&gt;Save Home, Office, or anywhere you search. Chat loads official AQI for each saved place (not only the one in the dropdown), so “compare home and office” is a real comparison.&lt;/p&gt;
&lt;h3&gt;
  
  
  What changed since yesterday?
&lt;/h3&gt;

&lt;p&gt;The backend pulls about the last 24 hours of official hourly history and a simple now-vs-~24h delta. Gemini explains that series. It does not invent a weekly trend we do not have.&lt;/p&gt;


&lt;h2&gt;
  
  
  Imperfect data, on purpose
&lt;/h2&gt;

&lt;p&gt;Sensor-backed APIs are messy: missing hours, UAQI in one city and NAQI in another, history that does not always exist.&lt;/p&gt;

&lt;p&gt;The pipeline is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Google Air Quality API
      ↓
Normalise (index, pollutants, units)
      ↓
Cache ~1 hour per location
      ↓
Gemini only sees the JSON
      ↓
User
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Unavailable history or a failed place shows up as an error field, not as a confident story.&lt;/p&gt;




&lt;h2&gt;
  
  
  Responsible AI, as product constraints
&lt;/h2&gt;

&lt;p&gt;Air quality is adjacent to health. AirAware explains environmental readings. It does not diagnose illness or replace a clinician.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AQI and concentrations come from the API, not from model weights.&lt;/li&gt;
&lt;li&gt;Each reading keeps location, index, and observation time when the API provides them.&lt;/li&gt;
&lt;li&gt;Missing data is stated, not smoothed over.&lt;/li&gt;
&lt;li&gt;User data is scoped by Firebase UID.&lt;/li&gt;
&lt;li&gt;Secrets stay on the server.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those rules are the product, not a later ethics appendix.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;a href="https://airaware-dt66p2y4ea-uc.a.run.app" rel="noopener noreferrer"&gt;the live app&lt;/a&gt; and sign in with Google.
&lt;/li&gt;
&lt;li&gt;Save two places.
&lt;/li&gt;
&lt;li&gt;Read the AQI card — category first, then the scale.
&lt;/li&gt;
&lt;li&gt;In chat, ask why it is poor, compare home and office, or what changed since yesterday.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The question I am still exploring is the same one that started this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Can generative AI make public environmental data easier to use, rather than just generating more text about it?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;AirAware India is my attempt to keep the numbers honest and still make them speak.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;#AccelerateAIwithCloudRun&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>googlecloud</category>
      <category>gemini</category>
    </item>
  </channel>
</rss>
