def load_proprietorship(soi_tree, from_out=False, get_all=False, get_nonfarm=False, get_farm=False, output_data=False, out_path=None): """ Loading the proprietorship tax soi data into a NAICS Tree. :param soi_tree: The NAICS tree to put all of the data in. :param from_out: If the corporate soi data is already in an output file, then it can be read in directly from the output. :param output_data: Print the corporate dataframes to csv files in the output folder. :param out_path: The output_path, both for reading in output data and for printing to the output file """ # Initializing the output path: if out_path == None: out_path = _OUT_DIR # Load the soi nonfarm data into the NAICS tree: if get_nonfarm: soi_tree = prop.load_soi_nonfarm_prop( data_tree=soi_tree, from_out=from_out ) # Load the farm data into to the NAICS tree: if get_farm: soi_tree = prop.load_soi_farm_prop( data_tree=soi_tree, from_out=from_out ) # Output the data to csv files in the output folder: if output_data: naics.print_tree_dfs(tree=soi_tree, out_path=out_path, data_types=[_NFARM_DF_NM, _FARM_DF_NM]) return soi_tree
def load_proprietorship(soi_tree=naics.generate_tree(), from_out=False, get_all=False, get_nonfarm=False, get_farm=False, output_data=False, out_path=None): """ Loading the proprietorship tax soi data into a NAICS Tree. :param soi_tree: The NAICS tree to put all of the data in. :param from_out: If the corporate soi data is already in an output file, then it can be read in directly from the output. :param output_data: Print the corporate dataframes to csv files in the output folder. :param out_path: The output_path, both for reading in output data and for printing to the output file """ # Initializing the output path: if out_path == None: out_path = _OUT_DIR # Load the soi nonfarm data into the NAICS tree: if get_nonfarm: soi_tree = prop.load_soi_nonfarm_prop(data_tree=soi_tree, from_out=from_out) # Load the farm data into to the NAICS tree: if get_farm: soi_tree = prop.load_soi_farm_prop(data_tree=soi_tree, from_out=from_out) # Output the data to csv files in the output folder: if output_data: naics.print_tree_dfs(tree=soi_tree, out_path=out_path, data_types=[_NFARM_DF_NM, _FARM_DF_NM]) return soi_tree
def load_proprietorship(soi_tree=naics.generate_tree(), from_out=False, get_all=False, get_nonfarm=False, get_farm=False, output_data=False, out_path=_OUT_DIR): # Get the nonfar if get_nonfarm: soi_tree = prop.load_soi_nonfarm_prop() if output_data: naics.print_tree_dfs(tree=soi_tree, out_path=out_path, data_types=[]) if get_farm: soi_tree = prop.load_soi_farm_prop(data_tree=soi_tree,)