Skip to content

statistik-aargau/propop

Repository files navigation

Welcome to the propop package

Lifecycle: stable Project Status: Active - The project has reached a stable, usable state and is being actively developed. R build status

Overview

The goal of propop is to create population projections using the cohort component method (see e.g., Preston, Guillot, and Heuveline, 2000; Statistik Aargau, 2020a; Statistik Aargau, 2020b).

The package was developed for use with population data and projection scenarios from the Swiss Federal Statistical Office (FSO). But you can also use your own input data.

propop uses the same matrix calculation method as the FSO (2020; only available in French) and therefore reveals almost identical results (see vignette Evaluate projections). The package can be used to project the development of different demographic groups for different scenarios and at different spatial levels (e.g., single canton or municipalities within a canton).

Although the package was developed for use in Switzerland, it should in principle also work for other contexts, provided the required input data is available in the specified form.

Installation

To install the current github version of the package, make sure you have devtools installed and type:

devtools::install_github("statistik-aargau/propop")

Vignettes

The package includes four vignettes.

Features, limitations, future plans

  • Currently, propop::propop() only works with 1-year age classes (0-100+) and two genders.
  • propop::propop() works with either two nationalities (usually Swiss vs. non-Swiss nationals) or without distinguishing between nationalities.
  • The FSO uses additional ex-post adjustments to ensure that all the sums involving different cantons add up, which leads to some differences between the projections from the FSO and propop. Moreover, the FSO projections are only published in five-year intervals, the most recent ones being based on population records from 2018. propop enables you to run projections with more recent population records.
  • This package was developed for use with FSO parameters. Most parameters are only available for cantons and the whole of Switzerland. If you wish to run projections at smaller scales (e.g., districts), you need to prepare the parameters for each spatial entity before running the projection. This vignette includes tips of how to prepare your input data.
  • Similarly, if you wish to adjust parameters (e.g., mortality rates that vary between regions) you need to prepare the parameters accordingly.
  • propop::propop()offers the possibility to account for varying subregional migration patterns and migration between subregions. However, before using this feature, users must adjust or calculate the required parameters (see this vignette).
  • Custom parameters (e.g., consideration of sub-cantonal spatial entities, adjustments to reflect regional differences, or addition of subregional migration parameter) can be passed through the parameters object to propop::propop().
  • There are also possible future features that could increase the accuracy of the projections. For example, considering the attractiveness of municipalities or planned housing developments could help to better explain why population growth varies between municipalities.

If you are interested in contributing to these or other developments, please get in touch with the package maintainer.

Quick example

To run propop::propop() with the example data included in the package (canton of Aargau) for the period 2019-2030, use the following code:

library(propop)
projection_canton_2030 <- propop(
  parameters = fso_parameters,
  year_first = 2019,
  year_last = 2030,
  population = fso_population,
  subregional = FALSE,
  binational = TRUE)