%global __brp_check_rpaths %{nil} %global __requires_exclude ^libmpi %global packname exmort %global packver 0.1.1 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 0.1.1 Release: 1%{?dist}%{?buildtag} Summary: All-Cause and Excess Mortality Calculator License: GPL-3 URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel Requires: R-core BuildArch: noarch BuildRequires: R-CRAN-base64enc BuildRequires: R-CRAN-data.table BuildRequires: R-CRAN-dplyr BuildRequires: R-CRAN-DT BuildRequires: R-CRAN-forecast BuildRequires: R-CRAN-ggplot2 BuildRequires: R-CRAN-ggrepel BuildRequires: R-CRAN-htmltools BuildRequires: R-CRAN-ISOweek BuildRequires: R-CRAN-kableExtra BuildRequires: R-CRAN-knitr BuildRequires: R-CRAN-lubridate BuildRequires: R-CRAN-mgcv BuildRequires: R-CRAN-openxlsx BuildRequires: R-parallel BuildRequires: R-CRAN-plotly BuildRequires: R-CRAN-reactable BuildRequires: R-CRAN-readxl BuildRequires: R-CRAN-RColorBrewer BuildRequires: R-CRAN-reshape2 BuildRequires: R-CRAN-rmarkdown BuildRequires: R-CRAN-scales BuildRequires: R-CRAN-shiny BuildRequires: R-CRAN-shinyalert BuildRequires: R-CRAN-shinycssloaders BuildRequires: R-CRAN-shinyjs BuildRequires: R-CRAN-stringr BuildRequires: R-CRAN-tibble BuildRequires: R-CRAN-tidyr BuildRequires: R-CRAN-zoo Requires: R-CRAN-base64enc Requires: R-CRAN-data.table Requires: R-CRAN-dplyr Requires: R-CRAN-DT Requires: R-CRAN-forecast Requires: R-CRAN-ggplot2 Requires: R-CRAN-ggrepel Requires: R-CRAN-htmltools Requires: R-CRAN-ISOweek Requires: R-CRAN-kableExtra Requires: R-CRAN-knitr Requires: R-CRAN-lubridate Requires: R-CRAN-mgcv Requires: R-CRAN-openxlsx Requires: R-parallel Requires: R-CRAN-plotly Requires: R-CRAN-reactable Requires: R-CRAN-readxl Requires: R-CRAN-RColorBrewer Requires: R-CRAN-reshape2 Requires: R-CRAN-rmarkdown Requires: R-CRAN-scales Requires: R-CRAN-shiny Requires: R-CRAN-shinyalert Requires: R-CRAN-shinycssloaders Requires: R-CRAN-shinyjs Requires: R-CRAN-stringr Requires: R-CRAN-tibble Requires: R-CRAN-tidyr Requires: R-CRAN-zoo %description An interactive 'shiny' application that estimates all-cause mortality and excess mortality from country-level weekly or monthly death counts. Users supply observed deaths and an event calendar (for example COVID-19 waves or typhoons); the app fits one or more statistical baseline models (historical average, negative binomial regression, quasi-Poisson regression, zero-inflated Poisson regression, ARIMA (autoregressive integrated moving average) and SARIMA (seasonal ARIMA) models, GAM (generalized additive model) splines, and the model of Karlinsky and Kobak (2021) ) using periods outside the supplied events, estimates expected deaths across the observed series, and reports excess deaths, P-scores (excess deaths as a percentage of expected deaths) and confidence limits with tables, plots and downloadable reports. Launch the application with run_app(). %prep %setup -q -c -n %{packname} # fix end of executable files find -type f -executable -exec grep -Iq . {} \; -exec sed -i -e '$a\' {} \; # prevent binary stripping [ -d %{packname}/src ] && find %{packname}/src -type f -exec \ sed -i 's@/usr/bin/strip@/usr/bin/true@g' {} \; || true [ -d %{packname}/src ] && find %{packname}/src/Make* -type f -exec \ sed -i 's@-g0@@g' {} \; || true # don't allow local prefix in executable scripts find -type f -executable -exec sed -Ei 's@#!( )*/usr/local/bin@#!/usr/bin@g' {} \; %build %install mkdir -p %{buildroot}%{rlibdir} %{_bindir}/R CMD INSTALL -l %{buildroot}%{rlibdir} %{packname} test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so) rm -f %{buildroot}%{rlibdir}/R.css # remove buildroot from installed files find %{buildroot}%{rlibdir} -type f -exec sed -i "s@%{buildroot}@@g" {} \; %files %{rlibdir}/%{packname}