income and entity information. Using the different asset and income information (ratios of assets to income), data can be allocated to all the industries in the different partner entities. Last updated: 7/26/2016. """ # Packages: from __future__ import unicode_literals import os.path import re import numpy as np import pandas as pd import xlrd from btax.util import get_paths, to_str globals().update(get_paths()) # Constants _AST_FILE_FCTR = 10**3 _SHAPE = (131,4) _CODE_RANGE = ['32', '33', '45', '49'] _PARENTS = {'32':'31','33':'31','45':'44','49':'48'} def load_partner_data(entity_dfs): """Reads in the partner data and creates new dataframes for each partner type and stores them in the soi dictionary :param entity_dfs: Contains all the soi data by entity type :type entity_dfs: dictionary :returns: The soi dictionary updated with the partner dataframe :rtype: dictionary
import sys from btax.soi_processing import pull_soi_data from btax import calc_final_outputs from btax import check_output from btax.util import (get_paths, read_from_egg, output_by_asset_to_json_table, output_by_industry_to_json_table, diff_two_tables, filter_user_params_for_econ) from btax import read_bea import btax.soi_processing as soi import btax.parameters as params from btax import format_output from btax import visuals from btax import visuals_plotly globals().update(get_paths()) TABLE_ORDER = [ 'base_output_by_asset', 'reform_output_by_asset', 'changed_output_by_asset', 'base_output_by_industry', 'reform_output_by_industry', 'changed_output_by_industry', ] ModelDiffs = namedtuple('ModelDiffs', TABLE_ORDER + ['row_grouping']) ASSET_PRE_CACHE_FILE = 'asset_data.pkl' def run_btax(test_run, baseline=False,