Keene Air Quality Index (AQI): Real-Time Air Pollution (2024)

'; $('.forcast-aqi-no' + i).html(html); } var result = respJson['Data'][0]; var result_day = result['day']; var result_val = result['value']; //console.log(result); var today = new Date(result_day); //console.log(today); var day = today.getDay(); var days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; var dayname = days[day]; //console.log(dayname); /* var html = ''; html +='

'; const shapes = ['square']; const colors = [aqicolor]; const space = 0.005; const lat = obj['lat']; const lng = obj['lon']; 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])); // Define test cases const tests = [{ icon: `fa-number aqi_toggle-${i}`, number: aqivaluemini, svg: true, }]; rows.forEach((row, shapeIdx) => { row.forEach((col, colorIdx) => { L.marker(col, { locdata: obj, icon: L.ExtraMarkers.icon( Object.assign( {}, tests[(shapeIdx * row.length + colorIdx) % tests.length], { shape: shapes[shapeIdx], markerColor: colors[colorIdx] }, ) ) }).bindPopup(infowindow, { direction: 'top', permanent: true, opacity: 1 }).addTo(group); }) }); } } map.addLayer(group); } 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/good-aqi-boy.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/moderate-aqi-boy.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/poor-aqi-boy.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/unhealthy-aqi-boy-image.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/severe-aqi-boy.png"; aqibgcolor = "#f3ddf5"; } else { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n6.png"; cartoonimg = "https://www.aqi.in/assets/images/hazardous-aqi-boy.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/good-aqi-boy.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/moderate-aqi-boy.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/poor-aqi-boy.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/unhealthy-aqi-boy-image.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/severe-aqi-boy.png"; aqibgcolor = "#ecb9f7"; } else { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-m6.png"; cartoonimg = "https://www.aqi.in/assets/images/hazardous-aqi-boy.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-a1.png"; cartoonimg = "https://www.aqi.in/assets/images/good-aqi-boy.png"; aqibgcolor = "#c0f2e3"; } 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/moderate-aqi-boy.png"; aqibgcolor = "#feff7f"; } else if (aqi > 100 && aqi <= 150) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-a3.png"; cartoonimg = "https://www.aqi.in/assets/images/poor-aqi-boy.png"; aqibgcolor = "#fde9d7"; } else if (aqi > 150 && aqi <= 200) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-a4.png"; cartoonimg = "https://www.aqi.in/assets/images/unhealthy-aqi-boy-image.png"; aqibgcolor = "#fdc9e6"; } else if (aqi > 200 && aqi <= 300) { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-a5.png"; cartoonimg = "https://www.aqi.in/assets/images/severe-aqi-boy.png"; aqibgcolor = "#f3ddf5"; } else { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-a6.png"; cartoonimg = "https://www.aqi.in/assets/images/hazardous-aqi-boy.png"; aqibgcolor = "#ffe1e6"; } } 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/good-aqi-boy.png"; aqibgcolor = "#c0f2e3"; } 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/moderate-aqi-boy.png"; aqibgcolor = "#feff7f"; } 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/poor-aqi-boy.png"; aqibgcolor = "#fde9d7"; } 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/unhealthy-aqi-boy-image.png"; aqibgcolor = "#fccefa"; } 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/severe-aqi-boy.png"; aqibgcolor = "#f3ddf5"; } else { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-e6.png"; cartoonimg = "https://www.aqi.in/assets/images/hazardous-aqi-boy.png"; aqibgcolor = "#ffe1e6"; } } 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/good-aqi-boy.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/moderate-aqi-boy.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/poor-aqi-boy.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/unhealthy-aqi-boy-image.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/severe-aqi-boy.png"; aqibgcolor = "#f3ddf5"; } else { bgaqimage = "https://www.aqi.in/assets/images/bg-mobile-img-n6.png"; cartoonimg = "https://www.aqi.in/assets/images/hazardous-aqi-boy.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"); }*/ $(".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); $(".temp_c").css("color", "#333333"); $(".temp_f").css("color", "#46C4FF"); }); // console.log(pollitantcities); var weither_html = ''; var polluted_html = ''; var polluted_html1 = ''; var polluted_html2 = ''; var comp_html = ''; var locationName = "Keene"; var aqi_per = "1.7017017017017"; var aqi = "17"; var aqicoldivor = "#34a12b"; var location_city_textdata = "#34a12b"; var aqi_px = "0"; var country_Aqi1 = "United States"; var coun_aqi = "30"; var location_city_per = ""; var location_city_value_px = ""; var location_city_name_text = "Keene"; var country_aqi_per = "3.003003003003"; var coun_aqi_textdata = "#34a12b"; var coun_aqi_px = "1"; var location_city_name_text = "Keene"; var location_city_value = ""; var countryNameAqi = ""; /*setTimeout(function(){ Comparitive_data(); },1000);*/ const part10 = ""; const part25 = "4"; console.log("PM VALUES", part10, part25) const intpm10 = parseInt(part10); const intpm25 = parseInt(part25); console.log("pm", intpm10, intpm25) if (intpm10 > intpm25) { $(".mobile_card_bg1_pm").text(intpm10) $(".mobile_card_bg1_pm_text").text("pm10") } else if (intpm10 < intpm25) { $(".mobile_card_bg1_pm").text(intpm25) $(".mobile_card_bg1_pm_text").text("pm2.5") } else if (!intpm10) { $(".mobile_card_bg1_pm").text(intpm25) $(".mobile_card_bg1_pm_text").text("pm2.5") } else if (!intpm25) { $(".mobile_card_bg1_pm").text(intpm10) $(".mobile_card_bg1_pm_text").text("pm10") } else { $(".mobile_card_bg1_pm").text(intpm10) $(".mobile_card_bg1_pm_text").text("pm10") } function Comparitive_data() { comp_html += '

Comparitive Exposure with ' + locationName + '

>

' + aqi_px + 'x

' + locationName + '

'; if (country_Aqi1 == "india" || country_Aqi1 == "India") { comp_html += '

' + location_city_value_px + 'x

' + location_city_name_text + '

'; } comp_html += '

' + coun_aqi_px + 'x

' + country_Aqi1 + '

safe (AQI) < 50

' + locationName + '

' + aqi + '

'; if (country_Aqi1 == "india" || country_Aqi1 == "India") { comp_html += '

' + location_city_name_text + '

' + location_city_value + '

'; } comp_html += '

' + country_Aqi1 + '

' + coun_aqi + '

'; $('.comp-card-live1').append(comp_html); } var aqiType = getCookie("aqiType") === "AQI-IN" ? "AQI-IN" : "AQI-US"; polluted_html += '

Most Polluted Cities in United States

Keene Air Quality Index (AQI): Real-Time Air Pollution (1)

Real-time worst city rankings

Keene Air Quality Index (AQI): Real-Time Air Pollution (2)


Rank

City

' + aqiType + '

'; polluted_html += '

'; var pollitantcities_count = pollitantcities['Locations']; pollitantcities_count = pollitantcities_count.length + 1; for (var i = 1; i < pollitantcities_count; i++) { polluted_html += '

' + i + '

'; } polluted_html += '

'; // console.log(pollitantcities['Locations']); for (var i in pollitantcities['Locations']) { /* if(pollitantcities['Locations'][i]['countryName'] == "India" || pollitantcities['Locations'][i]['countryName'] == "india"){ */ var pollitant_city = pollitantcities['Locations'][i]['cityName']; pollitant_city = pollitant_city.toLowerCase(); pollitant_city = pollitant_city.replace(/\s/g, '-'); var pollitant_state = pollitantcities['Locations'][i]['stateName']; pollitant_state = pollitant_state.toLowerCase(); pollitant_state = pollitant_state.replace(/\s/g, '-'); var pollitant_con = pollitantcities['Locations'][i]['countryName']; pollitant_con = pollitant_con.toLowerCase(); pollitant_con = pollitant_con.replace(/\s/g, '-'); pollitant_city = pollitant_city.toLowerCase().replace(/\b[a-z]/g, function (letter) { return letter.toUpperCase(); }); pollitant_con = pollitant_con.toLowerCase().replace(/\b[a-z]/g, function (letter) { return letter.toUpperCase(); }); // if(pollitantcities['Locations'][i]['countryName'] == "India" || pollitantcities['Locations'][i]['countryName'] == "india"){ var areaurl = 'https://www.aqi.in/us/dashboard/' + pollitant_con.toLowerCase() + '/' + pollitant_state + '/' + pollitant_city.toLowerCase(); // }else{ // var areaurl = baseurl+'dashboard/'+pollitant_con.toLowerCase()+'/'+pollitant_city.toLowerCase(); // } polluted_html += '

' + pollitant_city.replace(/-/g, ' ') + ', ' + pollitant_con + '

'; /* }*/ } polluted_html += '

'; for (var i in pollitantcities['Locations']) { var aqiType = getCookie("aqiType") === "AQI-IN" ? "AQI-IN" : "AQI-US"; if (getCookie("aqiType") === "AQI-IN") { var pollitant_aqi = pollitantcities['Locations'][i]['AQI-IN']; var pollitant_aqi_name = "AQI-IN"; } else { var pollitant_aqi = pollitantcities['Locations'][i]['aqi']; var pollitant_aqi_name = "aqi"; } var pollitant_aqi_color = GetColorBySensorNameAndValue(pollitant_aqi_name, pollitant_aqi); polluted_html += `

${pollitant_aqi == undefined ? obj['aqi'] : pollitant_aqi}

`; } polluted_html += '

View Full Ranking

'; $('.most_polluted_cities').append(polluted_html); polluted_html1 += '

Least Polluted Cities in United States

Keene Air Quality Index (AQI): Real-Time Air Pollution (3)

Real-time best city rankings

Keene Air Quality Index (AQI): Real-Time Air Pollution (4)


Rank

City

' + aqiType + '

'; polluted_html1 += '

'; var least_pollutantcities_count = least_pollutantcities['Locations']; least_pollutantcities_count = least_pollutantcities_count.length + 1; for (var i = 1; i < least_pollutantcities_count; i++) { polluted_html1 += '

' + i + '

'; } polluted_html1 += '

'; for (var i in least_pollutantcities['Locations']) { var pollitant_city1 = least_pollutantcities['Locations'][i]['locationName']; pollitant_city1 = pollitant_city1.toLowerCase(); pollitant_city1 = pollitant_city1.replace(/\s/g, '-'); var pollitant_state1 = least_pollutantcities['Locations'][i]['stateName']; pollitant_state1 = pollitant_state1.toLowerCase(); pollitant_state1 = pollitant_state1.replace(/\s/g, '-'); var pollitant_con1 = least_pollutantcities['Locations'][i]['countryName']; pollitant_con1 = pollitant_con1.toLowerCase(); pollitant_con1 = pollitant_con1.replace(/\s/g, '-'); pollitant_city1 = pollitant_city1.toLowerCase().replace(/\b[a-z]/g, function (letter) { return letter.toUpperCase(); }); pollitant_con1 = pollitant_con1.toLowerCase().replace(/\b[a-z]/g, function (letter) { return letter.toUpperCase(); }); // if(least_pollutantcities['Locations'][i]['countryName'] == "India" || least_pollutantcities['Locations'][i]['countryName'] == "india"){ var areaurl1 = 'https://www.aqi.in/us/dashboard/' + pollitant_con1.toLowerCase() + '/' + pollitant_state1 + '/' + pollitant_city1.toLowerCase(); // }else{ // var areaurl1 = baseurl+'dashboard/'+pollitant_con1.toLowerCase()+'/'+pollitant_city1.toLowerCase(); // } polluted_html1 += '

' + pollitant_city1.replace(/-/g, ' ') + ', ' + pollitant_con1 + '

'; } polluted_html1 += '

'; for (var i in least_pollutantcities['Locations']) { if (getCookie("aqiType") === "AQI-IN") { var pollitant_aqi = least_pollutantcities['Locations'][i]['AQI-IN']; var pollitant_aqi_name = "AQI-IN"; } else { var pollitant_aqi = least_pollutantcities['Locations'][i]['aqi']; var pollitant_aqi_name = "aqi"; } var pollitant_aqi_color = GetColorBySensorNameAndValue(pollitant_aqi_name, pollitant_aqi); polluted_html1 += `

${pollitant_aqi == undefined ? obj['aqi'] : pollitant_aqi}

`; } polluted_html1 += '

View Full Ranking

'; $('.least_polluted_cities').append(polluted_html1); $("#owl-demo1").owlCarousel({ autoPlay: 3000, //Set AutoPlay to 3 seconds items: 1, itemsDesktop: [1199, 1], itemsDesktopSmall: [979, 3] }); ChartData1(); function ChartData1() { var coun_name = "United States"; var coun_city_name = ""; var coun_city_loc_name = "7448"; var coun_city_loc_text = "Keene"; var sensorparam = "aqi"; coun_city_loc_text = coun_city_loc_text.substring(0, 15); if (myChart2) { myChart2.destroy(); } var comparealldata = []; var optionname = []; var chartperiod = 1; var timeformat; var unit; var url; timeformat = "hA"; unit = "hour"; url = "https://api.aqi.in/api/v1/getLocationHistory24Hour"; /* console.log("coun_city_loc_name"); console.log(coun_city_loc_name);*/ var headers = { 'Authorization': authtoken, 'Content-Type': 'application/json', 'locationid': coun_city_loc_name, 'searchtype': 'locationId', 'sendevid': sensorparam }; var headerstwo = { 'Authorization': authtoken, 'Content-Type': 'application/json', 'locationid': coun_city_name, 'searchtype': 'cityId', 'sendevid': sensorparam }; var headersthree = { 'Authorization': authtoken, 'Content-Type': 'application/json', 'locationid': coun_name, 'searchtype': 'countryId', 'sendevid': sensorparam }; if (coun_name == "India" || coun_name == "india") { ChartDataT1(url, headers, headerstwo, headersthree, sensorparam, unit, timeformat, coun_name, coun_city_name, coun_city_loc_text); } else { ChartDataS2(url, headers, headersthree, sensorparam, unit, timeformat, coun_name, coun_city_loc_text); } } function ChartDataT1(url = 0, headers = 0, headerstwo = 0, headersthree = 0, sensorparam = 0, unit = 0, timeformat = 0, coun_name = 0, coun_city_name = 0, coun_city_loc_name = 0) { makeAjaxCall(url, headers, "GET", function (respJson) { //console.log(respJson); makeAjaxCall(url, headerstwo, "GET", function (respJsonTwo) { makeAjaxCall(url, headersthree, "GET", function (respJsonThree) { var location_name1 = coun_city_loc_name; var location_name2 = coun_city_name; var location_name3 = coun_name; var chartdata = respJson['Table']['Data'][0]; var colorarray = []; var chartvalueobj = chartdata['averageArray']; var chartAvgLoc = chartdata["avgValue"]; var chartdateobj = chartdata['timeArray']; var chartdataTwo = respJsonTwo['Table']['Data'][0]; var colorarrayTwo = []; var chartvalueobjTwo = chartdataTwo['averageArray']; var chartAvgCity = chartdataTwo["avgValue"]; var chartdateobjTwo = chartdataTwo['timeArray']; var chartdataThree = respJsonThree['Table']['Data'][0]; var colorarrayThree = []; var chartvalueobjThree = chartdataThree['averageArray']; var chartAvgCoun = chartdataThree["avgValue"]; var chartdateobjThree = chartdataThree['timeArray']; var bestdata = Math.min.apply(Math, chartvalueobj); // 1 var worstdata = Math.max.apply(Math, chartvalueobj); // 3 var bestindex = chartvalueobj.indexOf(bestdata); var worstindex = chartvalueobj.indexOf(worstdata); var bformatedtime = moment(chartdateobj[bestindex]).format('LT'); var bformateddate = moment(chartdateobj[bestindex]).format('LL'); var wformatedtime = moment(chartdateobj[worstindex]).format('LT'); var wformateddate = moment(chartdateobj[worstindex]).format('LL'); var start_date = moment().startOf(chartdateobj).format('YYYY-MM-DD'); var end_date = moment().endOf(chartdateobj).format('YYYY-MM-DD'); /* $('#bvalue').text(bestdata); $('#btime').text(bformatedtime); $('#bdate').text(bformateddate); $('#wvalue').text(worstdata); $('#wtime').text(wformatedtime); $('#wdate').text(wformateddate);*/ $(".Comparitive_text1_in2").text(chartAvgLoc); $(".Comparitive_text2_in2").text(chartAvgCity); $(".Comparitive_text3_in2").text(chartAvgCoun); if ($(window).width() > 640) { var ctx = document.getElementById("history_comp_graph").getContext("2d"); var grd = ctx.createLinearGradient(0.000, 350.000, 0.000, 100.000); } else { var ctx = document.getElementById("history_comp_graph_s").getContext("2d"); var grd = ctx.createLinearGradient(0.000, 350.000, 0.000, 100.000); } for (var i in chartvalueobj) { var valuecolor = GetColorBySensorNameAndValue(sensorparam, chartvalueobj[i]); colorarray.push(valuecolor); var valuecolorTwo = GetColorBySensorNameAndValue(sensorparam, chartvalueobjTwo[i]); colorarrayTwo.push(valuecolorTwo); var valuecolorThree = GetColorBySensorNameAndValue(sensorparam, chartvalueobjThree[i]); colorarrayThree.push(valuecolorThree); } var unit_type = "1"; var str = respJson['Table']['sensorName']; var res = str.toUpperCase(); //var annnot_arr=get_annotation(res,unit_type); config2 = { data: { labels: chartdateobj, datasets: [ { label: location_name1, type: 'line', data: chartvalueobj, backgroundColor: 'transparent', pointBorderColor: 'transparent', borderColor: '#39A033', pointBackgroundColor: colorarray, pointRadius: 2, borderWidth: 2, }, { label: location_name2, type: 'line', data: chartvalueobjTwo, backgroundColor: 'transparent', pointBorderColor: 'transparent', borderColor: '#D8237E', pointBackgroundColor: colorarrayTwo, pointRadius: 2, borderWidth: 2, }, { label: location_name3, type: 'line', data: chartvalueobjThree, backgroundColor: 'transparent', pointBorderColor: 'transparent', borderColor: '#289BD1', pointBackgroundColor: colorarrayThree, pointRadius: 2, borderWidth: 2, }, ] }, options: { responsive: true, maintainAspectRatio: true, animation: { easing: 'easeInOutQuad', duration: 520 }, legend: { display: true }, scales: { xAxes: [{ gridLines: { display: false }, ticks: { autoSkip: true, }, barThickness: 5, type: "time", time: { unit: unit, displayFormats: { quarter: timeformat } } }], yAxes: [{ gridLines: { display: true }, ticks: { min: 0, } }] }, legend: { display: false, labels: { // fontColor: "red", //fontSize: 18 } }, point: { backgroundColor: 'white' }, //onClick: graphClickEvent, tooltips: { mode: "index", intersect: true, enabled: true, mode: "index", position: "average", } } }; var temp = jQuery.extend(true, {}, config2); myChart2 = new Chart(ctx, temp); }); }); }); } function ChartDataS2(url = 0, headers = 0, headerstwo = 0, sensorparam = 0, unit = 0, timeformat = 0, coun_name = 0, coun_city_loc_text = 0) { makeAjaxCall(url, headers, "GET", function (respJson) { //console.log(respJson); makeAjaxCall(url, headerstwo, "GET", function (respJsonTwo) { // console.log(respJsonTwo); var chartdata = respJson['Table']['Data'][0]; var colorarray = []; var chartvalueobj = chartdata['averageArray']; var chartdateobj = chartdata['timeArray']; var chartdataTwo = respJsonTwo['Table']['Data'][0]; var colorarrayTwo = []; var chartvalueobjTwo = chartdataTwo['averageArray']; var chartdateobjTwo = chartdataTwo['timeArray']; var location_name1 = coun_city_loc_text; var location_name2 = coun_name; var bestdata = Math.min.apply(Math, chartvalueobj); // 1 var worstdata = Math.max.apply(Math, chartvalueobj); // 3 var bestindex = chartvalueobj.indexOf(bestdata); var worstindex = chartvalueobj.indexOf(worstdata); var bformatedtime = moment(chartdateobj[bestindex]).format('LT'); var bformateddate = moment(chartdateobj[bestindex]).format('LL'); var wformatedtime = moment(chartdateobj[worstindex]).format('LT'); var wformateddate = moment(chartdateobj[worstindex]).format('LL'); var start_date = moment().startOf(chartdateobj).format('YYYY-MM-DD'); var end_date = moment().endOf(chartdateobj).format('YYYY-MM-DD'); if ($(window).width() > 640) { var ctx = document.getElementById("history_comp_graph").getContext("2d"); var grd = ctx.createLinearGradient(0.000, 350.000, 0.000, 100.000); } else { var ctx = document.getElementById("history_comp_graph_s").getContext("2d"); var grd = ctx.createLinearGradient(0.000, 350.000, 0.000, 100.000); } for (var i in chartvalueobj) { var valuecolor = GetColorBySensorNameAndValue(sensorparam, chartvalueobj[i]); colorarray.push(valuecolor); var valuecolorTwo = GetColorBySensorNameAndValue(sensorparam, chartvalueobjTwo[i]); colorarrayTwo.push(valuecolorTwo); } var unit_type = "1"; var str = respJson['Table']['sensorName']; var res = str.toUpperCase(); /*var annnot_arr=get_annotation(res,unit_type);*/ config2 = { data: { labels: chartdateobj, datasets: [ { label: location_name1, type: 'line', data: chartvalueobj, backgroundColor: 'transparent', pointBorderColor: 'transparent', borderColor: '#39A033', pointBackgroundColor: colorarray, pointRadius: 1, borderWidth: 2, }, { label: location_name2, type: 'line', data: chartvalueobjTwo, backgroundColor: 'transparent', pointBorderColor: 'transparent', borderColor: '#289BD1', pointBackgroundColor: colorarrayTwo, pointRadius: 1, borderWidth: 2, }, ] }, options: { /* annotation: { annotations:annnot_arr },*/ responsive: true, maintainAspectRatio: true, animation: { easing: 'easeInOutQuad', duration: 520 }, legend: { display: true }, scales: { xAxes: [{ gridLines: { display: false }, ticks: { autoSkip: true, }, barThickness: 5, type: "time", time: { unit: unit, displayFormats: { quarter: timeformat } } }], yAxes: [{ gridLines: { display: true }, ticks: { min: 0, } }] }, legend: { display: false, labels: { //fontColor: "red", //fontSize: 18 } }, point: { backgroundColor: 'white' }, //onClick: graphClickEvent, tooltips: { mode: "index", intersect: true, enabled: true, mode: "index", position: "average", } } }; var temp = jQuery.extend(true, {}, config2); myChart2 = new Chart(ctx, temp); }); }); } const aqiIndia = "14"; const aqiUsa = "17"; console.log("Aqi ind and us", "Keene") progressRing({ "aqiIn": aqiIndia, "aqiUs": aqiUsa }); function progressRing(obj) { var location = "Keene"; location = location.charAt(0).toUpperCase() + location.slice(1); if (screen.width < 520) { if (location.length > 25) { const name = location.split(" ") const shortName = name[0] + " " + name[1] + "..."; location = shortName; } } console.log("OBJECTR", singlelocations) var pageHeading = ''; pageHeading += "

Real-time PM2.5, PM10 air pollution level

Last Updated: 31 Aug 2024, 08:05am

"; $(".card-header-h1").html(pageHeading); var total_goals = 999; var goals_completed = getCookie("aqiType") === "AQI-IN" ? obj.aqiIn : obj.aqiUs; var goal_color = getCookie("aqiType") === "AQI-IN" ? GetColorBySensorNameAndValue("AQI-IN", goals_completed) : GetColorBySensorNameAndValue("aqi", goals_completed); var country_aqi = "(AQI)"; console.log("AQIfdfdVALUE", goals_completed, location); console.log(goal_color); var bar = new ProgressBar.Circle(progress_ring_aqi, { color: goal_color, // This has to be the same size as the maximum width to // prevent clipping strokeWidth: 8, trailWidth: 7, easing: 'easeInOut', duration: 1400, text: { autoStyleContainer: false }, from: { color: goal_color, width: 9 }, to: { color: goal_color, width: 9 }, // Set default step function for all animate calls step: function (state, circle) { circle.path.setAttribute('stroke', state.color); circle.path.setAttribute('stroke-width', state.width); var value = Math.round(circle.value() * 999); if (value === 0) { circle.setText(''); } else { console.log("VALUE LOCATION", value) circle.setText(value); $(".progressbar-text").css("color", goal_color) } } }); bar.text.style.fontFamily = 'Nunito Sans, sans-serif'; bar.text.style.fontSize = '20px'; bar.text.style.color = "#f4f4f4"; bar.text.style.fontWeight = '800'; var g = "1"; bar.animate(goals_completed / total_goals); // Number from 0.0 to 1.0 }

Keene Air Quality Index (AQI): Real-Time Air Pollution (2024)

FAQs

Keene Air Quality Index (AQI): Real-Time Air Pollution? ›

AQI values below 100 are generally thought of as satisfactory. When AQI values are above 100, air quality is considered to be unhealthy-at first for certain sensitive groups of people, then for everyone as AQI values get higher. Each category corresponds to a different level of health concern.

What is a good AQI score? ›

AQI values below 100 are generally thought of as satisfactory. When AQI values are above 100, air quality is considered to be unhealthy-at first for certain sensitive groups of people, then for everyone as AQI values get higher. Each category corresponds to a different level of health concern.

What is the index for good air quality _____? ›

For example, an AQI value of 50 or below represents good air quality, while an AQI value over 300 represents hazardous air quality.

At what AQI level does air become hazardous? ›

301 to 500

What is the most unhealthy AQI? ›

What Is the Air Quality Index?
NameIndex Value
Unhealthy for Sensitive Groups101 to 150
Unhealthy151 to 200
Very Unhealthy201 to 300
Hazardous301 to 500
2 more rows
Nov 2, 2023

What is the safest AQI level? ›

Real-time India Cleanest city ranking
#cityUS AQI
1Jodhpur, Rajasthan31
2Borivli, Maharashtra33
3Jabalpur, Madhya Pradesh39
4Gwalior, Madhya Pradesh44
6 more rows
Aug 15, 2024

What is an unhealthy AQI to run? ›

The AQI runs from 0 to 500; higher numbers indicate greater levels of air pollution and greater health concerns, according to the Environmental Protection Agency. Once levels exceed 150, running outdoors may become risky, said Dr. Panagis Galiatsatos, a pulmonologist with the American Lung Association.

How long can you be outside with unhealthy air quality? ›

(2-4 hours)

If outdoors, sensitive groups should keep activities light and avoid activities over 2 hours. Consider moving practices and events indoors. If events are not cancelled, increase rest periods to allow for lower breathing rates. Everyone should remain indoors as much as possible.

Who has the best air quality index? ›

Read on for the full list of 25 cities with the best air quality in the world and an analysis of what this data means.
  1. Zürich, Switzerland (0.4 µg/m3)
  2. Perth, Australia (1.5 µg/m3)
  3. Hobart, Australia (2.3 µg/m3)
  4. Uppsala, Sweden (3.5 µg/m3)
  5. Launceston, Australia (3.5 µg/m3)
  6. Reykjavík, Iceland (4.0 µg/m3)
Feb 27, 2024

What to do when the air quality is bad? ›

What can you do to stay safe from poor air quality?
  1. Reduce the time you spend outdoors when the AQI value is high. Also, reduce the intensity of outdoor activity. ...
  2. If you must go outdoors, consider wearing a mask. ...
  3. Keep your air indoors healthy by keeping the windows and doors closed.

What toxins are in household air? ›

Indoor exposures to air pollutants, including particulate matter, allergens, oxides of nitrogen, endotoxin, and mold, have been associated with impaired health and performance in children and adults.

What two pollutants pose the greatest threat to humans? ›

Ground-level ozone and airborne particles are the two pollutants that pose the greatest threat to human health in this country.

Does AQI get worse at night? ›

It may come as a surprise that indoor air quality gets worse at night due to reduced ventilation, HVAC system inefficiencies, and increased humidity. However, with the right solutions, you can ensure that your nighttime breathing is free from harmful pollutants.

What state is the hardest to breathe in? ›

Arizona

Where is the cleanest air in the US? ›

  • Hawaii. #1 in Air Quality. #34 in Best States Overall. ...
  • Maine. #2 in Air Quality. #28 in Best States Overall. ...
  • Vermont. #3 in Air Quality. #7 in Best States Overall. ...
  • New Hampshire. #4 in Air Quality. ...
  • Virginia. #5 in Air Quality. ...
  • West Virginia. #6 in Air Quality. ...
  • Nebraska. #7 in Air Quality. ...
  • Massachusetts. #8 in Air Quality.

Which city has the cleanest air 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.

What is the highest AQI ever recorded? ›

Synopsis. In the global hall of shame, Delhi was on top with its 1,200-plus AQI, followed by Lahore at 163, Dhaka at 157 and Kolkata at 156.

What does an AQI of 500 mean? ›

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.

References

Top Articles
Cordelia Empress Itinerary, Current Position, Ship Review | CruiseMapper
Ohio Lottery Information
Melson Funeral Services Obituaries
Sound Of Freedom Showtimes Near Governor's Crossing Stadium 14
Mopaga Game
THE 10 BEST Women's Retreats in Germany for September 2024
Https Www E Access Att Com Myworklife
World Cup Soccer Wiki
Helloid Worthington Login
Oro probablemente a duna Playa e nomber Oranjestad un 200 aña pasa, pero Playa su historia ta bay hopi mas aña atras
Guilford County | NCpedia
Youravon Comcom
Truck Trader Pennsylvania
Scenes from Paradise: Where to Visit Filming Locations Around the World - Paradise
Cyndaquil Gen 4 Learnset
Urban Airship Expands its Mobile Platform to Transform Customer Communications
Ruben van Bommel: diepgang en doelgerichtheid als wapens, maar (nog) te weinig rendement
Craigslist West Valley
bode - Bode frequency response of dynamic system
Yard Goats Score
Lola Bunny R34 Gif
Yisd Home Access Center
Walgreens Bunce Rd
Does Hunter Schafer Have A Dick
Naya Padkar Gujarati News Paper
Speedstepper
Doctors of Optometry - Westchester Mall | Trusted Eye Doctors in White Plains, NY
Infinite Campus Asd20
Rainfall Map Oklahoma
Possum Exam Fallout 76
Pay Stub Portal
Mosley Lane Candles
Sam's Club Gas Price Hilliard
Grand Teton Pellet Stove Control Board
Metro 72 Hour Extension 2022
Samsung 9C8
Powerspec G512
Craigs List Jonesboro Ar
Craigslist Boats Eugene Oregon
Los Garroberros Menu
Ksu Sturgis Library
Devotion Showtimes Near The Grand 16 - Pier Park
5A Division 1 Playoff Bracket
Guy Ritchie's The Covenant Showtimes Near Grand Theatres - Bismarck
Unveiling Gali_gool Leaks: Discoveries And Insights
Tricare Dermatologists Near Me
Blackwolf Run Pro Shop
New Starfield Deep-Dive Reveals How Shattered Space DLC Will Finally Fix The Game's Biggest Combat Flaw
Aznchikz
Bbwcumdreams
Google Flights Missoula
The Hardest Quests in Old School RuneScape (Ranked) – FandomSpot
Latest Posts
Article information

Author: Greg O'Connell

Last Updated:

Views: 5658

Rating: 4.1 / 5 (62 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Greg O'Connell

Birthday: 1992-01-10

Address: Suite 517 2436 Jefferey Pass, Shanitaside, UT 27519

Phone: +2614651609714

Job: Education Developer

Hobby: Cooking, Gambling, Pottery, Shooting, Baseball, Singing, Snowboarding

Introduction: My name is Greg O'Connell, I am a delightful, colorful, talented, kind, lively, modern, tender person who loves writing and wants to share my knowledge and understanding with you.