NEWS.md
Documentation and other fixes to deal with CRAN check issues.
try({ ... })
block to fail gracefully when resources are not available.Camp_Fire
dataset.Camp_Fire
dataset.data.R
file.staticmap_getEsrimapBrick()
which resulted in image boundaries that didn’t exactly match the requested boundaries.CRAN manual review suggestions:
find.package()
instead of the much slower installed.packages()
to determine if a package is installed.par()
to set graphical parameters, always use save the previously set parameters and then on.exit(par(opar))
as the very next line.tempdir()
or tempfile()
are used in all examples, tests and vignettes so that no files are written to user directories.\dontrun{}
to \donttest{}
.app/
directory with example web service.PWFSLSmoke::loadDataFile()
with MazamaCoreUtils::loadDataFile()
.MazamaCoreUtils::lintFunctionArgs()
with timezoneLintRules
and included explicit timezones wherever they are allowed.PWFSLSmoke::parseDatetime()
has been internally replaced with MazamaCoreUtils::parseDatetime()
with explicit timezone argumentmonitor_load()
which wouldn’t load data when the specified time range was in the last 10 days.This patch restores some of the ESRI mapping functionality by providing a function to download, stitch and crop images from ESRI tile services. The new staticmap_getRasterBrick()
provides a generalized API for generating basemaps from the two tiling services currently being supported: ESRI and Stamen.
monitor_staticmap()
, staticmap_getRasterBrick()
and staticmap_getEsrimapBrick()
.staticmap_getStamenmapBrick()
.optparse
package so that executable scripts can be run inside the mazamascience/pwfslsmoke
image.debug.trace(...)
statement while processing AirNow data.This patch release deals with the AirNow’s recent inclusion in their data feeds of US Embassy data. Some Embassy sites are in time zones with fractional offset from UTC. The PWFSLSmoke data model requires that all monitoring data align on hour boundaries. All non-conforming AirNow monitors (mostly in South Asia) are now removed during the early stages of processing.
timeInfo()
.timeInfo()
creation of localSstandardTime_UTC
.wrcc_createRawDataframe()
to use the proper WRCC url.WRCC
dataset with unitIDs added to the cache
in 2018 and 2019.This patch release deals with the loss of the free basemap generation service utilized by esriMap_getMap()
. An authentication token is now required and this patch provides a workaround by using free tiles provided by Stamen and ggmap::get_stamenmap()
.
The following new functions are provided:
monitor_stamenmap()
– replacement for monitor_esriMap()
staticmap_getStamenmapBrick()
staticmap_plotRasterBrick()
The use of monitor_esriMap()
has been purged from all examples and vignettes. The goal is to get to the point of having at least minimal capabilities for generating static maps and resubmitting the package to CRAN.
monitor_map()
examples because ESRI map downloads are disabledcreateEmptyMonitor()
monitor_getCurrentStatus()
:
Version 1.2.x marks the official release for the 2019 fire season.
monitor_leaflet()
now visibly returns a leaflet object which can be further customized by the user.TRACE
level (previously, many were DEBUG
)DEBUG
level statement with the function namemonitor_getCurrentStatus()
monitor_getCurrentStatus()
EndTime
now defaults to the most recent time in the given ws_monitor
.monitor_getCurrentStatus()
:
monitor_leaflet()
which didn’t properly assign colors when some monitors had all missing data.monitor_leaflet()
now displays monitors with all missing values as light gray.monitor_leaflet()
now invisibly returns a leaflet object which can be further customized by the user.distance()
.timeInfo(..., timezone = "UTC")
.monitor_dailyStatistic()
now uses the most common timezone when multiple timezones are encountered. (It previously just picked the first one.)monitor_getDailyMean()
now works with multiple-monitor ws_monitor objects and returns a dataframe of daily meansImproved documentation and harmonization of monitor_writeCSV()
and monitor_print()
.
This release adds functions for working with generic data.
generic_downloadData()
generic_parseData()
monitor_load()
where the incorrect year was used in requests for archival dataesriMap_getMap()
from INFO
to TRACE
monitor_currentData()
monitor_writeCurrentGeoJSON()
has been removedmonitor_currentData()
has been removedmonitor_writeCurrentStatusGeoJSON()
monitor_writeCurrentGeoJSON()
, but internally uses monitor_getCurrentStatus()
This release enhances monitor_getCurrentStatus()
.
yesterdayAQI
column to yesterday_pm25_24hr
for better fit with the column naming schemelast_validLocalTimestamp
and previous_validLocalTimestamp
columns, which are strings showing the local time at a monitorThis release refactors functions prefixed with monitorPlot_*
to instead start with monitor_*
, keeping in line with other functions accepting a ws_monitor object as their first argument.
The affected functions are:
In addition, monitorPlot_timeOfDaySpaghetti()
has been marked as defunct, with no replacement.
tidy_toMonitor()
Added new function monitor_getCurrentStatus()
, which returns a data frame containing meta information as well as current status information given a ws_monitor_ object.
EsriMap_getMap()
monitor_currentData()
bug fixAdd convenience functions monitor_extractData()
and monitor_extractMeta()
, which return the dataframes inside a ws_monitor
object.
pch
argument to monitor_map()
This release refactors functions so that all functions accepting a ws_monitor
object as their first parameter include the monitor_
prefix in their name.
The affected functions are:
Old Name | New Name |
---|---|
monitorDygraph() |
monitor_dygraph() |
monitorEsriMap() |
monitor_esriMap() |
monitorLeaflet() |
monitor_leaflet() |
monitorMap() |
monitor_map() |
monitorMap_performance() |
monitor_performanceMap() |
In addition, monitorGoogleMap()
has been deprecated in favor of monitor_esriMap()
.
montor_collapse()
now returns a ws_monitor
object with a full ‘meta’ dataframe that retains any metadata that is sharedmonitor_timeInfo()
convenience wrapperlocalStandardTime_UTC
and daylightSavings
columns to the dataframe returned by timeInfo()
Moving all base plot related code from PWFSLSmokePlot to PWFSLSmoke so that all functionality in the former is purely ggplot2 based.
addPolygon()
, addWindBarb() and
addWindBarbs()`aqiPalette()
monitor_getDailyMean()
airnow_load()
calls airnow_loadAnnual()
and will is pre-deprecatedairsis_load()
calls airsis_loadAnnual()
and will is pre-deprecatedwrcc_load()
calls wrcc_loadAnnual()
and will is pre-deprecatedloadData()
to monitor_load()
DUMP
filesheidike
to heidke
in all skill
related functions%>%
is now exportedmonitor_download~()
functions to download local copies of PWFSL monitor data files.monitor_loadLatest()
, monitor_loadDaily()
and monitor_loadAnnual()
functionsairnow
, airsis
, epa
and wrcc
~_load~()
functions to include a dataDir
parameter to allow data loading from a local directory rather than always from the internet. the airsis
and wrcc
functions now support the (unused) parameter
argument to match the airnow
function signatureloadData()
to load monitoring data covering any time period within a single yearmonitor_join()
to skip over monitorIDs that are not found in either of the monitor objects being joined togetherlubridate::parse_date_time
expectAll
, which controls how strict the parsing should be about accepting failuresmonitorGooglMap()
and updated examples to use monitorEsriMap()
insteadesriMap_getMap()
lintr
packagePWFSLSmoke.Rproj
for consistent developmentmonitor_toTidy()
function to convert ws_monitor
objects into tidyverse ‘tidy-formatted’ data (see more here)monitor_isTidy()
function to check if given data is in a ‘tidy’ formatmonitor_writeCurrentGeoJSON()
*Maps_and_Timeseries_Plots
vignette to use ESRI maps instead of Google maps.monitor_nowcast()
algorithm to return NA
when monitor data re missing. (See the NowCast vignette.)datetime
parameter in monitor_writeCurrentGeoJSON()
and monitor_currentData()
monitor_writeCurrentGeoJSON()
functionmonitor_currentData()
returns metadata in addition to current datamonitor_writeCSV()
functionmonitor_print()
quietly=TRUE
googleApiKey
, esriApiKey
and getter/setter functions for eachaddEsriAddress()
functionairsis_createMonitorObject()
and wrcc_createMonitorObject()
now both accept arguments existingMeta
with a default value of NULL
and addGoogleMeta
and addEsriMeta
with default values of FALSE
airsis_createMetaDataframe()
and wrcc_createMetaDataframe()
now both accept arguments existingMeta
with a default value of NULL
and addGoogleMeta
and addEsriMeta
with default values of FALSE
addGoogleMetadata()
aqiColors()
function to simplify creation of color vectors for use in maps and plotsmonitor_print()
function to generate human readable CSV filesmonitor_dailyStatistic()
which did not return the first daily averagemonitor_subsetByDistance()
which failed when no monitors were found within the radiusmonitor_subsetBy()
which failed when a filter used variables defined within a calling functionmonitor_join()
which failed when a monitorID was missing from one of the ws_monitor objects being joinedesriMap_getMap()
when width != height
airnow_load()
AQI$names
: ‘Good’, ‘Moderate’, …addAQIStackedBars()
functionmonitor_load()
which then tests monitor_combine()
monitorDygraph()
monitorDygraph()
to default to UTC when more than one timezone is presentAQI$actions
– text with suggested actions to protect healthAQI
: AQI_en
and AQI_es
monitor_isMonitor()
to validate the structure of a ws_monitor object~Lwd=0
in monitorPlot_timeseries()
now works on WindowsmonitorPlot_dailyBarplot()
accepts tlim
argument of class POSIXct
monitor_combine()
loadLatest()
and loadDaily
() functionsmonitor_combine()
wrcc_downloadData()
now uses parseDatetime()
like other functionsmonitorID
argument is no longer required in monitor_join()
. Defaults to joining all shared monitorIDs.baseUrl
argument in wrcc_loadLatest()
and wrcc_loadDaily()
monitor_dailyStatistics()
that ignored the last full day. Thanks to jmatchett for the fix.daily_avg
to dailyAvg
in monitor_dailyStatistics()
argument extraColumns
monitor_asDataframe()
functionmonitor_dailyStatistics()
that appeared when the host computer runs in the UTC timezoneWRCC
object with unitIDs is now a list of listsairnow_loadLatest()
function to access real-time, last 10 day filesairnow_loadDaily()
function to access daily-updated, last 45 day fileswrcc_load()
function to access pre-generated annual .RData fileswrcc_loadLatest()
function to access real-time, last 10 day fileswrcc_loadDaily()
function to access daily-updated, last 45 day filesairsis_load()
function to access pre-generated annual .RData filesairnow_load()
function to access pre-generated monthly .RData filesepa_load()
and airnow_load()
localExecutables/epa_createAnnualDataframes_exec.R
logger
statements from monitor_combine()
and monitor_join()
monitor_join()
when averaging overlapping measurementsepa_load()
function accesses pre-generated annual .RData filesmonitorPlot_timeseries()
when using style="aqidots"
monitor_subsetBy()
when filtering on metadata columns with NAs
presentmonitor~
functions now test for empty ws_monitor objectslocalNotebooks/
directory contains detailed examplesmonitor_dailyStatistic()
that didn’t test for minHours
properlyws_monitor$meta
ws_monitor$meta$monitorID
is now a combination of new metadata columns siteID
and instrumentID
initializeMazamaSpatialUtils()
convenience functionUS_52
vector of all US state codes including DC
and PR
~_createMetaDataframes()
to produce v1.0 metadataairnow_createMetaDataframes()
filters incoming sites for countryCode %in% c('CA','MX','US')
, discarding sites associated with other countriesmonitorPlot_timeseries()
argument aqiDots
renamed to aqidots
airnow_createMonitorObjects()
functionaddUSGSElevation()
functionaddGoogleMetadata()
in favor of new functions addGoogleElevation()
and addGoogleAddress()
openaq_~
data download and processing functionszeroMinimum
parameter to data ingest functions to specify whether negative values should be converted to zeroairnow_downloadData()
to airnow_downloadParseData()
monitor_join()
function allows you to merge the data of ws_monitor objects with shared monitorIDsCarmelValley
dataset to Carmel_Valley
GMT
to UTC
createEmptyMetaDataframe()
functionmonitor_subset~()
functions now return ‘meta’ dataframes with zero rows and ‘data’ dataframes with a single datetime
column rather than NULL
when no monitors exist in the subset.airsis_availableUnits()
AIRSIS
object containing a list of understood unitTypes
(primarily for internal use)examples/airsis_2017.R
demonstrating creation of an AIRSIS monitoring dataset for 2017.monitor_dailyStatistic()
and monitor_dailyThreshold()
to avoid CRAN test timeoutsesriMap_getMap()
to use httr
packageairsis_availableUnits()
functionAIRSIS
object with available monitor typesesriMap_getMap()
to ensure that projected maps are the correct sizeesriMap_getMap()
arguments changed to: bboxString
esriMap_getMap()
, esriMap_plotOnStaticMap()
, monitorEsriMap()
addMarker()
function to add a marker to a plotmonitor_reorder()
now includes dropMonitors=FALSE
defaultmonitor_nowcast()
now calculates values after the first 2 valid measurementsmonitor_aqi()
algorithmmonitor_nowcast()
algorithmmonitorPlot_dailyBarplot()
time axisDEBUG
and INFO
logging statements during AIRSIS and WRCC data processingdeploymentID
for temporary monitors based on lon_lat
rather than cluster IDflagAndKeep
capability to airsis_createRawDataframe()
and wrcc_createRawDataframe()
raw_enhance()
now handles AIRSIS EBAM filesairsisDump_createMonitorObject()
which was previously applying QC before splitting by monitorIDraw_enhance()
monitor_combine()
so that it now works when monitorList
contains a single ws_monitor objectwrccDump_parseData()
and airsisDump_parseData()
which failed when a monitor had a single record of dataparseDatetime()
returns POSIXct unmodifiedmonitor_subsetBy()
drops monitors when filter evaluates to NAlongitude
and latitude
instead of lon
and lat
monitor_scaleData()
functionmonitorMap_performance()
issue with legend colorsepa_~()
data processing functionsR CMD check
[addLegend()
-> addAQILegend()
addAQILines()
monitorMap()
no longer creates legendsmonitorGoogleMap()
no longer creates legendsmonitorGoogleMap()
accepts centerLon
and centerLat
argumentsmonitorPlot_dailyBarplot()
accepts labels_x_nudge
and labels_y_nudge
argumentsmonitorPlot_hourlyBarplot()
accepts labels_x_nudge
and labels_y_nudge
argumentstyle="gnats"
in monitorPlot_timeseries()
airnow_loadLatest()
functionmonitor_collapse()
now has na.rm=TRUE
argumentaddClustering()
raw_enhance()
addShadedNights()
to addShadedNight()`addBullseye()
accepts more arguments and works with RgoogleMaps map objectsmonitorDygraph()
now accepts tlim
argument instead of dateWindow
addIcon()
function adds icons to maps and RgoogleMaps map objectsairsis_downloadHourlyData()
now uses readr::read_delim()
monitor_combine()
now accepts a list of monitors instead of just two.df_timeOfDaySpaghettiPlot()
for working with “df_” data (raw “engineering” data but cleaned up and augmented).df_getHighlightDates()
function to find dates with unusual values in the “engineering” data.monitor_timeseriesPlot()
, monitor_map()
and monitor_leaflet()
to remove/modify their use of the AQIStyle
argument.