############################ INTERACTIVE STATS PLOTS ############################# ### AMET CODE: AQ_Stats_Plots_leaflet.R ### ### This code takes a MYSQL database query for a single species from one or more ### networks and a single simulation and calculates summary statistics for each site ### and the entire domain by network. Interactive spatial plots using the leaflet and ### the htmlwidgets R libraries are produced for select statistics, specifically MB, ME, ### FB, FE, NMB, NME, RMSE and Correlation. Images are output as html files and can be ### self-contained using PANDOC. If PANDOC is unavailable, the selfcontained options at ### the end of this code should be set to false. ### ### Last modified by Wyat Appel; March 2019 ################################################################################## Loading required package: RMySQL Loading required package: DBI Loading required package: fields Loading required package: spam Loading required package: dotCall64 Loading required package: grid Spam version 2.6-0 (2020-12-14) is loaded. Type 'help( Spam)' or 'demo( spam)' for a short introduction and overview of this package. Help for individual functions is also obtained by adding the suffix '.spam' to the function name, e.g. 'help( chol.spam)'. Attaching package: ‘spam’ The following objects are masked from ‘package:base’: backsolve, forwardsolve See https://github.com/NCAR/Fields for an extensive vignette, other supplements and source code Loading required package: leaflet Loading required package: htmlwidgets Loading required package: maps Loading required package: mapdata [1] "SELECT d.network,d.stat_id,s.lat,s.lon,d.ob_dates,d.ob_datee,d.ob_hour,d.month , d.PM25_TOT_ob, d.PM25_TOT_mod ,d.POCode,s.state from ARDEQ_T3_AMETv14 as d, site_metadata as s WHERE d.PM25_TOT_ob is not NULL and d.network='IMPROVE' and s.stat_id=d.stat_id and d.ob_dates BETWEEN 20160701 and 20160731 and d.ob_datee BETWEEN 20160701 and 20160731 and ob_hour between 0 and 23 ORDER BY stat_id,ob_dates,ob_hour" Error in .local(conn, statement, ...) : could not run statement: Unknown column 'd.PM25_TOT_ob' in 'field list' Calls: query_dbase ... db_Query -> dbSendQuery -> dbSendQuery -> .local -> .Call In addition: Warning messages: 1: In .local(conn, statement, ...) : Unsigned INTEGER in col 4 imported as numeric 2: In .local(conn, statement, ...) : Unsigned INTEGER in col 10 imported as numeric 3: In .local(conn, statement, ...) : Unsigned INTEGER in col 11 imported as numeric 4: In .local(conn, statement, ...) : Unsigned INTEGER in col 12 imported as numeric 5: In .local(conn, statement, ...) : Unsigned INTEGER in col 21 imported as numeric 6: In .local(conn, statement, ...) : Unsigned INTEGER in col 4 imported as numeric 7: In .local(conn, statement, ...) : Unsigned INTEGER in col 10 imported as numeric 8: In .local(conn, statement, ...) : Unsigned INTEGER in col 11 imported as numeric 9: In .local(conn, statement, ...) : Unsigned INTEGER in col 12 imported as numeric 10: In .local(conn, statement, ...) : Unsigned INTEGER in col 21 imported as numeric Execution halted