Comparing Parliamentary Office Expenses with a Stacked Bar Chart

By Annabella Tyrrell · Published 30 November 2026
graphicsstata

Between April–June and July–September 2026, reported expenditure for the Prime Minister’s office fell by about $46,000, while office administration costs more than doubled. We can use Stata to combine four quarterly expenses files and create a stacked bar chart showing which categories contributed to the change.

Download the quarterly expenses files

The Independent Parliamentary Expenses Authority (IPEA) publishes a separate dataset for each calendar quarter.

Combine the four quarterly files

The following loop imports each file, reads the year and quarter from its filename and appends its rows to the combined dataset. For example, 2026q02 identifies April–June 2026:

local files : dir "." files "*.csv"
tempfile combined
clear
save "`combined'", emptyok

foreach file of local files {
    import delimited using "`file'", clear varnames(1) case(lower) stringcols(_all)
    generate quarter = yq(real(regexs(1)), real(regexs(2))) ///
        if regexm(lower("`file'"), "([0-9][0-9][0-9][0-9])q0([1-4])")
    append using "`combined'"
    save "`combined'", replace
}

Select the parliamentary office

With all four quarters in memory, keep the entries for Anthony Albanese’s office and prepare the category and amount variables. The table shows how many entries appear in each quarter:

keep if strpos(lower(fullnamewithtitle), "anthony") & strpos(lower(fullnamewithtitle), "albanese")
(156,640 observations deleted)

keep quarter highlevelcategory amount

format quarter %tq

rename highlevelcategory category

replace category = lower(itrim(strtrim(category)))
(736 real changes made)

destring amount, generate(dollars) ignore("$,")
amount: all characters numeric; dollars generated as double

tabulate quarter, missing

    quarter |      Freq.     Percent        Cum.
------------+-----------------------------------
     2025q4 |        147       19.97       19.97
     2026q1 |        166       22.55       42.53
     2026q2 |        221       30.03       72.55
     2026q3 |        202       27.45      100.00
------------+-----------------------------------
      Total |        736      100.00

Calculate expenditure by quarter

We will show employee travel, office facilities and office administration separately, then combine the remaining categories under “Other expenditure”. Each entry contributes its dollar amount to one group. Using collapse (sum) gives us one observation per quarter with a total for each group:

generate double employee_travel = cond(category == "employee travel", dollars, 0)

generate double office_facilities = cond(category == "office facilities", dollars, 0)

generate double office_admin = cond(category == "office administration", dollars, 0)

generate double other = cond(inlist(category, "employee travel", ///
     "office facilities", "office administration"), 0, dollars)


collapse (sum) total=dollars employee_travel office_facilities office_admin other, ///
     by(quarter)


isid quarter

assert _N == 4

assert abs(total - employee_travel - office_facilities - office_admin - other) < .005


generate travel_pct = 100 * employee_travel / total

format total employee_travel office_facilities office_admin other %14.2fc

format travel_pct %4.1f


sort quarter

list quarter total employee_travel office_facilities office_admin other travel_pct, noobs

  +--------------------------------------------------------------------------------------+
  | quarter          total   employee~l   office_~s   office_a~n        other   travel~t |
  |--------------------------------------------------------------------------------------|
  |  2025q4   1,503,343.27   646,331.56   95,306.98    56,433.46   705,271.27       43.0 |
  |  2026q1     921,640.37   665,902.33   75,941.73    38,073.02   141,723.29       72.3 |
  |  2026q2     966,288.23   753,541.83   67,767.17    45,517.44    99,461.79       78.0 |
  |  2026q3     920,335.23   691,193.75   57,667.36   115,531.76    55,942.36       75.1 |
  +--------------------------------------------------------------------------------------+

We can check the compiled figures against IPEA’s April–June 2026 office report. For that quarter, IPEA reported $966,648.69 in total expenditure, including $753,902.29 in employee travel. The travel_pct column should show 78.0. Stata displays this quarter as 2026q2 when using the %tq date format.

Graph expenditure by quarter

Divide each category by 1,000 to show expenditure in thousands of Australian dollars. In graph bar, over(quarter) creates one bar per quarter and stack places the category amounts on top of one another. Employee travel forms the bottom segment, so we can compare it across quarters from a common baseline:

foreach v in employee_travel office_facilities office_admin other {
  2    generate double `v'_k = `v' / 1000
  3}


label define expense_quarters ///
     `=yq(2025, 4)' "2025 Q4" ///
     `=yq(2026, 1)' "2026 Q1" ///
     `=yq(2026, 2)' "2026 Q2" ///
     `=yq(2026, 3)' "2026 Q3", replace

label values quarter expense_quarters


graph bar (asis) employee_travel_k office_facilities_k office_admin_k other_k, ///
     over(quarter) stack ///
     ytitle("Reported expenditure (AUD thousands)") ///
     ylabel(0(250)1750, angle(horizontal) format(%9.0fc)) ///
     bar(1, color(navy)) bar(2, color(teal)) ///
     bar(3, color(orange)) bar(4, color(gs12)) ///
     legend(order(1 "Employee travel" 2 "Office facilities" ///
                  3 "Office administration" 4 "Other expenditure") ///
            position(6) ring(1) cols(1) size(small)) ///
     note("Source: IPEA quarterly expenditure reports for Anthony Albanese MP.")

October–December 2025 has the tallest bar, with $1.50 million in reported expenditure. Employee travel reached its highest value in April–June 2026. Between the final two quarters, employee travel fell by about $62,709 while office administration rose from $45,517 to $115,532. The stacked bars show both movements even though the office total fell.

5 views 0 found this useful