library(cleanETHPOP)
library(dplyr)
library(tidyr)
library(readr)
library(reshape2)

Clean birth data

clean_births()

Clean death data

clean_deaths()

Clean population data

clean_pop()

Clean in-migration data

There are 2 different scenario available:

where_data_Leeds1 <- system.file("extdata", "Leeds1", "InMigrants", package = "cleanETHPOP")
where_data_Leeds2 <- system.file("extdata", "Leeds2", "InMigrants", package = "cleanETHPOP")

clean_inmigrants(dir_path = where_data_Leeds1, save_name = "clean_inmigrants_Leeds1")
clean_inmigrants(dir_path = where_data_Leeds2, save_name = "clean_inmigrants_Leeds2")

Clean out-migration data

where_data_Leeds1 <- system.file("extdata", "Leeds1", "OutMigrants", package = "cleanETHPOP")
where_data_Leeds2 <- system.file("extdata", "Leeds2", "OutMigrants", package = "cleanETHPOP")

clean_outmigrants(dir_path = where_data_Leeds1, save_name = "clean_outmigrants_Leeds1")
clean_outmigrants(dir_path = where_data_Leeds2, save_name = "clean_outmigrants_Leeds2")

Create out-migration per capital data

outmigrants_per_capita()