Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major update #166

Merged
merged 251 commits into from
Mar 18, 2022
Merged
Show file tree
Hide file tree
Changes from 233 commits
Commits
Show all changes
251 commits
Select commit Hold shift + click to select a range
245a968
Merge pull request #155 from epiforecasts/add-check-function
nikosbosse Nov 23, 2021
bd12e58
Merge pull request #156 from epiforecasts/add-check-function
nikosbosse Nov 23, 2021
22c7c0a
eliminate 'verbose' argument in scoringutils
nikosbosse Nov 24, 2021
295a023
simplify data check
nikosbosse Nov 24, 2021
83eb6c6
get rid of possibility to add separate truth data and forecasts to ev…
nikosbosse Nov 24, 2021
5baab8d
replace 'interval_score_arguments list with ... in eval_forecasts
nikosbosse Nov 24, 2021
b75c62a
small simplification for the computation of the interval score in eva…
nikosbosse Nov 24, 2021
e420b9f
small update to documentation
nikosbosse Nov 24, 2021
959c5fe
get rid of the summarised argument in eval_forecasts
nikosbosse Nov 24, 2021
ca760b6
remove pit plots argument from eval_forecasts_quantile
nikosbosse Nov 24, 2021
9160039
change line to avoid merge conflict
nikosbosse Nov 24, 2021
42f4d8b
Merge pull request #157 from epiforecasts/master
nikosbosse Nov 24, 2021
7c17b7a
restructure PIT functions
nikosbosse Nov 24, 2021
fb757b3
solve merge conflict I am a hero
nikosbosse Nov 24, 2021
d35ca01
Merge branch 'major-update' into rename-sharpness
nikosbosse Nov 25, 2021
84fe345
Merge pull request #163 from epiforecasts/rename-sharpness
nikosbosse Nov 25, 2021
f22fd65
increment package version
nikosbosse Nov 25, 2021
beeb652
restyle check_forecasts.R file
nikosbosse Nov 25, 2021
8092f1b
resolve merge conflicts
nikosbosse Nov 25, 2021
48d14a7
Merge branch 'major-update' into simplify-eval-forecasts
nikosbosse Nov 25, 2021
3847957
Merge pull request #165 from epiforecasts/simplify-eval-forecasts
nikosbosse Nov 25, 2021
0df2262
correct a few minor typos
nikosbosse Nov 25, 2021
e2bff33
Update NEWS file
nikosbosse Nov 25, 2021
aac1fa4
remove pit_plots argument from eval_forecasts
nikosbosse Nov 25, 2021
68ff7b4
change default from data = NULL to just data in eval_forecasts
nikosbosse Nov 25, 2021
3a8f6e4
create helper function to get unit of a single forecast
nikosbosse Nov 25, 2021
4f26022
get rid of by argument
nikosbosse Nov 25, 2021
0a62ef6
temporarily reintroduce by argument to pairwise comparisons
nikosbosse Nov 25, 2021
651b72b
write helper function to simplify checks for eval_forecasts
nikosbosse Nov 25, 2021
30ee845
sketch for a version of available_metrics() that returns explanations
nikosbosse Nov 26, 2021
13aa44c
add warning to check_clean_data if columns correspond to names of met…
nikosbosse Nov 26, 2021
8f50d01
simplify eval_forecasts by adding check functions and a summarise_sco…
nikosbosse Nov 26, 2021
0f401e6
add return statement to eval_forecasts and add two tests
nikosbosse Nov 27, 2021
23a3c04
rename function in test to increase clarity
nikosbosse Nov 27, 2021
74da245
move computation of pairwise comparisons outside eval_forecasts_quant…
nikosbosse Nov 27, 2021
35e7daf
add helper function to infer metric for pairwise comparisons
nikosbosse Nov 27, 2021
de4f67c
add pairwise comparison tests for binary and integer data
nikosbosse Nov 27, 2021
3d37201
add return statement to pairwise_comparison()
nikosbosse Nov 27, 2021
f95c7a3
add more tests for pairwise comparisons
nikosbosse Nov 27, 2021
64656ec
add a quantile version to pit_df and hist_PIT
nikosbosse Dec 10, 2021
5193d6f
Merge pull request #169 from epiforecasts/quantile-pit
nikosbosse Dec 10, 2021
19a7429
remove by argument from pairwise_comparison
nikosbosse Dec 10, 2021
6022536
replace test_option argument with ... in pariwise_comparison
nikosbosse Dec 10, 2021
5873f5c
get rid of by argument in all pairwise comparison functions
nikosbosse Dec 10, 2021
cbc169c
set metric argument in pairwise_comparison to "auto"
nikosbosse Dec 10, 2021
269a459
clean code for inferring a relative skill metric in pairwise_comparis…
nikosbosse Dec 10, 2021
96669f2
correct typos
nikosbosse Dec 10, 2021
c4ba205
clean code for add_rel_skill_to_eval_forecasts()
nikosbosse Dec 10, 2021
53cc41e
add "upper" and "lower" to protected columns
nikosbosse Dec 10, 2021
41cfa32
remove by argument from add_rel_skill_to_eval_forecasts()
nikosbosse Dec 10, 2021
3c4f27a
move code to summarise scores from add_rel_skill_to_eval_forecasts to…
nikosbosse Dec 10, 2021
4ac6556
replace add_rel_skill_to_eval_forecasts() function with pairwise_comp…
nikosbosse Dec 10, 2021
1cad5c2
clean code, remove add_rel_skill_to_eval_forecasts() function
nikosbosse Dec 10, 2021
6080f0a
Merge pull request #168 from epiforecasts/refactor-pairwise2
nikosbosse Dec 10, 2021
41331db
generate example data based on European Forecast Hub forecasts
nikosbosse Dec 10, 2021
1f9f49d
switch to Forecast Hub example data
nikosbosse Dec 11, 2021
4d99391
Merge pull request #170 from epiforecasts/change-example-data
nikosbosse Dec 11, 2021
75f808d
update the way unique values for columns are shown in check_forecasts()
nikosbosse Dec 12, 2021
f1cc502
add vignette with details on scoring metrics
nikosbosse Dec 13, 2021
e715416
move tables with metric details in inst/
nikosbosse Dec 13, 2021
dfe5b22
add table with different forecast types
nikosbosse Dec 14, 2021
d2695be
integrate scoringutils paper manuscript into package
nikosbosse Dec 14, 2021
2b43f28
fix issue with non-portable file names
nikosbosse Dec 14, 2021
e2fe8d3
update manuscript
nikosbosse Dec 14, 2021
cdf76c9
update pit histogram plotting to be fully compatible with data.frames
nikosbosse Dec 15, 2021
f2983f9
Merge pull request #171 from epiforecasts/update-pit
nikosbosse Dec 15, 2021
dbc0673
update manuscript and section about calibration
nikosbosse Dec 16, 2021
e5f3b6e
Merge branch 'major-update' of https://github.com/epiforecasts/scorin…
nikosbosse Dec 16, 2021
35b6782
add plot to explain locality of scores in manuscript
nikosbosse Dec 16, 2021
c8a635b
add a script and plot to illustrate sample convergence of proper scor…
nikosbosse Dec 17, 2021
a68a4bb
update manuscript
nikosbosse Dec 17, 2021
d480c1d
rename eval_forecasts() to score()
nikosbosse Dec 18, 2021
98108d6
rename eval_forecasts files to score
nikosbosse Dec 18, 2021
eebe256
rename eval_forecasts file names
nikosbosse Dec 18, 2021
24fd1c3
allow summarise_scores() function to take arbitrary functions as input
nikosbosse Dec 18, 2021
0377657
update documentation
nikosbosse Dec 18, 2021
1b3aede
add function that adds coverage of central prediction intervals to sc…
nikosbosse Dec 19, 2021
57f9998
remove summarise_by from most function calls to score()
nikosbosse Dec 20, 2021
21b4afb
separate most instances of score() and summarise_scores() to have dif…
nikosbosse Dec 21, 2021
5750d76
integrate pairwise comparisons into summarise_scores()
nikosbosse Dec 21, 2021
13c362f
update examples
nikosbosse Dec 21, 2021
892294e
rename 'summarise_by' in pit_df() to 'by'
nikosbosse Dec 21, 2021
dc7d157
update plot function documentation
nikosbosse Dec 21, 2021
2d2f0ac
remove most facetting code outside plotting functions
nikosbosse Dec 21, 2021
3e0ff9c
delete unnecessary example data and legacy data wrangling functions
nikosbosse Dec 21, 2021
f9084c4
delete unnecessary data wrangling functions from NAMESPACE
nikosbosse Dec 21, 2021
a4991ce
delete summarise_by argument from score()
nikosbosse Dec 21, 2021
f150165
update code in manuscript
nikosbosse Dec 21, 2021
0978a3d
Export data.frame with short description of available metrics
nikosbosse Dec 22, 2021
1b276d9
create default for by argument in summarise_scores
nikosbosse Dec 22, 2021
9ca0583
update function documentation for score()
nikosbosse Dec 22, 2021
f3e5f32
clean code to check input parameters, let score() always return unsum…
nikosbosse Dec 22, 2021
4de5350
add test for summarise_scores() with no extra arguments
nikosbosse Dec 22, 2021
7e16e9f
update error handling for summarise_scores() and add test
nikosbosse Dec 22, 2021
e0c5fcb
delete old functions no longer needed
nikosbosse Dec 23, 2021
fe93818
update example, fix small bug
nikosbosse Dec 23, 2021
05f036b
Delete package startup message
nikosbosse Dec 23, 2021
9cac41c
Add helper to check available metrics, separate correlation matrix an…
nikosbosse Dec 23, 2021
917768e
simplify and rename wis_components to plot_wis_components()
nikosbosse Dec 25, 2021
edfb780
remove xlab and ylab arguments to plotting functions
nikosbosse Dec 25, 2021
fc5f5ca
rename score_heatmap() to plot_heatmap()
nikosbosse Dec 25, 2021
9bce587
rename range_plot to plot_ranges()
nikosbosse Dec 25, 2021
b892151
create avail_forecasts() function separate from plot, rename plot to …
nikosbosse Dec 26, 2021
a0458b2
rename interval_coverage and quantile_coverage to plot_interval_cover…
nikosbosse Dec 28, 2021
deb49dd
rename summarised_scores argument in plot function to 'scores', clean…
nikosbosse Dec 28, 2021
5121792
restyle absolute error functions
nikosbosse Dec 28, 2021
2c4321b
style and document available_forecasts.R functions
nikosbosse Dec 28, 2021
52f6ac1
rename quantile_bias to bias_range and update some code formatting
nikosbosse Jan 11, 2022
59c8bea
add quantile version of bias
nikosbosse Jan 11, 2022
2fbb842
rename bias function to bias_sample
nikosbosse Jan 11, 2022
0c31ed3
change reference for interval score
nikosbosse Jan 11, 2022
9426a9b
rename pit to pit_sample, pit_df to pit and hist_PIT to plot_pit()
nikosbosse Jan 11, 2022
b012649
rename hist_PIT to plot_pit and plot_wis_components to plot_wis
nikosbosse Jan 11, 2022
658193c
restyle package code
nikosbosse Jan 11, 2022
54f0aa6
spell check
nikosbosse Jan 11, 2022
ff9f978
add binary version of the log score
nikosbosse Jan 11, 2022
ee56aeb
Update readme
nikosbosse Jan 12, 2022
c5b3dae
rename score_table() to plot_score_table()
nikosbosse Jan 12, 2022
9068321
update readme
nikosbosse Jan 12, 2022
384d7a6
update vignette
nikosbosse Jan 12, 2022
75f6ac3
update readme, add example, update test
nikosbosse Jan 12, 2022
0e919e9
remove unnecessary dot argument in compare_two_models() function
nikosbosse Jan 12, 2022
f462b0f
update news file
nikosbosse Jan 12, 2022
0d0021e
add contributing guide
nikosbosse Jan 12, 2022
401d58c
fix typo
nikosbosse Jan 12, 2022
acfe7d8
rename sharpness to sharpness_sample()
nikosbosse Jan 13, 2022
dced29d
check arguments using match.arg
nikosbosse Jan 14, 2022
7c2071d
update pkgdown yaml file and function keywords
nikosbosse Jan 14, 2022
fa6ef82
add helper function for data checks in functions from the scoringRule…
nikosbosse Jan 14, 2022
3754712
make order of pairwise_comparison() arguments consistent with other f…
nikosbosse Jan 15, 2022
003cab9
improve input checking with check functions
nikosbosse Jan 15, 2022
e741ed4
add a quantile score
nikosbosse Jan 15, 2022
650bd2a
add startup message
nikosbosse Jan 15, 2022
68f1ae2
rename sharpness to mad, update input check functions
nikosbosse Jan 16, 2022
a2ce3eb
add document with open questions
nikosbosse Jan 16, 2022
691abf4
update list of to dos
nikosbosse Jan 16, 2022
bad8447
add todos to todo list
nikosbosse Jan 17, 2022
f86125f
Update package to do list
nikosbosse Jan 19, 2022
10df260
delete some unnecessary columns from the output of quantile_score()
nikosbosse Jan 19, 2022
f94f23c
update pkgdown and correct get_unit_of_forecast function
nikosbosse Jan 19, 2022
6c9a836
update to dos and manuscript
nikosbosse Jan 19, 2022
8e95be7
update to do list
nikosbosse Jan 20, 2022
3580f66
flip plot_wis, update list of available metrics
nikosbosse Jan 20, 2022
0f568de
update manuscript, update score summary table and plots
nikosbosse Jan 20, 2022
5b29385
update documentation to include both a LaTeX and ASCII version of equ…
nikosbosse Jan 21, 2022
3fd1fd5
update plot_score_table to be able to retain column ordering
nikosbosse Jan 22, 2022
8342b6f
update manuscript and package to dos
nikosbosse Jan 22, 2022
d30fe10
update manuscript
nikosbosse Jan 23, 2022
620e51d
update website
seabbs Feb 3, 2022
3d8b41d
improve docs + don't push to git
seabbs Feb 3, 2022
1f8a577
stlye
nikosbosse Jan 23, 2022
fcc439e
add linting ga
seabbs Feb 3, 2022
0d21e3b
add linting non-defaults
seabbs Feb 3, 2022
caa3242
more linting updates
seabbs Feb 3, 2022
db973fc
pkg check
seabbs Feb 3, 2022
10ade4c
allow longer lines
seabbs Feb 3, 2022
016e492
linting clean up
seabbs Feb 3, 2022
671d55c
read through and tidy readme:
seabbs Feb 3, 2022
ac1cd4b
Merge pull request #181 from epiforecasts/tidy-readme
nikosbosse Feb 3, 2022
fbc69f1
move direct scoring into its own vignette
seabbs Feb 3, 2022
9f4bd41
make readme quickstart and streamling getting started vignette
seabbs Feb 3, 2022
ea7fa1a
use parameter inheritance for as_ fns
seabbs Feb 3, 2022
2eca12e
review docs for af, bias, and ae
seabbs Feb 3, 2022
7b16f3a
briar_score
seabbs Feb 3, 2022
d764bc8
check_forecasts
seabbs Feb 3, 2022
c94b3f9
correlations
seabbs Feb 3, 2022
5a6c3b1
data documentation
seabbs Feb 3, 2022
3349a2d
doc check up to input-check-helpers
seabbs Feb 3, 2022
fdc9d43
more doc updates
seabbs Feb 3, 2022
10f1fa5
pit docs
seabbs Feb 3, 2022
b5a4fbb
check score
seabbs Feb 3, 2022
860399d
check scoringRules wrappers
seabbs Feb 3, 2022
dbadc63
summarise_scores
seabbs Feb 3, 2022
3068a1e
more summarise_scores cleaning
seabbs Feb 3, 2022
ad841c4
complete docs + examples checks
seabbs Feb 3, 2022
fc511c6
local check of changes
seabbs Feb 3, 2022
64b8132
Merge pull request #178 from epiforecasts/feature-improve-website
nikosbosse Feb 5, 2022
43974c9
Merge branch 'major-update' into styling
nikosbosse Feb 5, 2022
d727e9d
Merge pull request #180 from epiforecasts/styling
nikosbosse Feb 5, 2022
f2a7728
Correct small typo
nikosbosse Feb 5, 2022
04d61ce
Merge pull request #182 from epiforecasts/docs-getting-started
nikosbosse Feb 5, 2022
18bb3fd
update toy example script
nikosbosse Feb 5, 2022
a0577e6
Merge branch 'master' into major-update
nikosbosse Feb 5, 2022
0a6165d
Change argument name func to fun in summarise_scores
nikosbosse Feb 6, 2022
6483142
update documentation for interval score
nikosbosse Feb 6, 2022
2b0119d
update package description, fix merge conflict
nikosbosse Feb 6, 2022
344eab2
Merge pull request #189 from epiforecasts/docs-function-docs
nikosbosse Feb 6, 2022
ebb1a26
add a function to round scores
nikosbosse Feb 6, 2022
cce657b
Update .lintr
seabbs Feb 6, 2022
553f065
update vignette to show how output can be rounded
nikosbosse Feb 6, 2022
bb254f8
update docs
nikosbosse Feb 6, 2022
2fcb7e3
Merge pull request #191 from epiforecasts/round-scores
seabbs Feb 6, 2022
1d4a6d5
update table with summary of metrics
nikosbosse Feb 17, 2022
e15ff05
Merge branch 'major-update' of https://github.com/epiforecasts/scorin…
nikosbosse Feb 17, 2022
794c249
update y axis label and scale for plot_quantile()
nikosbosse Feb 17, 2022
3f13c4a
Add ability to plot multiple colours on the same plot_predictions() p…
Bisaloo Jan 28, 2022
a5eb518
Get it to work with point forecasts only
Bisaloo Feb 2, 2022
0a66429
Support quantiles without median
Bisaloo Feb 3, 2022
a2dbca9
Update snapshot tests
Bisaloo Feb 3, 2022
0f048e1
Add GITHUB_PAT in coverage action
Bisaloo Feb 3, 2022
6ed11fa
Tweak style to simplify diff
Bisaloo Feb 17, 2022
2ea42ec
Use dedicated aes_string() fct
Bisaloo Feb 17, 2022
d2e7375
Remove forcats dependency
Bisaloo Feb 17, 2022
31de0ff
Add comments
Bisaloo Feb 17, 2022
d8596c4
update plot_interval_coverage()
nikosbosse Feb 17, 2022
b70d9b7
update manuscript
nikosbosse Feb 17, 2022
50c879c
update snapshots
nikosbosse Feb 17, 2022
a465c84
Merge pull request #175 from epiforecasts/issue-174
nikosbosse Feb 18, 2022
e462cb3
streamline data checking in check_forecasts()
nikosbosse Mar 3, 2022
5abd020
don't suppress messages
nikosbosse Mar 3, 2022
9a4cadb
update manuscript text based on comments
nikosbosse Mar 3, 2022
dd2e89b
attempt to add citation format - failed
nikosbosse Mar 4, 2022
7625a2e
create find_duplicates() function and use in check_forecasts(), renam…
nikosbosse Mar 4, 2022
41346af
Merge pull request #195 from epiforecasts/refactor-check-forecasts-2
seabbs Mar 4, 2022
7380614
rename crps() --> crps_sample(), logs() --> logs_sample(), dss() --> …
nikosbosse Mar 5, 2022
3b44bf1
add documentation to permuation_test() function
nikosbosse Mar 5, 2022
4ae61e1
delete deprecated data handling functions
nikosbosse Mar 5, 2022
1c644eb
Remove tidyverse reference in CONTRIBUTING.md
nikosbosse Mar 9, 2022
4d8406a
Fix typo in R/input-check-helpers.R
nikosbosse Mar 9, 2022
2893575
Fix typo in checkin input class in R/pit.R
nikosbosse Mar 9, 2022
08f2ca5
Update package URL in _pkgdown.yml
nikosbosse Mar 9, 2022
96e82d6
Add default to helper function documentation in R/input-check-helpers.R
nikosbosse Mar 9, 2022
874eda3
update required R version in DESCRIPTION
nikosbosse Mar 9, 2022
5dffdf1
Merge branch 'major-update' of https://github.com/epiforecasts/scorin…
nikosbosse Mar 9, 2022
73f1ce4
correct typos in DESCRIPTION
nikosbosse Mar 9, 2022
0881997
update NEWS.md file
nikosbosse Mar 10, 2022
41499a1
delete placeholder code in scorre_continuous_integer.R
nikosbosse Mar 10, 2022
63c71b7
allow passing function arguments to quantile() in sample_to_quantile()
nikosbosse Mar 10, 2022
2b191cc
update documentation, replace call to 'hasArg()' with 'missing()'
nikosbosse Mar 10, 2022
0a30f37
Add check that all values are positive for pairwise comparisons
nikosbosse Mar 10, 2022
072a636
make sure that all values in pairwise comparisons have the same sign
nikosbosse Mar 10, 2022
6ebbda3
update manuscript
nikosbosse Mar 11, 2022
141380f
revert changes to sample_quantile()
nikosbosse Mar 13, 2022
d172840
create a scoringutils ggplot plot theme
nikosbosse Mar 13, 2022
660be64
rename aem to ae_median
nikosbosse Mar 13, 2022
0c403ff
rename mse to squared_error, add squared error to score()
nikosbosse Mar 13, 2022
b79b992
update documentation
nikosbosse Mar 13, 2022
d5888f5
remove "true_value" from return of score() for quantile forecasts
nikosbosse Mar 13, 2022
6fbe5a8
update metrics summary table and available_metrics() function
nikosbosse Mar 13, 2022
dbdd77e
update manuscript
nikosbosse Mar 13, 2022
bc8f0e6
update package
nikosbosse Mar 14, 2022
5cfe95b
change default plotting theme
nikosbosse Mar 14, 2022
8305003
correct typo
nikosbosse Mar 14, 2022
d5fa01a
Remove plot title in plot_correlations()
nikosbosse Mar 14, 2022
d70ed64
update manuscript
nikosbosse Mar 14, 2022
2870066
Add functionality to determine colours by category for plot_score_tab…
nikosbosse Mar 15, 2022
c7c5dea
update manuscript
nikosbosse Mar 15, 2022
5dc163c
fix some formatting for the paper
nikosbosse Mar 18, 2022
d44649a
modify print output from check_forecasts()
nikosbosse Mar 18, 2022
92ecf09
Update startup message to use the latest tagged version
nikosbosse Mar 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@
^doc$
^Meta$
^_pkgdown\.yml$
^\.devcontainer$
^inst/manuscript/manuscript_cache$
^\.lintr$
^docs$
^\.devcontainer$
5 changes: 5 additions & 0 deletions .Rinstignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
inst/manuscript/manuscript_cache/
inst/manuscript/manuscript.log
inst/manuscript/manuscript.pdf
inst/manuscript/manuscript.tex
inst/manuscript/manuscript_files/
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
45 changes: 45 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Contributing to scoringutils

This outlines how to propose a change to scoringutils.

## Fixing typos

You can fix typos, spelling mistakes, or grammatical errors in the documentation directly using the GitHub web interface, as long as the changes are made in the _source_ file.
This generally means you'll need to edit [roxygen2 comments](https://roxygen2.r-lib.org/articles/roxygen2.html) in an `.R`, not a `.Rd` file.
You can find the `.R` file that generates the `.Rd` by reading the comment in the first line.

## Bigger changes

If you want to make a bigger change, it's a good idea to first file an issue and make sure someone from the team agrees that it’s needed.
If you’ve found a bug, please file an issue that illustrates the bug with a minimal
[reprex](https://www.tidyverse.org/help/#reprex) (this will also help you write a unit test, if needed).

### Pull request process

* Fork the package and clone onto your computer. If you haven't done this before, we recommend using `usethis::create_from_github("epiforecasts/scoringutils", fork = TRUE)`.

* Install all development dependences with `devtools::install_dev_deps()`, and then make sure the package passes R CMD check by running `devtools::check()`.
If R CMD check doesn't pass cleanly, it's a good idea to ask for help before continuing.
* Create a Git branch for your pull request (PR). We recommend using `usethis::pr_init("brief-description-of-change")`.

* Make your changes, commit to git, and then create a PR by running `usethis::pr_push()`, and following the prompts in your browser.
The title of your PR should briefly describe the change.
The body of your PR should contain `Fixes #issue-number`.

* For user-facing changes, add a bullet to the top of `NEWS.md` (i.e. just below the first header). Follow the style described in <https://style.tidyverse.org/news.html>.

### Code style

* New code should follow the tidyverse [style guide](https://style.tidyverse.org).
You can use the [styler](https://CRAN.R-project.org/package=styler) package to apply these styles, but please don't restyle code that has nothing to do with your PR.

* We use [roxygen2](https://cran.r-project.org/package=roxygen2), with [Markdown syntax](https://cran.r-project.org/web/packages/roxygen2/vignettes/rd-formatting.html), for documentation.

* We use [testthat](https://cran.r-project.org/package=testthat) for unit tests.
Contributions with test cases included are easier to accept.

## Code of Conduct

Please note that the scoringutils project is released with a
[Contributor Code of Conduct](CODE_OF_CONDUCT.md). By contributing to this
project you agree to abide by its terms.
49 changes: 49 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master

name: lint

jobs:
lint:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Restore R package cache
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install dependencies
run: |
install.packages(c("remotes"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("lintr")
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Lint
run: lintr::lint_package()
shell: Rscript {0}
2 changes: 2 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ name: test-coverage
jobs:
test-coverage:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ inst/doc
R/sandbox.R
doc
Meta
inst/manuscript/manuscript_cache/
inst/manuscript/manuscript.log
inst/manuscript/manuscript.pdf
inst/manuscript/manuscript.tex
inst/manuscript/manuscript_files/
docs
6 changes: 6 additions & 0 deletions .lintr
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
linters: with_defaults(
line_length_linter = line_length_linter(120),
cyclocomp_linter = cyclocomp_linter(complexity_limit = 20L),
object_usage_linter = NULL)
exclusions: c(list.files(path = "tests/", recursive = T, full.names = T))
exclude: "# nolint"
30 changes: 11 additions & 19 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: scoringutils
Title: Utilities for Scoring and Assessing Predictions
Version: 0.1.8
Version: 1.0.0
Language: en-GB
Authors@R: c(
person(given = "Nikos",
Expand All @@ -21,22 +21,9 @@ Authors@R: c(
role = c("ctb"),
email = "[email protected]",
comment = c(ORCID = "0000-0002-3777-1410")),
person("Joel", "Hellewell",
email = "[email protected]",
role = c("ctb"),
comment = c(ORCID = "0000-0003-2683-0849")),
person(given = "Sophie Meakins",
role = c("ctb"),
email = "[email protected]"),
person("James", "Munday",
email = "[email protected]",
role = c("ctb")),
person("Katharine", "Sherratt",
email = "[email protected]",
role = c("ctb")),
person("Sebastian", "Funk",
email = "[email protected]",
role = c("aut")))
role = c("ctb")))
Description:
Combines a collection of metrics and proper scoring rules
(Tilmann Gneiting & Adrian E Raftery (2007)
Expand All @@ -61,21 +48,26 @@ Encoding: UTF-8
LazyData: true
Imports:
data.table,
forcats,
ggdist (>= 3.1.0),
ggplot2,
goftest,
scoringRules,
stats,
methods
Suggests:
testthat,
kableExtra,
magrittr,
knitr,
rmarkdown,
vdiffr
RoxygenNote: 7.1.1
Config/Needs/website:
r-lib/pkgdown,
amirmasoudabdol/preferably
Config/testthat/edition: 3
RoxygenNote: 7.1.2
URL: https://github.com/epiforecasts/scoringutils, https://epiforecasts.io/scoringutils/
BugReports: https://github.com/epiforecasts/scoringutils/issues
VignetteBuilder: knitr
Depends:
R (>= 3.1)
R (>= 3.5)
Roxygen: list(markdown = TRUE)
65 changes: 34 additions & 31 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,48 @@

S3method(print,scoringutils_check)
export(abs_error)
export(add_coverage)
export(ae_median_quantile)
export(ae_median_sample)
export(avail_forecasts)
export(available_metrics)
export(bias)
export(bias_quantile)
export(bias_range)
export(bias_sample)
export(brier_score)
export(check_forecasts)
export(correlation_plot)
export(crps)
export(dss)
export(eval_forecasts)
export(interval_coverage)
export(correlation)
export(crps_sample)
export(dss_sample)
export(find_duplicates)
export(interval_score)
export(logs)
export(logs_binary)
export(logs_sample)
export(mad_sample)
export(merge_pred_and_obs)
export(mse)
export(pairwise_comparison)
export(pit)
export(pit_df)
export(pit_df_fast)
export(pit_sample)
export(plot_avail_forecasts)
export(plot_correlation)
export(plot_heatmap)
export(plot_interval_coverage)
export(plot_pairwise_comparison)
export(plot_pit)
export(plot_predictions)
export(quantile_bias)
export(quantile_coverage)
export(quantile_to_long)
export(quantile_to_range)
export(quantile_to_range_long)
export(quantile_to_wide)
export(range_long_to_quantile)
export(range_long_to_wide)
export(range_plot)
export(range_to_quantile)
export(range_wide_to_long)
export(plot_quantile_coverage)
export(plot_ranges)
export(plot_score_table)
export(plot_wis)
export(quantile_score)
export(sample_to_quantile)
export(sample_to_range)
export(sample_to_range_long)
export(score_heatmap)
export(score_table)
export(sharpness)
export(show_avail_forecasts)
export(wis_components)
export(score)
export(summarise_scores)
importFrom(data.table,"%like%")
importFrom(data.table,':=')
importFrom(data.table,.I)
importFrom(data.table,.N)
importFrom(data.table,`%like%`)
importFrom(data.table,`:=`)
importFrom(data.table,as.data.table)
importFrom(data.table,copy)
Expand All @@ -57,39 +54,45 @@ importFrom(data.table,melt)
importFrom(data.table,rbindlist)
importFrom(data.table,setDT)
importFrom(data.table,setnames)
importFrom(forcats,fct_relevel)
importFrom(forcats,fct_rev)
importFrom(ggdist,geom_lineribbon)
importFrom(ggplot2,aes)
importFrom(ggplot2,aes_string)
importFrom(ggplot2,coord_cartesian)
importFrom(ggplot2,coord_flip)
importFrom(ggplot2,element_blank)
importFrom(ggplot2,element_text)
importFrom(ggplot2,expand_limits)
importFrom(ggplot2,facet_grid)
importFrom(ggplot2,facet_wrap)
importFrom(ggplot2,geom_col)
importFrom(ggplot2,geom_histogram)
importFrom(ggplot2,geom_line)
importFrom(ggplot2,geom_linerange)
importFrom(ggplot2,geom_point)
importFrom(ggplot2,geom_polygon)
importFrom(ggplot2,geom_text)
importFrom(ggplot2,geom_tile)
importFrom(ggplot2,ggplot)
importFrom(ggplot2,guide_legend)
importFrom(ggplot2,guides)
importFrom(ggplot2,labs)
importFrom(ggplot2,scale_color_continuous)
importFrom(ggplot2,scale_colour_manual)
importFrom(ggplot2,scale_fill_gradient)
importFrom(ggplot2,scale_fill_gradient2)
importFrom(ggplot2,scale_fill_manual)
importFrom(ggplot2,scale_y_continuous)
importFrom(ggplot2,stat)
importFrom(ggplot2,theme)
importFrom(ggplot2,theme_light)
importFrom(ggplot2,unit)
importFrom(ggplot2,xlab)
importFrom(ggplot2,ylab)
importFrom(goftest,ad.test)
importFrom(methods,hasArg)
importFrom(scoringRules,crps_sample)
importFrom(scoringRules,dss_sample)
importFrom(scoringRules,logs_sample)
importFrom(stats,as.formula)
importFrom(stats,cor)
importFrom(stats,mad)
importFrom(stats,median)
Expand Down
Loading