cross_section module#
cross_section.py#
Function to construct cross section of data for given year.
- Functions included in the file:
- cross_section
Cross-sectional data slicer, selects a single year of the data dictionary.
- cross_section.cross_section(data_in, dimensions, year, y, scenario, econometrics=None, lag=None, lag_sales=None)#
Construct cross section of data for given year.
- Parameters:
data_in (dictionary of numpy arrays) – Data to take the cross-section from
dimensions (dictionary of tuples) – Dictionary with the dimensions of all variables
year (int) – The index of the year
scenario (string) – The name of the scenario
econometrics (dataframe) – Optional argument, variable names for the econometrics
lag (int) – Optional argument, the lag to take the cross-section of
lag_sales (dictionary of dataframes) – Optional argument, target country and number of lags for the lagged sales specification.
- Returns:
data_out – Dictionary of numpy array for a single given year
- Return type:
dictionary of numpy arrays