Two-step conversion: Belfiore code → ISTAT PRO_COM_T → CPI. This function is designed for employment data that uses Belfiore codes (e.g., COMUNE_LAVORATORE field in CO data).
Value
The input data.table with added columns:
pro_com_t: ISTAT code (intermediate result)
cpi_code: CPI identifier code
cpi_name: CPI area name (if add_name = TRUE)
The data.table is modified by reference for efficiency.
Details
This function performs two sequential joins:
Join Belfiore codes to ISTAT PRO_COM_T codes
Join ISTAT codes to CPI codes
Examples
if (FALSE) { # \dontrun{
# Add CPI to employment data with Belfiore codes
dt <- data.table::data.table(COMUNE_LAVORATORE = c("F205", "B292", "D869"))
dt <- add_cpi_via_belfiore(dt)
print(dt)
} # }