Parameters

Define your default parameters and let ParamTools handle the rest.

The ParamTools JSON file is split into two components: a component that defines the structure of your default inputs and a component that defines the variables that are used in your model. The first component is a top level member named schema. The second component consists of key-value pairs where the key is the parameter's name and the value is its data.

{
    "schema": {
        "labels": {
            "year": {
                "type": "int",
                "validators": {"range": {"min": 2013, "max": 2027}}
            },
            "marital_status": {
                "type": "str",
                "validators": {"choice": {"choices": ["single", "joint", "separate",
                                                     "headhousehold", "widow"]}}
            },
        },
        "additional_members": {
            "cpi_inflatable": {"type": "bool"},
            "cpi_inflated": {"type": "bool"}
        },
        "actions": {
            "array_first": true,
            "label_to_extend": "year",
            "uses_extend_func": true
        }
    },
    "personal_exemption": {
        "title": "Personal Exemption",
        "description": "A simple version of the personal exemption.",
        "cpi_inflatable": true,
        "cpi_inflated": true,
        "type": "float",
        "value": 0,
        "validators": {
            "range": {
                "min": 0,
            }
        }
    },
    "standard_deduction": {
        "title": "Standard deduction amount",
        "description": "Amount filing unit can use as a standard deduction.",
        "cpi_inflatable": true,
        "cpi_inflated": true,
        "type": "float",
        "value": [
            {"year": 2024, "marital_status": "single", "value": 13673.68},
            {"year": 2024, "marital_status": "joint", "value": 27347.36},
            {"year": 2024, "marital_status": "separate", "value": 13673.68},
            {"year": 2024, "marital_status": "headhousehold", "value": 20510.52},
            {"year": 2024, "marital_status": "widow", "value": 27347.36},
            {"year": 2025, "marital_status": "single", "value": 13967.66},
            {"year": 2025, "marital_status": "joint", "value": 27935.33},
            {"year": 2025, "marital_status": "separate", "value": 13967.66},
            {"year": 2025, "marital_status": "headhousehold", "value": 20951.49},
            {"year": 2025, "marital_status": "widow", "value": 27935.33}],
        "validators": {
            "range": {
                "min": 0,
                "max": 9e+99
            }
        }
    },
}

Parameters Schema

{
    "schema": {
        "labels": {
            "year": {
                "type": "int",
                "validators": {"range": {"min": 2013, "max": 2027}}
            }
        },
        "additional_members": {
            "cpi_inflatable": {"type": "bool"},
            "cpi_inflated": {"type": "bool"}
        }
    },
    "actions": {
        "array_first": true,
        "label_to_extend": true,
        "uses_extend_func": true
    }
}

Default Parameters

{
    "standard_deduction": {
        "title": "Standard deduction amount",
        "description": "Amount filing unit can use as a standard deduction.",
        "cpi_inflatable": true,
        "cpi_inflated": true,
        "type": "float",
        "number_dims": 0,
        "value": [
            {"year": 2024, "marital_status": "single", "value": 13673.68},
            {"year": 2024, "marital_status": "joint", "value": 27347.36},
            {"year": 2024, "marital_status": "separate", "value": 13673.68},
            {"year": 2024, "marital_status": "headhousehold", "value": 20510.52},
            {"year": 2024, "marital_status": "widow", "value": 27347.36},
            {"year": 2025, "marital_status": "single", "value": 13967.66},
            {"year": 2025, "marital_status": "joint", "value": 27935.33},
            {"year": 2025, "marital_status": "separate", "value": 13967.66},
            {"year": 2025, "marital_status": "headhousehold", "value": 20951.49},
            {"year": 2025, "marital_status": "widow", "value": 27935.33}],
        "validators": {
            "range": {
                "min": 0,
                "max": 9e+99
            }
        }
    }
}

Members:

{
    "validators": {
        "range": {"min": "min value", "max": "max value"},
        "choice": {"choices": ["list", "of", "allowed", "values"]},
        "date_range": {"min": "2018-01-01", "max": "2018-06-01"}
    }
}