{ "info": {
    "name": "Tax Year 2007 County Income Data",
    "description": "Contains selected individual income tax return data items classified by state and county.",
    "url": "https://explore.data.gov/Population/Tax-Year-2007-County-Income-Data/wvps-imhx"
  },
  "concepts": {
    "state": {
      "name": "State Abbreviation",
      "type": "string",
      "table": "states",
      "properties": {
        "name": {
          "name": "Name",
          "description": "The name of the state",
          "type": "string"
        }
      }        
    },
    "county": {
      "name": "County"
    },
    "tax_returns": {
      "name": "Total Number of Tax Returns"
    },
    "adjusted_gross_income": {
      "name": "Adjusted Gross Income (In Thousands)"
    },
    "wages_and_salaries_income": {
      "name": "Wages and Salaries (In Thousands)"
    },
    "dividend_income": {
      "name": "Dividend Income (In Thousands)"
    },
    "interest_income": {
      "name": "Interest Income (In Thousands)"
    }
  },
  "slices": {
    "incomes": {
      "type": "table",
      "table": "incomes",
      "dimensions": [
        "state", "county"
      ],
      "metrics": [
        "tax_returns",
        "adjusted_gross_income",
        "wages_and_salaries_income",
        "dividend_income",
        "interest_income"
      ],
      "references": {
        "state_name": {
          "column": "state",
          "concept": "state",
          "value": "name"
        }
      }
    },
    "incomes_by_state": {
      "type": "derived",
      "slice": "incomes",
      "dimensions": [
        "state"
      ],
      "metrics": [
        "tax_returns",
        "adjusted_gross_income",
        "wages_and_salaries_income",
        "dividend_income",
        "interest_income"
      ],
      "aggregations": {
        "tax_returns": ["sum", "tax_returns"],
        "adjusted_gross_income": ["sum", "adjusted_gross_income"],
        "wages_and_salaries_income": ["sum", "wages_and_salaries_income"],
        "dividend_income": ["sum", "dividend_income"],
        "interest_income": ["sum", "interest_income"]
      }
    }
  },  
  "tables": {
    "states": {
      "sources": [
        "states.csv"
      ],
      "columns": {
        "state": {
          "name": "_id",
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    },      
    "incomes": {
      "sources": [
        "county_incomes.csv"
      ],
      "columns": {
        "state_code": {
          "type": "integer"
        },
        "county_code": {
          "type": "integer"
        },
        "state": {
          "type": "string"
        },
        "county": {
          "type": "string"
        },
        "tax_returns": {
          "type": "integer"
        },
        "exemptions": {
          "type": "integer"
        },
        "adjusted_gross_income": {
          "type": "integer"
        },
        "wages_and_salaries_income": {
          "type": "integer"
        },
        "dividend_income": {
          "type": "integer"
        },
        "interest_income": {
          "type": "integer"
        }
      }
    }
  }
}
