Skip to contents

Parameter Sets

One of the most important parts of working in mqor is defining parameters; RV, U(RV), Alpha and Beta. These functions allow you to easily define a parameter set for use in model performance statistics functions.

mqo_params()
Conveniently construct a set of parameters for use in mqor functions
mqo_params_default()
Access 'default' parameters for use in mqor functions
default_params
Default parameters taken from the CEN technical specification

Model Performance Statistics

The model quality objectives methodology defines numerous key statistics which underpin the model quality indicator calculation. mqor provides functions to calculate these individually, as well as combined together in one step via summarise_mqo_stats().

vec_pi_bias() vec_pi_cor() vec_pi_sd() vec_ti_crmse() vec_si_rmse()
Complementary performance indicators
vec_bias() vec_rmse() scalar_uncer() vec_rmsu() vec_cor() vec_sd() vec_crmse() vec_mqi()
Statistical performance indicators
summarise_mqo_stats()
Quickly summarise observed (measured) and modelled concentrations for MQO evaluation
write_mqo_stats()
Write tables of MQO summary data to a file

Visualisations

Once a statistics set has been calculated using summarise_mqo_stats(), numerous different plotting functions can be used to visualise it for easier analysis, with both static and interactive versions.

plot_comparison_bars()
Plot a bar chart comparing observed (measured) and modelled concentrations
plot_mqi_bars()
Plot a bar chart visualising the Modelling Quality Indicator (MQI)
plot_mqi_report()
Plot a 'report' summarising indicators for both short- and long-term model quality objectives
plot_mqi_scatter()
Plot a scatter chart visualising the Modelling Quality Indicator (MQI)
plot_timeseries()
Quickly plot observed (measured) and modelled concentrations over time in short-term data
tabulate_mqo_stats()
Create an interactive table of MQO summary data

Data Utilities

To support users working in mqor, several data utilities are provided for common tasks such as time averaging, filtering, and calculating percentiles. Many of these are more simple implementations of similar functions found in the openair package.

filter_year() filter_month() filter_wday() filter_hour()
Filter a dataset by temporal characteristics
mqo_percentile()
Calculate a ranked percentile of a numeric vector
mutate_rolling_mean()
Convert the 'observation' and 'modelled' columns of a mqor-ready dataset into rolling means
summarise_daily() summarise_annual()
Calculate daily summaries of a mqor-ready dataset
validate_mod_obs_pairs()
Validate that all observations have a matching modelled value, and vice-versa
mqo_dict()
Convenience function for labelling columns in input data

Data Import

The mqor documentation suggests a specific file structure for use in the app version of the tool. These functions allow users to read in this format to work with the data interactively.

read_mqor()
Read Short- and Long-Term data in the recommended MQOR data structure
write_mqor()
Write Short- and Long-Term data in the recommended MQOR data structure

DELTA Tool compatibility functions

While mqor has its own suggested file format, these functions are provided for back-compaitibility with the DELTA tool. These include reading DELTA config and resource files, short-term data from CDFs and multiple CSV files, and yearly data from single and multiple CSV files. The fmt_delta_for_mqor() function binds these together.

read_delta_config()
Function to read DELTA tool configuration files
read_delta_data_cdf()
Function to read CDF files in the DELTA format
read_delta_data_delim()
Function to read CSV files in the DELTA format
read_delta_resource()
Function to read DELTA tool resource files
read_delta_yearly_dir()
Function to read a directory of yearly CSV files in the DELTA format
read_delta_yearly_file()
Function to read yearly CSV files in the DELTA format
fmt_delta_for_mqor()
Format DELTA-formatted files in a way needed by mqor

Built in datasets

These datasets are useful for teaching and learning mqor, as they are already in an appropriate structure for use with summarise_mqo_stats() and similar functions. These values were taken from the original methodology specification document.

demo_shortterm demo_longterm
Simple demonstration datasets taken from the CEN technical specification
demo_files()
Get path to mqor example files
download_demo_files()
Download larger example files from GitLab

Graphical User Interface

While mqor is most flexible when used interactively, these functions launch a graphical user interface for users less comfortable with writing and running R scripts.

launch_app()
Launch the mqor Shiny Interface