Closed bstabler closed 6 years ago
We need a cleaner way to specify this.
# Create sample output for firm synthesis
CREATE_SAMPLE <- FALSE
SAMPLE_SIZE <- 10L
if(CREATE_SAMPLE){
set.seed(151)
est_index <- cbp.establishments[,.I[sample(.N, min(SAMPLE_SIZE, .N))],.(naics, esizecat)]$V1
est <- cbp.establishments[est_index]
fwrite(est, file = "../national_freight/data/firms_test.csv")
}
Let's use the same idea (interface) as we do for the global DEBUG setting. @goreaditya please update the script and test running it all the way through to address issue #27 as well.
DEBUG = TRUE #run only the first industry + all employee size categories
NFM_Firmsynthesis_Allocate_Est_Firms.R needs to output the national_freight/data/firms_test.csv format