def source_scaling_remap(row, scaling_factor_lookup, existing_stat_var_lookup):
    ' Scales values by sourceScalingFactor and inputs exisiting stat vars.\n\n        First, this function converts all values to per capita. Some measures\n        in the World Bank dataset are per thousand or per hundred thousand, but\n        we need to scale these to the common denomination format. Secondly,\n        some statistical variables such as Count_Person_InLaborForce are not\n        World Bank specific and need to be replaced. Both of these are imputted\n        from the following two lists in args.\n\n    Args:\n        scaling_factor_lookup: A dictionary of a mapping between World Bank\n            indicator code to the respective numeric scaling factor.\n        existing_stat_var_lookup: A dictionary of a mapping between all\n            indicator to be replaced with the exisiting stat var to replace it.\n    '
    indicator_code = row['IndicatorCode']
    if (indicator_code in scaling_factor_lookup):
        row['Value'] = (row['Value'] / int(scaling_factor_lookup[indicator_code]))
    if (indicator_code in existing_stat_var_lookup):
        row['StatisticalVariable'] = ('dcid:' + existing_stat_var_lookup[indicator_code])
    return row
Scales values by sourceScalingFactor and inputs exisiting stat vars.

    First, this function converts all values to per capita. Some measures
    in the World Bank dataset are per thousand or per hundred thousand, but
    we need to scale these to the common denomination format. Secondly,
    some statistical variables such as Count_Person_InLaborForce are not
    World Bank specific and need to be replaced. Both of these are imputted
    from the following two lists in args.

Args:
    scaling_factor_lookup: A dictionary of a mapping between World Bank
        indicator code to the respective numeric scaling factor.
    existing_stat_var_lookup: A dictionary of a mapping between all
        indicator to be replaced with the exisiting stat var to replace it.
def source_scaling_remap(row, scaling_factor_lookup, existing_stat_var_lookup):
    ' Scales values by sourceScalingFactor and inputs exisiting stat vars.\n\n        First, this function converts all values to per capita. Some measures\n        in the World Bank dataset are per thousand or per hundred thousand, but\n        we need to scale these to the common denomination format. Secondly,\n        some statistical variables such as Count_Person_InLaborForce are not\n        World Bank specific and need to be replaced. Both of these are imputted\n        from the following two lists in args.\n\n    Args:\n        scaling_factor_lookup: A dictionary of a mapping between World Bank\n            indicator code to the respective numeric scaling factor.\n        existing_stat_var_lookup: A dictionary of a mapping between all\n            indicator to be replaced with the exisiting stat var to replace it.\n    '
    indicator_code = row['IndicatorCode']
    if (indicator_code in scaling_factor_lookup):
        row['Value'] = (row['Value'] / int(scaling_factor_lookup[indicator_code]))
    if (indicator_code in existing_stat_var_lookup):
        row['StatisticalVariable'] = ('dcid:' + existing_stat_var_lookup[indicator_code])
    return row