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

nice legend for graphs #24

Open
wants to merge 99 commits into
base: enhancement
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
f92d556
Merge pull request #11 from robjhyndman/enhancement
robjhyndman Apr 6, 2014
37c0f10
Fixed bug in plot.demogdata when object contains missing values
robjhyndman Apr 15, 2014
7797f1b
Merge branch 'master' of https://github.com/robjhyndman/demography
robjhyndman Apr 15, 2014
ba4e4a6
Fixed problem with models() when ets models are used
robjhyndman Apr 15, 2014
bcccaf5
Fixed problem in simulate() when there are missing values in residuals
robjhyndman Jun 23, 2014
d17ee0a
Better handling of weights in fdm()
robjhyndman Jun 23, 2014
a3bfb5a
Removed interpolation of missing values in plot.demogdata()
robjhyndman Jul 25, 2014
d4804c4
Improved handling of data with different labels in read.demogdata()
robjhyndman Jul 26, 2014
d059ca1
Added github address under BugReports in DESCRIPTION
robjhyndman Aug 11, 2014
9f14922
Allowed lca to handle data observed less frequently than annually
robjhyndman Sep 11, 2014
ad666ec
Create README.md
robjhyndman Sep 11, 2014
4ed8c2c
Further update to lca to allow data to be spaced at greater than one …
robjhyndman Sep 12, 2014
42bd7c6
Merge branch 'master' of https://github.com/robjhyndman/demography
robjhyndman Sep 12, 2014
6e6140e
Removed upper age of 100 from several functions
robjhyndman Aug 4, 2016
a4dbc9e
Added imports from stats, utils and graphics
robjhyndman Aug 4, 2016
1c6cd64
Reverted to max.age of 100 for lca() and bms() to prevent existing co…
robjhyndman Aug 4, 2016
5bee3f7
Prevented conflict between forecast.fdmpr and coherentfdm with "M" me…
robjhyndman Aug 4, 2016
ec963c4
Total lifeexpectancy for coherentfdm
robjhyndman Sep 15, 2016
d601a44
Added PI for total life expectancy with coherent model
robjhyndman Sep 27, 2016
f60ca0b
Updated readme with new github installation code
robjhyndman Sep 27, 2016
0b9af21
Update to HMD url
robjhyndman Dec 22, 2016
56f8496
Reverted to www.mortality.org
robjhyndman Jan 3, 2017
bde302a
Fixed CRAN import issues with forecast 8.0
mitchelloharawild Feb 13, 2017
1081ae0
Merge pull request #28 from mitchelloharawild/master
robjhyndman Feb 13, 2017
51abc2d
Updated median functions
robjhyndman Feb 14, 2017
0a71fae
Canonical URL
robjhyndman Feb 16, 2017
3e7349a
Merge
robjhyndman Feb 16, 2017
79b16a7
Sadly making ftsa a dependency again to prevent revdep issues
robjhyndman Feb 16, 2017
6d1ca0e
Updated changelog
robjhyndman Apr 24, 2017
624f5f2
Removed dependency on ftsa
robjhyndman Apr 24, 2017
6410973
Small fixes
robjhyndman Jul 14, 2017
4cfd9a8
Rewording of help page to fix brocken link
JensPiontkowski Jul 12, 2018
e2309a6
handle years with no data = NAs
JensPiontkowski Jul 12, 2018
0249988
Version bump
robjhyndman Jul 13, 2018
5b1e554
https for HMD
robjhyndman Jul 13, 2018
8b7bf63
Updated migration Rd
robjhyndman Jul 13, 2018
971aa59
Fixed readme formatting
robjhyndman Jul 16, 2018
c42e9fe
Merge pull request #37 from JensPiontkowski/master
robjhyndman Sep 17, 2018
2f69faf
fixed library/load_all error
FinYang Nov 11, 2018
d27e238
roxygened namespace
FinYang Nov 14, 2018
4c13867
roxygened demogdata.R demography.R
FinYang Nov 15, 2018
07c42b5
roxygened coherent.R
FinYang Nov 15, 2018
40b5813
roxygened fdm.R
FinYang Nov 15, 2018
6925099
roxygened fertility.R hmd.R
FinYang Nov 15, 2018
bc23b76
roxygened lca.R
FinYang Nov 15, 2018
1fbd711
roxygened lifetable.R
FinYang Nov 30, 2018
07bbb8e
roxygened simulate.R netmigration.R
FinYang Nov 30, 2018
b726d2e
Fixed issue with using devtools::load_all()
mitchelloharawild Dec 4, 2018
07e0f4a
Fixed lca for changes to forecast::rwf
mitchelloharawild Dec 4, 2018
6662fe3
Merge pull request #39 from mitchelloharawild/master
robjhyndman Dec 5, 2018
b8b71be
Added .Rbuildignore to repo
mitchelloharawild Jan 9, 2019
f4fde0f
Fixed URL
robjhyndman Jan 9, 2019
57947f5
Bumped forecast version requirement
mitchelloharawild Jan 9, 2019
4a55ec0
Merge pull request #40 from mitchelloharawild/master
robjhyndman Jan 9, 2019
edd2c24
roxygened monotonic.R smooth.R update.R
FinYang Mar 5, 2019
48a2eac
Fixed issue with using devtools::load_all() and still display version…
FinYang Mar 5, 2019
f3a38c6
Merge pull request #41 from FinYang/fin
robjhyndman Mar 5, 2019
646d807
lca compatibility issues with ftsa and rainbow
robjhyndman Apr 22, 2019
d269395
Name arguments
robjhyndman Apr 22, 2019
2c5ee87
Fixed bug in netmigration -- finding the intersecting years
robjhyndman Apr 22, 2019
eef4826
Retained dimnames when updating
robjhyndman Apr 22, 2019
2de8339
Version bump
robjhyndman Apr 22, 2019
843e8e4
Simplified .onAttach
robjhyndman Apr 22, 2019
f615b50
Fixed links to plot()
robjhyndman Jun 19, 2020
9a51537
Updated documentation
robjhyndman Jun 19, 2020
9ffa6fa
Suppress NA warnings when reading from HMD
robjhyndman Apr 9, 2021
ae46066
Added Rproj file
robjhyndman Apr 9, 2021
a139db7
Switching to former.mortality.org as a temporary patch on HMD changes
robjhyndman Jun 17, 2022
7fb0b06
Increment version number to 1.22.0.9000
robjhyndman Jun 17, 2022
44f4d6e
Updated changelog
robjhyndman Jun 17, 2022
20d707e
Added github check and updated licence to GPL3
robjhyndman Jan 14, 2023
434d5f2
Added pkgdown via github actions
robjhyndman Jan 14, 2023
c6f590c
Added pkgdown as URL and updated authors to pkgdown format
robjhyndman Jan 14, 2023
7d26eef
Fixed bugs
robjhyndman Jan 14, 2023
12db455
Fixed badges
robjhyndman Jan 14, 2023
90993ee
Changed class checks to use inherits
robjhyndman Jan 14, 2023
f697464
Now passing local checks
robjhyndman Jan 14, 2023
60e29c3
Converged change log to news file format
robjhyndman Jan 14, 2023
581108b
Added missing contributors
robjhyndman Jan 14, 2023
36daad8
Removed dates for package versions on CRAN
robjhyndman Jan 14, 2023
22fe1e5
Fixed malformed DESCRIPTION file
robjhyndman Jan 14, 2023
3e5d1c7
Now using HMDHFDPlus for downloading HMD data
robjhyndman Feb 3, 2023
6603f0a
Redocumented
robjhyndman Feb 3, 2023
306eae5
Updated news
robjhyndman Feb 3, 2023
d1ab6b7
Updated readme
robjhyndman Feb 3, 2023
6674bb0
Fixed urls
robjhyndman Feb 3, 2023
a903deb
Added links #20
robjhyndman Feb 3, 2023
ecb4cd1
Added as.data.frame.lifetable and as.data.frame.demogdata functions #23
robjhyndman Feb 3, 2023
ac3a07e
Updated news
robjhyndman Feb 3, 2023
44309eb
Added CRAN comments
robjhyndman Feb 6, 2023
52af9e6
Added Makefile
robjhyndman Feb 6, 2023
9ee74fd
Added cran-comments to Rbuildignore
robjhyndman Feb 7, 2023
d0c6bc4
Version set to dev
robjhyndman Feb 9, 2023
8cee70d
Increased HMDHFDplus min version
robjhyndman Jun 21, 2023
1d09593
pkgdown upgrade
robjhyndman Jul 17, 2023
3f45c28
pkgdown light navbar
robjhyndman Jul 18, 2023
8200edd
Fixed bug in forecast.fdm when pimethod = "nonparametric"
robjhyndman Dec 6, 2024
80e4d36
Ran styler across package
robjhyndman Dec 6, 2024
ccc91b4
Redocumented
robjhyndman Dec 6, 2024
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
11 changes: 11 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
^cran-comments\.md$
^.*\.Rproj$
^\.Rproj\.user$
^revdep$
^\.github$
^LICENSE\.md$
README.Rmd
rstudio
Makefile
^pkgdown$
_pkgdown.yml
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
49 changes: 49 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
48 changes: 48 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.Rproj.user
.Rhistory
.RData
.Rbuildignore
demography.Rproj
revdep
25 changes: 17 additions & 8 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
Package: demography
Version: 1.17
Title: Forecasting mortality, fertility, migration and population data
Version: 2.0.0.9000
Title: Forecasting Mortality, Fertility, Migration and Population Data
Description: Functions for demographic analysis including lifetable
calculations; Lee-Carter modelling; functional data analysis of
mortality rates, fertility rates, net migration numbers; and
stochastic population forecasting.
Depends: R (>= 2.15.2), forecast (>= 3.09), rainbow, ftsa, cobs
Imports: mgcv, strucchange, RCurl
Depends: R (>= 3.4), forecast (>= 8.5)
Imports: ftsa (>= 4.8), rainbow, cobs, mgcv, strucchange, HMDHFDplus (>= 2.0.3)
LazyData: yes
ByteCompile: TRUE
Author: Rob J Hyndman with contributions from Heather Booth, Leonie Tickle and John Maindonald.
Maintainer: Rob J Hyndman <[email protected]>
License: GPL (>= 2)
URL: http://robjhyndman.com/software/demography/
Authors@R: c(
person("Rob", "Hyndman", email = "[email protected]", role = c("aut", "cre", "cph"), comment = c(ORCID = "0000-0002-2140-5352")),
person("Heather", "Booth", role = "ctb", comment = c(ORCID = "0000-0002-8356-0534")),
person("Leonie", "Tickle", role = "ctb", comment = c(ORCID = "0000-0002-6612-2401")),
person("John", "Maindonald", role = "ctb"),
person("Simon", "Wood", role = "ctb"),
person("R Core Team", role = "ctb")
)
URL: https://pkg.robjhyndman.com/demography/, https://github.com/robjhyndman/demography
BugReports: https://github.com/robjhyndman/demography/issues
License: GPL (>= 3)
Encoding: UTF-8
RoxygenNote: 7.3.2
36 changes: 36 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Makefile for generating R packages.
# 2017 Rob J Hyndman
#
# Assumes Makefile is in top folder of package

PKG_NAME=$(shell grep -i ^package DESCRIPTION | cut -d : -d \ -f 2)

default: build

check:
Rscript -e "rcmdcheck::rcmdcheck()"

build:
-rm -f rstudio
-Rscript -e "devtools::build(args = c('--compact-vignettes=both'))"

install:
R CMD INSTALL .

clean:
-rm -f ../$(PKG_NAME)_*.tar.gz
-rm -r -f man/*.Rd
-rm -r -f NAMESPACE

docs:
Rscript -e "roxygen2::roxygenize()"

pkgdown:
Rscript -e "pkgdown::build_site()"

revdep:
Rscript -e "revdepcheck::revdep_check(num_workers=3)"

release:
-rm -f rstudio
-Rscript -e "devtools::submit_cran(args = c('--compact-vignettes=both'))"
154 changes: 100 additions & 54 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,54 +1,100 @@
export(bms, cm.spline, cm.splinefun, coherentfdm, combine.demogdata,
compare.demogdata, demogdata, extract.ages, extract.years, fdm,
fitted.fdm, fitted.lca, forecast.fdm, forecast.lca, forecast.fdmpr,
isfe, isfe.demogdata, lca, hmd.mx,hmd.e0,hmd.pop,
life.expectancy, lifetable, mean.demogdata,
median.demogdata, netmigration, plot.demogdata, plot.errorfdm,
plot.lifetable, read.demogdata,flife.expectancy,
residuals.fdm, residuals.lca, set.upperage,
smooth.demogdata, tfr, simulate.fmforecast, simulate.fmforecast2, pop.sim, e0, sex.ratio,models,
models.fmforecast,models.fmforecast2,update.fmforecast,update.fmforecast2)

S3method(fitted,fdm)
S3method(fitted,lca)
S3method(lines,lifetable)
S3method(lines,demogdata)
S3method(mean,demogdata)
S3method(median,demogdata)
S3method(plot,fmforecast)
S3method(plot,lca)
S3method(plot,lifetable)
S3method(plot,demogdata)
S3method(plot,errorfdm)
S3method(points,demogdata)
S3method(print,errorfdm)
S3method(print,fmforecast)
S3method(print,fdm)
S3method(print,lca)
S3method(print,lifetable)
S3method(print,demogdata)
S3method(residuals,fdm)
S3method(residuals,lca)
S3method(summary,fdm)
S3method(summary,lca)
S3method(forecast,fdm)
S3method(forecast,lca)
S3method(isfe,demogdata)
S3method(simulate,fmforecast)
S3method(simulate,fmforecast2)
S3method(summary,demogdata)
S3method(summary,fmforecast)
S3method(summary,fmforecast2)
S3method(summary,fdmpr)
S3method(models,fmforecast)
S3method(models,fmforecast2)
S3method(update,fmforecast)
S3method(update,fmforecast2)

import(forecast)
import(ftsa)
import(rainbow)
importFrom("stats", "simulate")
importFrom("stats", "update")
import(mgcv)
import(cobs)
# Generated by roxygen2: do not edit by hand

S3method(as.data.frame,demogdata)
S3method(as.data.frame,lifetable)
S3method(fitted,fdm)
S3method(fitted,lca)
S3method(forecast,fdm)
S3method(forecast,fdmpr)
S3method(forecast,lca)
S3method(isfe,demogdata)
S3method(lines,demogdata)
S3method(lines,lifetable)
S3method(mean,demogdata)
S3method(median,demogdata)
S3method(models,fmforecast)
S3method(models,fmforecast2)
S3method(plot,demogdata)
S3method(plot,errorfdm)
S3method(plot,fmforecast)
S3method(plot,lca)
S3method(plot,lifetable)
S3method(points,demogdata)
S3method(print,demogdata)
S3method(print,errorfdm)
S3method(print,fdm)
S3method(print,fmforecast)
S3method(print,lca)
S3method(print,lifetable)
S3method(residuals,fdm)
S3method(residuals,lca)
S3method(simulate,fmforecast)
S3method(simulate,fmforecast2)
S3method(summary,demogdata)
S3method(summary,fdm)
S3method(summary,fdmpr)
S3method(summary,fmforecast)
S3method(summary,fmforecast2)
S3method(summary,lca)
S3method(update,fmforecast)
S3method(update,fmforecast2)
export(bms)
export(cm.spline)
export(cm.splinefun)
export(coherentfdm)
export(combine.demogdata)
export(compare.demogdata)
export(demogdata)
export(e0)
export(extract.ages)
export(extract.years)
export(fdm)
export(flife.expectancy)
export(hmd.e0)
export(hmd.mx)
export(hmd.pop)
export(isfe)
export(lca)
export(life.expectancy)
export(lifetable)
export(models)
export(netmigration)
export(pop.sim)
export(read.demogdata)
export(set.upperage)
export(sex.ratio)
export(smooth.demogdata)
export(tfr)
import(cobs)
import(forecast)
import(ftsa)
import(mgcv)
import(rainbow)
importFrom(graphics,abline)
importFrom(graphics,lines)
importFrom(graphics,plot)
importFrom(stats,"tsp<-")
importFrom(stats,approx)
importFrom(stats,frequency)
importFrom(stats,glm)
importFrom(stats,lm)
importFrom(stats,loess)
importFrom(stats,median)
importFrom(stats,na.omit)
importFrom(stats,nlm)
importFrom(stats,poisson)
importFrom(stats,predict)
importFrom(stats,qnorm)
importFrom(stats,rbinom)
importFrom(stats,rpois)
importFrom(stats,simulate)
importFrom(stats,spline)
importFrom(stats,splinefun)
importFrom(stats,start)
importFrom(stats,time)
importFrom(stats,ts)
importFrom(stats,tsp)
importFrom(stats,uniroot)
importFrom(stats,update)
importFrom(stats,window)
importFrom(utils,read.table)
Loading
Loading