knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) library(dplyr) library(implan)
The implan package includes some data and functions to help update category-sector crosswalks between implan sectoring schemes (e.g., version 536 to 546). Note that the included function provides a direct crosswalk update and doesn't do any respecification (for example if the market basket of goods changes).
The master sectoring schemes (category to sector) are stored on Office 365: Implan > Sectoring Schemes.
The 536to546 crosswalk file has been included in this package. I did some pre-processing to get the crosswalk data into a more useful format (code here).
library(dplyr) library(implan) data("sector536_to_sector546") glimpse(sector536_to_sector546)
Note that the CewAvgRatio
variable from the raw data was renamed to crosswalk_ratio
. This variable was used for the small number of cases when 536 sectors were expanded to multiple sectors in the 546 scheme.
check_share_sums(sector536_to_sector546, crosswalk_ratio, group, sector536)
We need the 536 sectoring scheme for the update, an example of which has been included in this package:
data("category_to_sector536") glimpse(category_to_sector536)
The sector_update()
function converts from one sectoring scheme to the next.
data("sectors546") category_to_sector546 <- sector_update( scheme_old = category_to_sector536, crosswalk = sector536_to_sector546, description_new = sectors546 ) glimpse(category_to_sector546)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.