{
 "metadata": {
  "source": "CT Office of Policy and Management — Municipal Fiscal Indicators, Uniform Chart of Accounts",
  "dataset_id": "e2qt-k238",
  "dataset_name": "Municipal Fiscal Indicators: Uniform Chart of Accounts, 2020-2023",
  "landing_page": "https://data.ct.gov/d/e2qt-k238",
  "source_url": "https://data.ct.gov/resource/e2qt-k238.json",
  "pulled": "2026-08-25",
  "dataset_last_updated": "2026-03-03",
  "recipe": "python Data/fetch_ct_ucoa.py (Python 3, standard library, no API key)",
  "row_count_source": 17632,
  "fiscal_year_note": "OPM year Y = the fiscal year ending June 30 of year Y. 2023 = FY 2022-23.",
  "basis_note": "Audited actual expenditures cross-walked to the state Uniform Chart of Accounts, split into salaries/wages, employee benefits, and all other costs. Same basis as ct_ucoa_town_indicators.json — actuals across funds, not the adopted budget.",
  "structure_note": "`function_totals` holds each town's function-level subtotal rows (the source's '<Function> Total' and 'Total Expenditures' rows), so figures are not double counted. `target_departments` holds every row the source publishes for Middlefield, including department detail.",
  "town_scope_note": "`function_totals` covers Middlefield and its hand-built peer groups only, to keep the browser download small. All 170 entities are in Data/ct_ucoa/mfi_ucoa_by_function_2020-2023.csv.",
  "gap_note": "The source omits some town-years entirely; those years are absent rather than zero. Missing for Middlefield: none.",
  "merge_note": "`function_totals` is not in this file. It is statewide and identical for every town, so it is published once at /data/ct_ucoa_function_totals.json and merged onto this payload at runtime by TownCharts.load(). `target_departments` below is this town's own department detail and appears nowhere else."
 },
 "target": "Middlefield",
 "years": [
  "2020",
  "2021",
  "2022",
  "2023"
 ],
 "fiscal_years": [
  "19-20",
  "20-21",
  "21-22",
  "22-23"
 ],
 "target_departments": {
  "2020": [
   {
    "function": "General Government Total",
    "department": "General Government Total",
    "wages": 587550,
    "benefits": 369617,
    "other": 834804,
    "total": 1791971
   },
   {
    "function": "General Government",
    "department": "General Government",
    "wages": 587550,
    "benefits": 369617,
    "other": 834804,
    "total": 1791971
   },
   {
    "function": "Public Safety Total",
    "department": "Public Safety Total",
    "wages": 39162,
    "benefits": 0,
    "other": 502280,
    "total": 541442
   },
   {
    "function": "Public Safety",
    "department": "Police",
    "wages": 0,
    "benefits": 0,
    "other": 308758,
    "total": 308758
   },
   {
    "function": "Public Safety",
    "department": "Fire",
    "wages": 12814,
    "benefits": 0,
    "other": 171748,
    "total": 184562
   },
   {
    "function": "Public Safety",
    "department": "Other Public Safety",
    "wages": 26348,
    "benefits": 0,
    "other": 21774,
    "total": 48122
   },
   {
    "function": "Public Works Total",
    "department": "Public Works Total",
    "wages": 270454,
    "benefits": 0,
    "other": 165231,
    "total": 435685
   },
   {
    "function": "Public Works",
    "department": "Highways/Streets",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Public Works",
    "department": "Waste Management",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Public Works",
    "department": "Sewer",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Public Works",
    "department": "Other Public Works",
    "wages": 270454,
    "benefits": 0,
    "other": 165231,
    "total": 435685
   },
   {
    "function": "Health and Welfare Total",
    "department": "Health and Welfare Total",
    "wages": 37722,
    "benefits": 0,
    "other": 32814,
    "total": 70536
   },
   {
    "function": "Health and Welfare",
    "department": "Public Health Admin",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Health and Welfare",
    "department": "Social Services",
    "wages": 37722,
    "benefits": 0,
    "other": 32814,
    "total": 70536
   },
   {
    "function": "Health and Welfare",
    "department": "Other Health & Welfare",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Culture and Recreation Total",
    "department": "Culture and Recreation Total",
    "wages": 71216,
    "benefits": 0,
    "other": 351841,
    "total": 423057
   },
   {
    "function": "Culture and Recreation",
    "department": "Libraries",
    "wages": 0,
    "benefits": 0,
    "other": 298940,
    "total": 298940
   },
   {
    "function": "Culture and Recreation",
    "department": "Recreation",
    "wages": 71216,
    "benefits": 0,
    "other": 52901,
    "total": 124117
   },
   {
    "function": "Culture and Recreation",
    "department": "Other Culture/Recreation",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Education Total",
    "department": "Education Total",
    "wages": 0,
    "benefits": 0,
    "other": 11612501,
    "total": 11612501
   },
   {
    "function": "Education",
    "department": "Board of Education",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Education",
    "department": "Regional School District",
    "wages": null,
    "benefits": null,
    "other": 11612501,
    "total": 11612501
   },
   {
    "function": "Debt Service Total",
    "department": "Debt Service Total",
    "wages": null,
    "benefits": null,
    "other": 486128,
    "total": 486128
   },
   {
    "function": "Debt Service",
    "department": "Debt Service",
    "wages": null,
    "benefits": null,
    "other": 486128,
    "total": 486128
   },
   {
    "function": "Capital Outlay Total",
    "department": "Capital Outlay Total",
    "wages": null,
    "benefits": null,
    "other": 0,
    "total": 0
   },
   {
    "function": "Capital Outlay",
    "department": "Capital Outlay",
    "wages": null,
    "benefits": null,
    "other": 0,
    "total": 0
   },
   {
    "function": "Other Total",
    "department": "Other Total",
    "wages": 0,
    "benefits": 0,
    "other": 21199,
    "total": 21199
   },
   {
    "function": "Other",
    "department": "Other",
    "wages": 0,
    "benefits": 0,
    "other": 21199,
    "total": 21199
   },
   {
    "function": "Total Expenditures",
    "department": "Total Expenditures",
    "wages": 1006104,
    "benefits": 369617,
    "other": 14006798,
    "total": 15382519
   }
  ],
  "2021": [
   {
    "function": "General Government Total",
    "department": "General Government Total",
    "wages": 0,
    "benefits": 0,
    "other": 1807422,
    "total": 1807422
   },
   {
    "function": "General Government",
    "department": "General Government",
    "wages": 0,
    "benefits": 0,
    "other": 1807422,
    "total": 1807422
   },
   {
    "function": "Public Safety Total",
    "department": "Public Safety Total",
    "wages": 0,
    "benefits": 0,
    "other": 538429,
    "total": 538429
   },
   {
    "function": "Public Safety",
    "department": "Police",
    "wages": 0,
    "benefits": 0,
    "other": 290093,
    "total": 290093
   },
   {
    "function": "Public Safety",
    "department": "Fire",
    "wages": 0,
    "benefits": 0,
    "other": 199734,
    "total": 199734
   },
   {
    "function": "Public Safety",
    "department": "Other Public Safety",
    "wages": 0,
    "benefits": 0,
    "other": 48602,
    "total": 48602
   },
   {
    "function": "Public Works Total",
    "department": "Public Works Total",
    "wages": 0,
    "benefits": 0,
    "other": 475531,
    "total": 475531
   },
   {
    "function": "Public Works",
    "department": "Highways/Streets",
    "wages": 0,
    "benefits": 0,
    "other": 78078,
    "total": 78078
   },
   {
    "function": "Public Works",
    "department": "Waste Management",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Public Works",
    "department": "Sewer",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Public Works",
    "department": "Other Public Works",
    "wages": 0,
    "benefits": 0,
    "other": 397453,
    "total": 397453
   },
   {
    "function": "Health and Welfare Total",
    "department": "Health and Welfare Total",
    "wages": 0,
    "benefits": 0,
    "other": 67057,
    "total": 67057
   },
   {
    "function": "Health and Welfare",
    "department": "Public Health Admin",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Health and Welfare",
    "department": "Social Services",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Health and Welfare",
    "department": "Other Health & Welfare",
    "wages": 0,
    "benefits": 0,
    "other": 67057,
    "total": 67057
   },
   {
    "function": "Culture and Recreation Total",
    "department": "Culture and Recreation Total",
    "wages": 0,
    "benefits": 0,
    "other": 400388,
    "total": 400388
   },
   {
    "function": "Culture and Recreation",
    "department": "Libraries",
    "wages": 0,
    "benefits": 0,
    "other": 310531,
    "total": 310531
   },
   {
    "function": "Culture and Recreation",
    "department": "Recreation",
    "wages": 0,
    "benefits": 0,
    "other": 89857,
    "total": 89857
   },
   {
    "function": "Culture and Recreation",
    "department": "Other Culture/Recreation",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Education Total",
    "department": "Education Total",
    "wages": 0,
    "benefits": 0,
    "other": 11674784,
    "total": 11674784
   },
   {
    "function": "Education",
    "department": "Board of Education",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Education",
    "department": "Regional School District",
    "wages": null,
    "benefits": null,
    "other": 11674784,
    "total": 11674784
   },
   {
    "function": "Debt Service Total",
    "department": "Debt Service Total",
    "wages": null,
    "benefits": null,
    "other": 413368,
    "total": 413368
   },
   {
    "function": "Debt Service",
    "department": "Debt Service",
    "wages": null,
    "benefits": null,
    "other": 413368,
    "total": 413368
   },
   {
    "function": "Capital Outlay Total",
    "department": "Capital Outlay Total",
    "wages": null,
    "benefits": null,
    "other": 0,
    "total": 0
   },
   {
    "function": "Capital Outlay",
    "department": "Capital Outlay",
    "wages": null,
    "benefits": null,
    "other": 0,
    "total": 0
   },
   {
    "function": "Other Total",
    "department": "Other Total",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Other",
    "department": "Other",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Total Expenditures",
    "department": "Total Expenditures",
    "wages": 0,
    "benefits": 0,
    "other": 15376979,
    "total": 15376979
   }
  ],
  "2022": [
   {
    "function": "General Government Total",
    "department": "General Government Total",
    "wages": 0,
    "benefits": 0,
    "other": 2272067,
    "total": 2272067
   },
   {
    "function": "General Government",
    "department": "General Government",
    "wages": 0,
    "benefits": 0,
    "other": 2272067,
    "total": 2272067
   },
   {
    "function": "Public Safety Total",
    "department": "Public Safety Total",
    "wages": 0,
    "benefits": 0,
    "other": 565675,
    "total": 565675
   },
   {
    "function": "Public Safety",
    "department": "Police",
    "wages": 0,
    "benefits": 0,
    "other": 319495,
    "total": 319495
   },
   {
    "function": "Public Safety",
    "department": "Fire",
    "wages": 0,
    "benefits": 0,
    "other": 191874,
    "total": 191874
   },
   {
    "function": "Public Safety",
    "department": "Other Public Safety",
    "wages": 0,
    "benefits": 0,
    "other": 54306,
    "total": 54306
   },
   {
    "function": "Public Works Total",
    "department": "Public Works Total",
    "wages": 0,
    "benefits": 0,
    "other": 510542,
    "total": 510542
   },
   {
    "function": "Public Works",
    "department": "Highways/Streets",
    "wages": 0,
    "benefits": 0,
    "other": 510542,
    "total": 510542
   },
   {
    "function": "Public Works",
    "department": "Waste Management",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Public Works",
    "department": "Sewer",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Public Works",
    "department": "Other Public Works",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Health and Welfare Total",
    "department": "Health and Welfare Total",
    "wages": 0,
    "benefits": 0,
    "other": 72442,
    "total": 72442
   },
   {
    "function": "Health and Welfare",
    "department": "Public Health Admin",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Health and Welfare",
    "department": "Social Services",
    "wages": 0,
    "benefits": 0,
    "other": 72442,
    "total": 72442
   },
   {
    "function": "Health and Welfare",
    "department": "Other Health & Welfare",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Culture and Recreation Total",
    "department": "Culture and Recreation Total",
    "wages": 0,
    "benefits": 0,
    "other": 132094,
    "total": 132094
   },
   {
    "function": "Culture and Recreation",
    "department": "Libraries",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Culture and Recreation",
    "department": "Recreation",
    "wages": 0,
    "benefits": 0,
    "other": 132094,
    "total": 132094
   },
   {
    "function": "Culture and Recreation",
    "department": "Other Culture/Recreation",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Education Total",
    "department": "Education Total",
    "wages": 0,
    "benefits": 0,
    "other": 11797537,
    "total": 11797537
   },
   {
    "function": "Education",
    "department": "Board of Education",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Education",
    "department": "Regional School District",
    "wages": 0,
    "benefits": 0,
    "other": 11797537,
    "total": 11797537
   },
   {
    "function": "Debt Service Total",
    "department": "Debt Service Total",
    "wages": 0,
    "benefits": 0,
    "other": 126867,
    "total": 126867
   },
   {
    "function": "Debt Service",
    "department": "Debt Service",
    "wages": 0,
    "benefits": 0,
    "other": 126867,
    "total": 126867
   },
   {
    "function": "Capital Outlay Total",
    "department": "Capital Outlay Total",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Capital Outlay",
    "department": "Capital Outlay",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Other Total",
    "department": "Other Total",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Other",
    "department": "Other",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Total Expenditures",
    "department": "Total Expenditures",
    "wages": 0,
    "benefits": 0,
    "other": 15477224,
    "total": 15477224
   }
  ],
  "2023": [
   {
    "function": "General Government Total",
    "department": "General Government Total",
    "wages": 0,
    "benefits": 0,
    "other": 2021378,
    "total": 2021378
   },
   {
    "function": "General Government",
    "department": "General Government",
    "wages": 0,
    "benefits": 0,
    "other": 2021378,
    "total": 2021378
   },
   {
    "function": "Public Safety Total",
    "department": "Public Safety Total",
    "wages": 0,
    "benefits": 0,
    "other": 535475,
    "total": 535475
   },
   {
    "function": "Public Safety",
    "department": "Police",
    "wages": 0,
    "benefits": 0,
    "other": 303209,
    "total": 303209
   },
   {
    "function": "Public Safety",
    "department": "Fire",
    "wages": 0,
    "benefits": 0,
    "other": 190876,
    "total": 190876
   },
   {
    "function": "Public Safety",
    "department": "Other Public Safety",
    "wages": 0,
    "benefits": 0,
    "other": 41390,
    "total": 41390
   },
   {
    "function": "Public Works Total",
    "department": "Public Works Total",
    "wages": 0,
    "benefits": 0,
    "other": 512565,
    "total": 512565
   },
   {
    "function": "Public Works",
    "department": "Highways/Streets",
    "wages": 0,
    "benefits": 0,
    "other": 79932,
    "total": 79932
   },
   {
    "function": "Public Works",
    "department": "Waste Management",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Public Works",
    "department": "Sewer",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Public Works",
    "department": "Other Public Works",
    "wages": 0,
    "benefits": 0,
    "other": 432633,
    "total": 432633
   },
   {
    "function": "Health and Welfare Total",
    "department": "Health and Welfare Total",
    "wages": 0,
    "benefits": 0,
    "other": 63918,
    "total": 63918
   },
   {
    "function": "Health and Welfare",
    "department": "Public Health Admin",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Health and Welfare",
    "department": "Social Services",
    "wages": 0,
    "benefits": 0,
    "other": 63918,
    "total": 63918
   },
   {
    "function": "Health and Welfare",
    "department": "Other Health & Welfare",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Culture and Recreation Total",
    "department": "Culture and Recreation Total",
    "wages": 0,
    "benefits": 0,
    "other": 464855,
    "total": 464855
   },
   {
    "function": "Culture and Recreation",
    "department": "Libraries",
    "wages": 0,
    "benefits": 0,
    "other": 310531,
    "total": 310531
   },
   {
    "function": "Culture and Recreation",
    "department": "Recreation",
    "wages": 0,
    "benefits": 0,
    "other": 154324,
    "total": 154324
   },
   {
    "function": "Culture and Recreation",
    "department": "Other Culture/Recreation",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Education Total",
    "department": "Education Total",
    "wages": 0,
    "benefits": 0,
    "other": 12934536,
    "total": 12934536
   },
   {
    "function": "Education",
    "department": "Board of Education",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Education",
    "department": "Regional School District",
    "wages": 0,
    "benefits": 0,
    "other": 12934536,
    "total": 12934536
   },
   {
    "function": "Debt Service Total",
    "department": "Debt Service Total",
    "wages": 0,
    "benefits": 0,
    "other": 50736,
    "total": 50736
   },
   {
    "function": "Debt Service",
    "department": "Debt Service",
    "wages": 0,
    "benefits": 0,
    "other": 50736,
    "total": 50736
   },
   {
    "function": "Capital Outlay Total",
    "department": "Capital Outlay Total",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Capital Outlay",
    "department": "Capital Outlay",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Other Total",
    "department": "Other Total",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Other",
    "department": "Other",
    "wages": 0,
    "benefits": 0,
    "other": 0,
    "total": 0
   },
   {
    "function": "Total Expenditures",
    "department": "Total Expenditures",
    "wages": 0,
    "benefits": 0,
    "other": 16583463,
    "total": 16583463
   }
  ]
 }
}