AQI India's Air Quality Index: Real-time Air Pollution Level (2023)

'; // $('.card-forcast-next6').html(htmlnext6); }} var componant = [ { senDevId: "pm25", sensorName: "PM2.5", sensorUnit: " (µg/m³)" }, { senDevId: "pm10", sensorName: "PM10", sensorUnit: " (µg/m³)" }, { senDevId: "so2", sensorName: "SO2", sensorUnit: " (ppb)" }, { senDevId: "no2", sensorName: "NO2", sensorUnit: " (ppb)" }, { senDevId: "o3", sensorName: "O3", sensorUnit: " (ppb)" }, { senDevId: "co", sensorName: "CO", sensorUnit: " (ppb)" } ]; var ddlcomponant = $(""); $(componant).each(function () { var option = $("

"); option.append(this.sensorName); option.append(this.sensorUnit); option.val(this.senDevId); ddlcomponant.append(option); }); var dvcomponant = $("#mysensorselect") var div = $("

"); div.append(ddlcomponant); dvcomponant.append(div); var componanttime = [ { senTimeId: "1", sensorTime: "24 hours"}, { senTimeId: "2", sensorTime: "Last 7 days"}, { senTimeId: "3", sensorTime: "Last month"} ]; var ddlcomponanttime = $(""); $(componanttime).each(function () { var option = $("

"); option.html(this.sensorTime); option.val(this.senTimeId); // option.setAttribute("selected",selected); ddlcomponanttime.append(option); }); var dvcomponanttime = $("#mysensortime") var div = $("

"); div.append(ddlcomponanttime); dvcomponanttime.append(div); function searchlocationName(){ var str = document.getElementById("searchlocationName").value; var str_lenght = str.length; $.ajax({ url: 'https://api.aqi.in/api/v1/typingSearch', headers: { 'Authorization':authtoken, 'Content-Type':'aapplication/x-www-form-urlencoded', 'Accept':'application/json', 'searchString': str }, method: 'GET', dataType: 'json', async: true, data: str, success: function(data){ var key = "message"; var country_details = ''; var html=''; if (!data.hasOwnProperty(key)) { $.each(data.searchResult, function(index ,value) { var aircomponants = value.airComponents; for (var a in aircomponants) { var ar = aircomponants[a]; if (ar['senDevId'] == "AQI-IN") { var aqi = ar['sensorData']; } } var htmlText = ''; var aqicolor; if(aqi>=0 && aqi<=50 ) { aqicolor = "#34a12b"; } else if(aqi>50 && aqi<=100) { aqicolor = "#d4cc0f"; } else if(aqi>100 && aqi<=200) { aqicolor = "#FFA500"; } else if(aqi>200 && aqi<=300) { aqicolor = "#FF69B4"; } else if(aqi>300 && aqi<=400) { aqicolor = "#800080"; }else { aqicolor = "#ec0000"; } api2='aqi'; html += '

(Video) AQI Air Quality Index App's Tutorial Video | Check Air Pollution Level Worldwide

  • '+value.StationName+''+Math.round(aqi)+'
  • '; }); $(".ulSub").html(html); $(".ulSub").addClass("ulSub1"); $(".ulSub").show(); } if(str_lenght < 1 ) { $(".ulSub").hide(); } } }); } function searchlocationNameMobile(){ var str = document.getElementById("searchlocationNameMobile").value; var str_lenght = str.length; $.ajax({ url: 'https://api.aqi.in/api/v1/typingSearch', headers: { 'Authorization':authtoken, 'Content-Type':'aapplication/x-www-form-urlencoded', 'Accept':'application/json', 'searchString': str }, method: 'GET', dataType: 'json', async: true, data: str, success: function(data){ var key = "message"; var country_details = ''; var html=''; if (!data.hasOwnProperty(key)) { $.each(data.searchResult, function(index ,value) { var aircomponants = value.airComponents; for (var a in aircomponants) { var ar = aircomponants[a]; if (ar['senDevId'] == "AQI-IN") { var aqi = ar['sensorData']; } } var htmlText = ''; var aqicolor; if(aqi>=0 && aqi<=50 ) { aqicolor = "#34a12b"; } else if(aqi>50 && aqi<=100) { aqicolor = "#d4cc0f"; } else if(aqi>100 && aqi<=200) { aqicolor = "#FFA500"; } else if(aqi>200 && aqi<=300) { aqicolor = "#FF69B4"; } else if(aqi>300 && aqi<=400) { aqicolor = "#800080"; }else { aqicolor = "#ec0000"; } api2='aqi'; html += '

  • '+value.StationName+''+Math.round(aqi)+'
  • '; }); $(".ulSub").html(html); $(".ulSub").addClass("ulSub1"); $(".ulSub").show(); } if(str_lenght < 1 ) { $(".ulSub").hide(); } } }); }// ==================== End script of show country/city/area values in Dropdown =================== function myFunctionOnClick(locationId=0,locationdata=0){ $("tbody tr #delete").css("opacity", "1"); $("tbody tr #delete").css("cursor", "pointer"); $("tbody tr #delete").removeAttr( 'disabled', 'disabled' ); tablecity1(locationId,locationdata); $(".ulSub").hide(); $("#searchlocationName").val(""); $("#searchlocationNameMobile").val(""); }var myChart;var config; var clickedSearch = false; if(screen.width < 640) { document.getElementById("search_locationsBar").addEventListener("click", function() { clickedSearch = true; $(".logo_search_group").addClass("justify-content-between"); $(".sticky .form_search_icon input").css("margin-right","0px"); $(".logo_search_group").addClass("justify-content-sm-between"); $("#top_headerLoc").css("display","none"); if(screen.width < 420) { $(".sticky .form_search_icon input").css("width","195px"); $("#search_locationsBar").css("width","65%") $(".sticky .form_search_icon input").css("height","33px"); $(".sticky .form_search_icon input").css("font-size","10px"); $(".form_search_icon i").css("left","19px"); $(".form_search_icon i").css("top","27px"); $(".form_search_icon i").css("font-size","15px"); // $("#top_headerLoc").css("display","none"); } else { $(".sticky .form_search_icon input").css("width","264px"); // $(".form_search_icon a").css("width","195px"); } $(".logo_left_search").css("margin-left","0px"); $(".form_search_icon a").css("width","20px"); $(".form_search_icon a > img").css("width","20px"); $(".form_search_icon input").css("border-color","#f1f2f6"); $(".form_search_icon input").css("background-color", "#f1f2f6"); $(".blink-location-icon").css("width","8px"); }) } const rankings = "Zambia" if(screen.width < 641) { $("#nearest_location").children("hr").css("display","none") $(".dot").css("display","none") } let lastSrollPosn = 0; let opacityVal; var position = $(window).scrollTop(); if(location_val === 3) { $("#nearest_location").css("display","none") } else { $(window).scroll(function() { var scroll = $(this).scrollTop(); if(screen.width > 280 ) { if(scroll > position) { if(screen.width < 640) { if(scroll > 10) { $(".app-button").css("display","block") if(screen.width < 420) { $(".logo_left_search").css("width","15%") $(".form_search_icon i").css("left","10px") $(".form_search_icon i").css("font-size","18px") $(".form_search_icon i").css("top","30px") } if(screen.width > 420) { clickedSearch = false; } if(clickedSearch) { $(".sticky .form_search_icon input").css("width","195px"); $("#search_locationsBar").css("width","65%") $(".sticky .form_search_icon input").css("height","33px"); $(".sticky .form_search_icon input").css("font-size","10px"); $(".form_search_icon i").css("left","19px"); $(".form_search_icon i").css("top","28px"); $(".form_search_icon i").css("font-size","15px"); } else { // clickedSearch = false; $(".sticky .form_search_icon input").css("width","0px"); $(".sticky .form_search_icon input").css("margin-right","-50px"); $(".logo_search_group").removeClass("justify-content-between"); $(".logo_search_group").removeClass("justify-content-sm-between"); $(".form_search_icon input").css("background-color", "transparent"); $(".form_search_icon input").css("border-color","transparent"); $(".form_search_icon a").css("width","0px"); $(".form_search_icon a > img").css("width","0px"); $(".blink-location-icon").css("width","0px"); // } $("#top_headerLoc").css("display","block"); $("#top_headerLoc").css("margin","0px auto"); } } } if(screen.width > 1900) { if(scroll > 2500) { $("#nearest_location").css("display","none") } } else { if(scroll > 2000) { $("#nearest_location").css("display","none") } } } else{ let elemHeight = $(this).height();let scrlDown = Math.floor((scroll/10)) * 2; if(screen.width < 640) { if(scrlDown < 14) { clickedSearch = false; $(".app-button").css("display","none") if(screen.width < 420) { $(".logo_left_search").css("width","65%"); $(".sticky .form_search_icon input").css("width","195px"); $(".form_search_icon i").css("left","18px") $(".form_search_icon i").css("font-size","15px") $(".form_search_icon i").css("top","28px"); } else { $(".sticky .form_search_icon input").css("width","264px"); } if(screen.width < 360) { $(".logo_left_search").css("margin-left","-25px"); } else { $(".logo_left_search").css("margin-left","0px"); } $(".logo_search_group").addClass("justify-content-between"); $(".sticky .form_search_icon input").css("margin-right","0px"); $(".logo_search_group").addClass("justify-content-sm-between"); $("#top_headerLoc").css("display","none"); $(".form_search_icon a").css("width","20px"); $(".form_search_icon a > img").css("width","20px"); $(".form_search_icon input").css("border-color","#f1f2f6"); $(".form_search_icon input").css("background-color", "#f1f2f6"); $(".blink-location-icon").css("width","8px"); } } if(scrlDown < 376) { $("#nearest_location").css("display","block") } } position = scroll; } }); } // map1(); function map1(){ // Setup mapconst shapes = ['square'];const colors = ['red'];const space = 0.005;const lat = 44.635;const lng = 22.653;const lats = shapes.slice().map((shape,i) => lat);const lngs = colors.slice().map((x,i) => lng);const rows = lats.map((y) => lngs.map(x => [y, x]));const lat1 = 44.639;const lng1 = 22.658;const lats1 = shapes.slice().map((shape,i) => lat1);const lngs1 = colors.slice().map((x,i) => lng1);const rows1 = lats1.map((y) => lngs1.map(x => [y, x]));// Define test casesconst tests = [{ icon: 'fa-number', number: '42', svg: true,}];// Create mapconst map1= L.map('map1').setView([lat, lng], 11);var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map1);// Add test casesrows.forEach((row, shapeIdx) => { row.forEach((col, colorIdx) => { L.marker(col, { icon: L.ExtraMarkers.icon( Object.assign( {}, tests[(shapeIdx * row.length + colorIdx) % tests.length], {shape: shapes[shapeIdx], markerColor: colors[colorIdx]} ) ) }).addTo(map1); })});var popUpText ="

    12

    ";rows1.forEach((row, shapeIdx) => { row.forEach((col, colorIdx) => { L.marker(col, { icon: L.ExtraMarkers.icon( Object.assign( {}, tests[(shapeIdx * row.length + colorIdx) % tests.length], {shape: shapes[shapeIdx], markerColor: colors[colorIdx]} ) ) }).addTo(map1).bindTooltip(popUpText,{ direction: 'top', permanent: true, opacity: 1, offset: [0, -30] }).openPopup(); })}); }function cityCountry(type){if(type == 1){ $("#user_city").css("display","block");$("#your_city").css("display","block");$("#user_count").css("display","none");$("#your_countryContainer").css("display","none");$("#your_cityContainer").css("display","block");$("#your_cityMob").css("display","block");$("#your_countryMob").css("display","none");$(".your_country").css("display","none");$(".world_table").css("display","none");$(".city_table").css("display","block");$(".city_inbox").css("background","#026BFB");$(".city_inbox").css("border","1px solid #026BFB;");$(".city_inbox_text").css("color","#ffffff");$(".world_inbox").css("background","#ffffff");$(".world_inbox").css("border","1px solid #a09e9e;");$(".world_inbox_text").css("color","#000000");}else{ $("#user_count").css("display","block"); $("#user_city").css("display","none"); $("#your_cityContainer").css("display","none"); $("#your_countryContainer").css("display","block");$(".your_country").css("display","block");$("#your_countryMob").css("display","block");$("#your_cityMob").css("display","none");$("#your_city").css("display","none");$(".city_table").css("display","none");$(".world_table").css("display","block");$(".world_inbox").css("background","#026BFB");$(".world_inbox").css("border","1px solid #026BFB;");$(".world_inbox_text").css("color","#ffffff");$(".city_inbox").css("background","#ffffff");$(".city_inbox").css("border","1px solid #a09e9e;");$(".city_inbox_text").css("color","#000000");}}function countryTime(latitude_w,longitude_w, aqiVal){ var today = new Date(); var dd = String(today.getDate()).padStart(2, '0'); var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0! var yyyy = today.getFullYear(); today = yyyy + '/' + mm + '/' + dd; var todaydate = today; var weatherkey = "2dbf726a758b40e2a4d101106202810"; $.ajax({ url: 'https://api.weatherapi.com/v1/astronomy.json?key='+weatherkey+'&q='+latitude_w+','+longitude_w+'&dt='+todaydate, method: 'GET', dataType: 'json', cors: true , async: true, success: function(data){ var result = data['astronomy']; result = result['astro']; var data_location = data['location']; var data_location_time = data_location['localtime']; data_location_time = data_location_time.split(" "); var loc_date = data_location_time[0]; var time1 = data_location_time[1]; var res = time1.split(":"); res =res[0]; var res_l =res.length; if(res_l < 2){ var res = "0"+res; } var res1 = time1.split(":"); res1 =res1[1]; var res_l1 =res1.length; if(res_l1 < 2){ var res1 = "0"+res1; } var time = res+":"+res1; $(".weather_loc_date").text(loc_date); $(".weather_loc_time").text(time); if(time > "00:00:00" && time <= "05:00:00"){ $(".weither-icon-show1").css("display", "none"); $(".weither-icon-show2").css("display", "none"); $(".weither-icon-show3").css("display", "block"); } if(time > "05:00:00" && time <= "10:00:00"){ $(".weither-icon-show2").css("display", "none"); $(".weither-icon-show3").css("display", "none"); $(".weither-icon-show1").css("display", "block"); } if(time > "10:00:00" && time <= "15:00:00"){ $(".weither-icon-show1").css("display", "none"); $(".weither-icon-show3").css("display", "none"); $(".weither-icon-show2").css("display", "block"); } if(time > "15:00:00" && time <= "23:59:00"){ $(".weither-icon-show1").css("display", "none"); $(".weither-icon-show2").css("display", "none"); $(".weither-icon-show3").css("display", "block"); } var html=''; html +='

    '+result['sunrise']+'

    (Video) What is Air Pollution and Air Quality Index (AQI) ?

    '; $('.weather-time-start').html(html); var html1=''; html1 +='

    '+result['sunset']+'

    '; $('.weather-time-end').html(html1); if($(window).width() < 640){ var bgimg=''; var countryNameAqi_text = $("#currentLocationCountry").text(); var aqi = aqiVal; if(getCookie("aqiType") === "AQI-IN"){ bgimg = GetImageTextColorAQIINjs(aqi,time); if(bgimg['cartoonimg'] === "https://www.aqi.in/assets/images/cartton_shape_6.png") { if(screen.width < 420) { $(".card-img-icon-mobile").css("left", "-40px"); } else { $(".card-img-icon-mobile").css("left", "-75px"); } $(".card-img-icon-mobile").css("width", "7.2em"); $(".card-img-icon-mobile").css("top", "-90px"); } else { $(".card-img-icon-mobile").css("position","absolute"); if(screen.width < 420) { if(screen.width < 360) { $(".card-img-icon-mobile").css("left","-15px"); $(".card-img-icon-mobile").css("top","-142px"); } else { $(".card-img-icon-mobile").css("left","-10px"); $(".card-img-icon-mobile").css("top","-125px"); } } else { $(".card-img-icon-mobile").css("left","-40px"); $(".card-img-icon-mobile").css("top","-56px"); } $(".card-img-icon-mobile").css("height","auto"); $(".card-img-icon-mobile").css("width","67px"); } $('.mobile-section-aqi-card').css('background-image', 'url(' + bgimg['bgaqimage'] + ')'); $(".card-img-icon-mobile").attr("src",'' + bgimg['cartoonimg'] + ''); $("#myHeader").css('background-color' ,''+bgimg['aqibgcolor']+''); }else{ bgimg = GetImageTextColorjs(aqi,time); if(bgimg['cartoonimg'] === "https://www.aqi.in/assets/images/cartton_shape_6.png") { if(screen.width < 420) { $(".card-img-icon-mobile").css("left", "-40px"); } else { $(".card-img-icon-mobile").css("left", "-75px"); } $(".card-img-icon-mobile").css("width", "7.2em"); $(".card-img-icon-mobile").css("top", "-90px"); } else { $(".card-img-icon-mobile").css("position","absolute"); if(screen.width < 420) { if(screen.width < 360) { $(".card-img-icon-mobile").css("left","-15px"); $(".card-img-icon-mobile").css("top","-142px"); } else { $(".card-img-icon-mobile").css("left","-10px"); $(".card-img-icon-mobile").css("top","-125px"); } } else { $(".card-img-icon-mobile").css("left","-40px"); $(".card-img-icon-mobile").css("top","-56px"); } $(".card-img-icon-mobile").css("height","auto"); $(".card-img-icon-mobile").css("width","67px"); } $('.mobile-section-aqi-card').css('background-image', 'url(' + bgimg['bgaqimage'] + ')'); $(".card-img-icon-mobile").attr("src",'' + bgimg['cartoonimg'] + ''); $("#myHeader").css('background-color' ,''+bgimg['aqibgcolor']+''); } } } });}function GetImageTextColorAQIINjs(aqi,time){ var aqicolor; var aqimage; var aqitext; var bgaqimage; var cartoonimg; var aqibgcolor; var obj; if(time > "00:00:00" && time <= "05:00:00"){//night $('.mobile_card_bg1_p').css('color',"#f4f4f4"); $('.myloc-pm10-dot').css({"border-weight":"2px","border-style":"solid","color":"#f4f4f4"}); if(aqi>=0 && aqi<=50 ) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n1.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_4.png"; aqibgcolor = "#c0f2e3"; } else if(aqi>50 && aqi<=100) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n2.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_3.png"; aqibgcolor = "#feff7f"; } else if(aqi>100 && aqi<=200) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n3.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_2.png"; aqibgcolor = "#fde9d7"; } else if(aqi>200 && aqi<=300) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n4.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_5.png"; aqibgcolor = "#fdc9e6"; } else if(aqi>300 && aqi<=400) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n5.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_1.png"; aqibgcolor = "#f3ddf5"; }else { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n6.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_6.png"; aqibgcolor = "#ffe1e6"; } } if(time > "05:00:00" && time <= "10:00:00"){//morning $('.mobile_card_bg1_p').css('color',"#f4f4f4"); $('.myloc-pm10-dot').css({"border-weight":"2px","border-style":"solid","color":"#f4f4f4"}); if(aqi>=0 && aqi<=50 ) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-m1.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_4.png"; aqibgcolor = "#bef2a0"; } else if(aqi>50 && aqi<=100) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-m2.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_3.png"; aqibgcolor = "#f5efb9"; } else if(aqi>100 && aqi<=200) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-m3.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_2.png"; aqibgcolor = "#ecc9b8"; } else if(aqi>200 && aqi<=300) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-m4.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_5.png"; aqibgcolor = "#fccefa"; } else if(aqi>300 && aqi<=400) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-m5.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_1.png"; aqibgcolor = "#ecb9f7"; }else { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-m6.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_6.png"; aqibgcolor = "#f5a3a7"; } } if(time > "10:00:00" && time <= "16:00:00"){//afternoon $('.mobile_card_bg1_p').css('color',"#f4f4f4"); $('.myloc-pm10-dot').css({"border-weight":"2px","border-style":"solid","color":"#f4f4f4"}); if(aqi>=0 && aqi<=50 ) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-a1.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_4.png"; aqibgcolor = "#7fed79"; } else if(aqi>50 && aqi<=100) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-a2.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_3.png"; aqibgcolor = "#D4CA2F"; } else if(aqi>100 && aqi<=200) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-a3.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_2.png"; aqibgcolor = "#f58d73"; } else if(aqi>200 && aqi<=300) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-a4.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_5.png"; aqibgcolor = "#f5bad7"; } else if(aqi>300 && aqi<=400) { // bgaqimage = "https://www.aqi.in/assets/images/Morning_poor.png"; bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-a5.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_1.png"; aqibgcolor = "#f0cef5"; }else { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-a6.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_6.png"; aqibgcolor = "#BF2133"; } } if(time > "16:00:00" && time <= "20:00:00"){//evening $('.mobile_card_bg1_p').css('color',"#f4f4f4"); $('.myloc-pm10-dot').css({"border-weight":"2px","border-style":"solid","color":"#f4f4f4"}); if(aqi>=0 && aqi<=50 ) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-e1.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_4.png"; aqibgcolor = "#d3e8fc"; } else if(aqi>50 && aqi<=100) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-e2.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_3.png"; aqibgcolor = "#edf0a4"; } else if(aqi>100 && aqi<=200) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-e3.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_2.png"; aqibgcolor = "#edeffa"; } else if(aqi>200 && aqi<=300) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-e4.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_5.png"; aqibgcolor = "#eae5fa"; } else if(aqi>300 && aqi<=400) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-e5.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_1.png"; aqibgcolor = "#ecf0fc"; }else { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-e6.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_6.png"; aqibgcolor = "#edeffb"; } } if(time > "20:00:00" && time <= "23:59:00"){//night $('.mobile_card_bg1_p').css('color',"#f4f4f4"); $('.myloc-pm10-dot').css({"border-weight":"2px","border-style":"solid","color":"#f4f4f4"}); if(aqi>=0 && aqi<=50 ) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n1.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_4.png"; aqibgcolor = "#c0f2e3"; // $('.mobile_card_bg1_p').css('color',"#34a12b"); // $('.myloc-pm10-dot').css({"border-weight":"2px","border-style":"solid","color":"#34a12b"}); } else if(aqi>50 && aqi<=100) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n2.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_3.png"; aqibgcolor = "#feff7f"; } else if(aqi>100 && aqi<=200) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n3.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_2.png"; aqibgcolor = "#fde9d7"; } else if(aqi>200 && aqi<=300) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n4.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_5.png"; aqibgcolor = "#fdc9e6"; } else if(aqi>300 && aqi<=400) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n5.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_1.png"; aqibgcolor = "#f3ddf5"; }else { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n6.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_6.png"; aqibgcolor = "#ffe1e6"; } } obj = {"bgaqimage":bgaqimage,"cartoonimg":cartoonimg,"aqibgcolor":aqibgcolor}; return obj;}function GetImageTextColorjs(aqi,time){ var aqicolor; var aqimage; var aqitext; var bgaqimage; var cartoonimg; var aqibgcolor; var obj; if(time > "00:00:00" && time <= "05:00:00"){//night if(aqi>=0 && aqi<=50 ) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n1.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_4.png"; aqibgcolor = "#c0f2e3"; } else if(aqi>50 && aqi<=100) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n2.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_3.png"; aqibgcolor = "#feff7f"; } else if(aqi>100 && aqi<=150) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n3.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_2.png"; aqibgcolor = "#fde9d7"; } else if(aqi>150 && aqi<=200) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n4.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_5.png"; aqibgcolor = "#fdc9e6"; } else if(aqi>200 && aqi<=300) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n5.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_1.png"; aqibgcolor = "#f3ddf5"; }else { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n6.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_6.png"; aqibgcolor = "#ffe1e6"; } } if(time > "05:00:00" && time <= "10:00:00"){//morning if(aqi>=0 && aqi<=50 ) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-m1.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_4.png"; aqibgcolor = "#bef2a0"; } else if(aqi>50 && aqi<=100) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-m2.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_3.png"; aqibgcolor = "#f5efb9"; } else if(aqi>100 && aqi<=150) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-m3.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_2.png"; aqibgcolor = "#ecc9b8"; } else if(aqi>150 && aqi<=200) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-m4.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_5.png"; aqibgcolor = "#fccefa"; } else if(aqi>200 && aqi<=300) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-m5.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_1.png"; aqibgcolor = "#ecb9f7"; }else { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-m6.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_6.png"; aqibgcolor = "#f5a3a7"; } } if(time > "10:00:00" && time <= "16:00:00"){//afternoon if(aqi>=0 && aqi<=50 ) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-m1.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_4.png"; aqibgcolor = "#bef2a0"; } else if(aqi>50 && aqi<=100) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-m2.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_3.png"; aqibgcolor = "#f5efb9"; } else if(aqi>100 && aqi<=150) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-m3.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_2.png"; aqibgcolor = "#ecc9b8"; } else if(aqi>150 && aqi<=200) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-m4.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_5.png"; aqibgcolor = "#fccefa"; } else if(aqi>200 && aqi<=300) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-m5.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_1.png"; aqibgcolor = "#ecb9f7"; }else { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-m6.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_6.png"; aqibgcolor = "#f5a3a7"; } } if(time > "16:00:00" && time <= "20:00:00"){//evening if(aqi>=0 && aqi<=50 ) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-e1.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_4.png"; aqibgcolor = "#d3e8fc"; } else if(aqi>50 && aqi<=100) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-e2.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_3.png"; aqibgcolor = "#edf0a4"; } else if(aqi>100 && aqi<=150) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-e3.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_2.png"; aqibgcolor = "#edeffa"; } else if(aqi>150 && aqi<=200) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-e4.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_5.png"; aqibgcolor = "#eae5fa"; } else if(aqi>200 && aqi<=300) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-e5.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_1.png"; aqibgcolor = "#ecf0fc"; }else { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-e6.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_6.png"; aqibgcolor = "#edeffb"; } } if(time > "20:00:00" && time <= "23:59:00"){//night if(aqi>=0 && aqi<=50 ) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n1.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_4.png"; aqibgcolor = "#c0f2e3"; } else if(aqi>50 && aqi<=100) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n2.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_3.png"; aqibgcolor = "#feff7f"; } else if(aqi>100 && aqi<=150) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n3.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_2.png"; aqibgcolor = "#fde9d7"; } else if(aqi>150 && aqi<=200) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n4.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_5.png"; aqibgcolor = "#fdc9e6"; } else if(aqi>200 && aqi<=300) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n5.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_1.png"; aqibgcolor = "#f3ddf5"; }else { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n6.png"; cartoonimg = "https://www.aqi.in/assets/images/cartton_shape_6.png"; aqibgcolor = "#ffe1e6"; } } obj = {"bgaqimage":bgaqimage,"cartoonimg":cartoonimg,"aqibgcolor":aqibgcolor}; return obj;}$(".temp_c").click(function(){ var temp_c = $(".card-cloudy-text-temp_c").text(); temp_c = Math.round(temp_c); $(".card-cloudy-text-temp").html(temp_c); /*if($(".temp_f").css("color","#46C4FF"); === true){ $(".temp_f").css("color","#333333"); }*/ if(screen.width < 640) { $(".temp_f").css("color","#333333"); $(".temp_c").css("color","#f4f4f4"); } else { $(".temp_f").css("color","#333333"); $(".temp_c").css("color","#46C4FF");} }); $(".temp_f").click(function(){ var temp_f = $(".card-cloudy-text-temp_f").text(); temp_f = Math.round(temp_f); $(".card-cloudy-text-temp").html(temp_f); if(screen.width < 640) { $(".temp_c").css("color","#333333"); $(".temp_f").css("color","#f4f4f4"); } else { $(".temp_c").css("color","#333333"); $(".temp_f").css("color","#46C4FF"); } });/*************************************************** end *************************************************************/ /************set mjor city ***************///setalllocationdata_aqi(authtoken);setmajorcity(authtoken);/***************** end ****************************//******************get data form city********************************/function setmajorcity(retrivedtokenvalue){ var countryName; var Url = "https://api.aqi.in/api/v1/getNearestLocation"; var headers = {'Authorization':authtoken,'Content-Type':'application/json','lat':defultiplat,'lon':defultiplon}; makeAjaxCall(Url,headers,"GET", function(respJson){ var nearestlocations = respJson; var data = nearestlocations['Locations']; var singlelocation = data[0]; var country = singlelocation['countryName']; var countryName1 = country.toLowerCase(); countryName = countryName1.replace(/\s/g, '-'); $.ajax({ url: 'https://api.aqi.in/api/v1/getWorldBigCities', headers: { 'Authorization':retrivedtokenvalue, 'Content-Type':'application/json', 'Accept':'application/json', 'countryname': countryName, }, method: 'GET', dataType: 'json', async: true, success: function(data){ $('#citysidebar').show(); var locationdata = data['Locations']; getbigcities_cpcb = data; majorcitydata = data['Locations']; var htmlText = ''; htmlText += '

    '; for(var i in locationdata) { var obj = locationdata[i]; var detailsdata = obj; var ctname = detailsdata['locationName']; var stname = detailsdata['stateName']; var st = detailsdata.stateName; var state = st.toLowerCase(); var statename = state.replace(/\s/g, '-'); var ct = detailsdata.locationName; var city = ct.toLowerCase(); var cityname = city.replace(/\s/g, '-'); var cityurl = baseurl+'dashboard/india/'+statename+'/'+cityname; var cityimage = obj['cityImage']; var airdata = obj['airComponents']; var airaqi; var airpm25; for (var a in airdata) { var ad = airdata[a]; if(ad['sensorName'] == "AQI-IN") { airaqi = ad['sensorData']; } if(ad['sensorName'] == "pm25") { airpm25 = ad['sensorData']; } } if(mapdatatype == 0) { var aqi = airaqi; var aqicolor; var aqimage; if(aqi>=0 && aqi<=50 ) { aqicolor = "#34a12b"; } else if(aqi>50 && aqi<=100) { aqicolor = "#d4cc0f"; } else if(aqi>100 && aqi<=200) { aqicolor = "#FFA500"; } else if(aqi>200 && aqi<=300) { aqicolor = "#FF69B4"; } else if(aqi>300 && aqi<=400) { aqicolor = "#800080"; } else { aqicolor = "#ec0000"; } } if(mapdatatype == 1) { var aqi = airpm25; var aqicolor; var aqimage; if(aqi>=0 && aqi<=30 ) { aqicolor = "#34a12b"; } else if(aqi>31 && aqi<=60) { aqicolor = "#d4cc0f"; } else if(aqi>61 && aqi<=90) { aqicolor = "#FFA500"; } else if(aqi>91 && aqi<=120) { aqicolor = "#FF69B4"; } else if(aqi>121 && aqi<=250) { aqicolor = "#800080"; } else { aqicolor = "#ec0000"; } } var str = cityimage; //var res = ; var loc="'"+obj.locationName+"'"; htmlText += '

    (Video) AQI India Introduces A Platform To Check Real-Time Air Quality Index (AQI) in India | Air Pollution

    '; htmlText += '

    AQI India's Air Quality Index: Real-time Air Pollution Level (1)

    '; htmlText += '

    '+obj.locationName+'

    (Video) Air Quality Index AQI – To The Point | Drishti IAS English

    '; htmlText += '

    '+aqi+'

    '; htmlText += '

    '; } htmlText += '

    (Video) Understanding Air Quality Index

    '; $('.citylist').html(htmlText); //setcityrealdata(); } }); });}//window.addEventListener('load', (event) => { // alert("Page now fully loaded") setTimeout(() => { document.getElementById("appframe").style.display = "none"; },30000) setTimeout(() => { document.getElementById("appframe").contentWindow.document.getElementById("app_heading").addEventListener("click",() => { document.getElementById("appframe").style.display = "none";}); document.getElementById("appframe").contentWindow.document.getElementById("app_icon_new").children[0].children[0].addEventListener("click",() => { document.getElementById("appframe").style.display = "none";}); document.getElementById("appframe").contentWindow.document.getElementById("btnapp").addEventListener("click",() => { document.getElementById("appframe").style.display = "none";}); document.getElementById("appframe").contentWindow.document.getElementById("cross").addEventListener("click",() => { document.getElementById("appframe").style.display = "none";}); },3000)// });

    FAQs

    AQI India's Air Quality Index: Real-time Air Pollution Level? ›

    The most common measurement used to measure air quality is PM 2.5 and PM 10. It measures the particles in micrograms per cubic metre. PM 2.5 refers to the concentration of microscopic particles less than 2.5 microns in diameter and PM 10 refers to the concentration of particles less than 10 microns in diameter.

    What is the AQI level of India? ›

    India - States Air Pollution Level
    STATESStatusAQI-US
    Daman And DiuMODERATE82
    DelhiPOOR162
    GoaGOOD40
    GujaratMODERATE94
    30 more rows

    How much air pollution does India have? ›

    Which country had the worst air quality in 2022?
    #COUNTRYAVG. US
    6Burkina Faso155
    7Kuwait151
    8India144
    9Egypt128
    6 more rows
    May 11, 2023

    How air quality index AQI is measured in India? ›

    The most common measurement used to measure air quality is PM 2.5 and PM 10. It measures the particles in micrograms per cubic metre. PM 2.5 refers to the concentration of microscopic particles less than 2.5 microns in diameter and PM 10 refers to the concentration of particles less than 10 microns in diameter.

    What happens at 500 AQI? ›

    A rating anywhere between 301 and 500 is considered “hazardous,” and air quality at that level will trigger health warnings. At that level and beyond, everyone should stay indoors and reduce activity levels. “Use the same information that is for the 'hazardous' category,” the E.P.A. advises.

    Why is AQI high in India? ›

    Dust & Construction contribute about 59% to the air pollution in India, which is followed by Waste Burning. Crafting activities are mostly in the urban areas while Waste Burning is in the rural areas (agriculture).

    What is the rank of India in air quality index 2023? ›

    The index that came out on March 15, 2023 (Tuesday) hints that India is at the eighth rank in terms of the world's most polluted country in the world.

    How bad is India's pollution? ›

    India's air pollution is a rolling disaster that shows no sign of slowing down. A 2022 report by the Centre for Research on Energy and Clean Air think tank found that “almost the entire population of India” is exposed to air pollution above the guidelines set by the World Health Organization.

    Is India more polluted than the US? ›

    Here's a look. United States' share in global emissions is three times greater than its share in global population, making it one of the largest per capita emitters of CO2. In contrast, India's share in emissions is significantly lower than its share in population.

    Which pollution is highest in India? ›

    The 2022 report is based on PM2. 5 data from 7,323 cities and 131 countries. Abysmal statistics showed that Bhiwadi in Rajasthan with PM levels of 92.7 was found to be the most polluted city in India and third most polluted city in the world.

    How is AQI measured? ›

    The AQI is calculated by converting measured pollutant concentrations to a uniform index which is based on the health effects associated with a pollutant. The health benchmarks used for calculating the AQI are pollutant specific and are established by the EPA through the National Ambient Air Quality Standards.

    What is the lowest AQI in India? ›

    Rankings: Least Polluted Cities in India (2023)
    1. Imphal (11.14 μg/m3)
    2. Madikeri (17.04 μg/m3)
    3. Mysuru (19.10 μg/m3)
    4. Mangalore (20.07 μg/m3)
    5. Amaravati (20.78 μg/m3)
    6. Haldia (23.43 μg/m3)
    7. Gorakhpur (24.83 μg/m3)
    8. Bagalkot (24.95 μg/m3)
    Feb 1, 2023

    Which country has worst air quality? ›

    List
    RankCountryparticulate matter (PM2.5) in (µg/m³) WHO-Guideline=10
    1Bangladesh75.76
    2India55.80
    3Nepal47.13
    4Pakistan44.17
    114 more rows

    Where is the best AQI level in the world? ›

    Cleanest air in the world in 2022

    The cleanest air in the world is in Zurich. The pollution status is determined on the basis of average levels of PM2.5 measured over a period of 12 months. And this Swiss city obtained an annual value of 0.51 µg / m3, which makes it the lowest in the world.

    Which state in India has the highest AQI? ›

    Lucknow, the capital of India's northern state Uttar Pradesh, has the highest level of pollution in the country, with pollution 13 times greater than the WHO guideline. Residents of Lucknow stand to lose 12.1 years of life expectancy if pollution persists.

    Videos

    1. Air Quality Index (AQI) - To The Point | Drishti IAS
    (Drishti IAS)
    2. Lecture 14: Air Quality Index (AQI)
    (IIT Roorkee July 2018)
    3. Air Quality Index (AQI) - What It Means For You
    (Paul Cochrane)
    4. What Are AQI Levels & How Are They Measured? | AQI Index |Air Pollution in India After Diwali | BOOM
    (BOOM)
    5. What is AQI? 🌎 Air quality index explained | How to check air pollution level? What is a normal AQI?
    (The Magical Minds)
    6. The AQI Explained
    (KCRA 3)

    References

    Top Articles
    Latest Posts
    Article information

    Author: Geoffrey Lueilwitz

    Last Updated: 09/07/2023

    Views: 5690

    Rating: 5 / 5 (80 voted)

    Reviews: 95% of readers found this page helpful

    Author information

    Name: Geoffrey Lueilwitz

    Birthday: 1997-03-23

    Address: 74183 Thomas Course, Port Micheal, OK 55446-1529

    Phone: +13408645881558

    Job: Global Representative

    Hobby: Sailing, Vehicle restoration, Rowing, Ghost hunting, Scrapbooking, Rugby, Board sports

    Introduction: My name is Geoffrey Lueilwitz, I am a zealous, encouraging, sparkling, enchanting, graceful, faithful, nice person who loves writing and wants to share my knowledge and understanding with you.