meteor showers are calculated locally in livedata.php initial info to build the scripts came from IMO .
Ah, I'll update that.
where did you get that visits graph html css chart ive been working on i never released it did you scrape my site ?
Yes, I grabbed the code from your site. I noticed the lightning icon in this and several other images:
https://weather34.com/homeweatherstation/img1/mbc.pngSince it was in the images, I thought this was something that was available in older versions but removed. I didn't know it was an unreleased feature. I can switch to using a chart from CanvasJS if you'd prefer.
earthquake data is provided by earthquake-report.com what is SOS ?
"SOS Earthquakes" is the organization that runs earthquake-report.com
other than that well done however you will struggle for updates just be aware .
Nah, it takes just a few minutes to merge changes.
purple air and aqicn scripts were updated this morning some users found some anomalies in using multiple station id and icons and css ,code script were updated .
Thanks for the heads up. I've merged the changes.
Btw, there are two changes I made to the purple air integration:
1) I'm averaging the pm25 values from both the Purple Air "A" and "B" sensors. This is what Purple Air appears to be doing when they display the data.
2) I added a function to convert the Purple Air pm25 values to the AQI scale used by aqicn.org
For example, in purpleair.php, I've changed line 164 to:
$aqiweather["aqi"] = number_format(pm25_to_aqi(($parsed_json->{'results'}[0]->{'PM2_5Value'} + $parsed_json->{'results'}[1]->{'PM2_5Value'}) / 2),1);
This is the pm25_to_aqi function:
function pm25_to_aqi($pm25){
if ($pm25 > 500.5) {
$aqi = 500;
} else if ($pm25 > 350.5 && $pm25 <= 500.5 ) {
$aqi = map($pm25, 350.5, 500.5, 400, 500);
} else if ($pm25 > 250.5 && $pm25 <= 350.5 ) {
$aqi = map($pm25, 250.5, 350.5, 300, 400);
} else if ($pm25 > 150.5 && $pm25 <= 250.5 ) {
$aqi = map($pm25, 150.5, 250.5, 200, 300);
} else if ($pm25 > 55.5 && $pm25 <= 150.5 ) {
$aqi = map($pm25, 55.5, 150.5, 150, 200);
} else if ($pm25 > 35.5 && $pm25 <= 55.5 ) {
$aqi = map($pm25, 35.5, 55.5, 100, 150);
} else if ($pm25 > 12 && $pm25 <= 35.5 ) {
$aqi = map($pm25, 12, 35.5, 50, 100);
} else if ($pm25 > 0 && $pm25 <= 12 ) {
$aqi = map($pm25, 0, 12, 0, 50);
}
return $aqi;
}
function map($value, $fromLow, $fromHigh, $toLow, $toHigh){
$fromRange = $fromHigh - $fromLow;
$toRange = $toHigh - $toLow;
$scaleFactor = $toRange / $fromRange;
// Re-zero the value within the from range
$tmpValue = $value - $fromLow;
// Rescale the value to the to range
$tmpValue *= $scaleFactor;
// Re-zero back to the to range
return $tmpValue + $toLow;
}
The "PM2.5 AQI scale" scale used is found here:
https://aqicn.org/calculator/