I've done a rewrite of usaextremes.php (including the function of stateextremes.php) as a new worldextremes.php (V5.00 - 04-Apr-2020).
The expanded script now uses the CSV files from
https://www.cpc.ncep.noaa.gov/products/cadb/ which includes worldwide data.
A small caveat however, the data is NOT WELL PROOFED so you can get some max/min temperatures for a station showing >25C differences.
The script already filters out >40C differences (configurable).
Now the following variables are returned:
$omittedCountry (text list of countries excluded from $world high/low/precip scans)
Note: the setting $ignoreCountrys is the array of country names to to exclude
$worldhigh
$worldlow
$worldprecip
$selectedCountry (setting: country name for selected country high/low/precip)
Note: run http://your.site.com/worldextremes.php?list to see the list of country names to use
$countryhigh
$countrylow
$countryprecip
$usahigh (Note: for lower-48 USA states)
$usalow (Note: for lower-48 USA states)
$usaprecip (Note: for lower-48 USA states)
$selectedState (setting: USA state 2-character name abbreviation in settings area)
$selectState (a copy of $selectedState for compatibility with old stateextremes.php)
$statehigh
$statelow
$stateprecip
$reportDate (nicely formatted date of the report)
$stateReportDate (a copy of $reportDate for compatibility with old stateextremes.php)
To replace the usaextremes.php (and stateextremes.php) just use include_once("worldextremes.php") and comment out/remove the include for stateextremes.php.
See the docs at
https://saratoga-weather.org/scripts-NWSmisc.php#NWSEXTR which has the download link for the script.
Many thanks to Jim (SoMDWx) for his assistance with this script!
Best regards,
Ken