publicdataau publicdata.au on GitHub
Published by Australian Institute of Health and Welfare under CC BY 3.0 AU and republished here without change to the content. Australian Institute of Health and Welfare has not endorsed this site.An independent republication of open government data. No government agency has endorsed it. Read more

Young people in detention on an average night, by quarter, Australia, 2008 to 2016

live
Publisher Australian Institute of Health and WelfareUpdated no longerLicence CC BY 3.0 AULatest 2017-07-25Rows 42,768Fields 8

The AIHW Youth Justice Detention Data file, the average nightly population in youth detention for each quarter from June 2008 to June 2016. Each row is one quarter, state or territory, age group, Indigenous status, legal status and sex. The sex column keeps the Institute's spelling Unknow for unknown.

Also called: Youth Justice Detention Data, Juvenile detention population Australia, Young people in detention by Indigenous status, Average nightly youth detention population.

Before you use it
What is in each row?
The average number of young people in detention on a night in one quarter from June 2008 to June 2016, for one state or territory or Australia, one age group, Indigenous status, legal status and sex. Each of those carries a Total group, so the rows overlap and should not be summed across a group that has a Total.
Why does the series stop in 2016?
The Institute published this file with its report Youth detention population in Australia 2016 and has not added to it on data.gov.au. Later figures are in the Institute's yearly Youth detention population reports. Some figures here may differ from the 2016 report because of later revisions.
Why are adults counted?
Some people aged 18 and over are held in youth detention, mostly because they offended as young people. The Institute counts them in the 18+ age group.
42,768quarterly counts
2008 to 2016years drawn
8fields
9formats
1version
05001k1.5k2008 Indigenous: 499.72008 Non-Indigenous: 4692008 Not stated: 8.6720082009 Indigenous: 479.82009 Non-Indigenous: 4852009 Not stated: 8.752010 Indigenous: 519.22010 Non-Indigenous: 515.82010 Not stated: 920102011 Indigenous: 480.22011 Non-Indigenous: 519.82011 Not stated: 8.752012 Indigenous: 493.82012 Non-Indigenous: 4762012 Not stated: 320122013 Indigenous: 486.52013 Non-Indigenous: 444.52013 Not stated: 42014 Indigenous: 463.82014 Non-Indigenous: 4132014 Not stated: 320142015 Indigenous: 467.22015 Non-Indigenous: 389.82015 Not stated: 32016 Indigenous: 5022016 Non-Indigenous: 3982016 Not stated: 22016
IndigenousNon-IndigenousNot stated
Young people in detention on an average night, Australia per year by indigenous status, 2008 to 2016. Rows where state or territory is Aust and age group is Total and legal status is Total and sex is Total and indigenous status is not Total are drawn. The figure is an average of the average nightly population column from version 2017-07-25, worked out in the build. Nothing else is added.

Made for agents

Connect your AI agent

Any agent that connects to publicdata.au/mcp can find this dataset, read its 8 fields, count and filter across all 42,768 rows and diff its versions. Every answer names the version and carries AIHW's attribution. No key.

Then ask it: What does Young people in detention on an average night, by quarter, Australia, 2008 to 2016 hold, and what changed in the newest version?

claude mcp add --transport http publicdata https://publicdata.au/mcp

One command. No key, no account, no sign-up.

Download it as Excel, CSV, JSON and 6 more formats

Pick a format and a version. Excel is picked first because it opens in the tools most offices have. The URL is yours to keep. A dated version never changes.

Format
"Latest" redirects to the newest version and will change when the publisher releases again. A dated version never changes.
https://publicdata.au/d/au-youth-detention-population-quarterly/latest/data.xlsx
Download

In your own tools

Use it in Excel, R, Python and more

Excel and Power BI read the CSV from its address and refresh from it. The R and Python packages take any dataset on this site by its slug, so a new dataset needs no new release. The DuckDB file attaches read-only over HTTPS, and a query reads only the blocks it touches.

The dated URL in the code never changes. https://publicdata.au/d/au-youth-detention-population-quarterly/latest/ redirects to the newest version.

https://publicdata.au/d/au-youth-detention-population-quarterly/latest/data.csv

In Excel choose Data, then From Web, and paste this address. Excel keeps it, so Refresh All reads the newest version. A sheet holds about a million rows; past that, load the query to the Data Model.

What is in it

Column names are made snake_case and the publisher's original header is kept beside each one. Blank cells are null. Nothing is added, removed, ranked or summarised.

FieldTypePublisher's headerNote
statestringstate
quarterdatequarterFirst day of the last month of the quarter, so June 2008 is the June quarter 2008.
yearintegeryear
age_groupstringagegrp
indigenous_statusstringindig_status
legal_statusstringlegal_status
sexstringsex
avg_nightly_populationintegeravg_nightly_pop

Download this table as a data dictionary (Excel), or read it as a Frictionless Table Schema at schema.json. The key is state, quarter, age_group, indigenous_status, legal_status, sex.

A sample of 9 rows

The average nightly population in the newest quarter in each state and Australia, with every age, Indigenous status, legal status and sex at its total. A blank cell is shown as null.

statequarteryearage_groupindigenous_statuslegal_statussexavg_nightly_population
NSW2016-06-012016TotalTotalTotalTotal297
Vic2016-06-012016TotalTotalTotalTotal175
Qld2016-06-012016TotalTotalTotalTotal186
WA2016-06-012016TotalTotalTotalTotal140
SA2016-06-012016TotalTotalTotalTotal48
Tas2016-06-012016TotalTotalTotalTotal8
ACT2016-06-012016TotalTotalTotalTotal7
NT2016-06-012016TotalTotalTotalTotal46
Aust2016-06-012016TotalTotalTotalTotal907
The first row as JSON

As it appears in data.json.

GET https://publicdata.au/d/au-youth-detention-population-quarterly/latest/data.json
{
  "state": "NSW",
  "quarter": "2008-06-01",
  "year": 2008,
  "age_group": "10 to 17",
  "indigenous_status": "Total",
  "legal_status": "Unsentenced",
  "sex": "Male",
  "avg_nightly_population": 202
}

Query it without downloading

The query API returns only the rows you ask for, as JSON, NDJSON or CSV, from the same typed rows as the files. It needs no key. Build a query here and run it, then copy the URL or the code into your own work.

Try rows or aggregate for this dataset. The query builder needs JavaScript.

How filters work

Each filter is field=operator.value in the query string, and every filter must match. A number or date field compares as a number or date, and a text field compares as text. Values are case-sensitive except with ilike. Prefix not. to negate a filter, as not.eq.value.

OperatorWhat it matches
eq.valueEqual to the value.
neq.valueNot equal to the value. A blank cell does not match.
gt.valueGreater than the value.
gte.valueGreater than or equal to the value.
lt.valueLess than the value.
lte.valueLess than or equal to the value.
like.*text*Matches a pattern where * stands for any run of characters. Case-sensitive.
ilike.*text*The same as like, ignoring case.
in.(a,b,c)Equal to any value in the list. A value cannot contain a comma.
is.nullBlank in the source, or suppressed by the publisher.
ParameterWhat it does
selectFields to return, comma-separated. Every field when absent.
orderfield.asc or field.desc, comma-separated. The publisher's row order when absent.
limitRows per page, 1 to 10,000. 100 when absent.
offsetRows to skip. The next URL in each answer sets it for you.
groupOn aggregate, fields to group by, comma-separated.
metricOn aggregate, count, sum.field, avg.field, min.field or max.field, comma-separated. count when absent.
formatjson, ndjson or csv. JSON carries the provenance header, and the others carry it in response headers.

Without a version the API answers from the newest loaded version, and that answer changes when the publisher releases again. Put versions/<date>/ before rows or aggregate for an answer that never changes. /api/v1/datasets/<slug>/versions lists the loaded versions. The 1 newest version is loaded; versions lists them.

The API allows 60 requests in 10 seconds from one address. Above that it answers 429 for 10 seconds with a Retry-After header, a RateLimit-Policy header and a JSON body that gives the limit. Every API answer carries the same RateLimit-Policy. A client should wait the Retry-After seconds, or read the files, which have no limit. openapi.json describes this dataset's query paths for client generators and agents.

https://publicdata.au/mcp is a remote MCP server over Streamable HTTP with the same tools, defined in the same place, so a tool added to the pages is added here too. It needs no key and no account. The row tools are held to the query API's limit of 60 queries in 10 seconds from one address, and each call is two queries because it also counts the matching rows. Add it to Claude Code with claude mcp add --transport http publicdata https://publicdata.au/mcp, add the URL in Claude as a custom connector, or give it to any client that connects to remote MCP servers. Each queryable dataset is also a resource at https://publicdata.au/d/<slug>/fields.json, which lists its fields with their types, the publisher's descriptions, their ranges and the values they hold, so an agent can read a dataset's shape before it writes a query.

Smaller files

The same rows split by a field, one JSON file each. Each file carries the same provenance header.

By state (9 files)

by/state/index.json lists every file with its row count.

What changed

One version for every release the publisher has made since this site started following the dataset. The date is the day the file changed on the portal.

  • 2017-07-25
    42,768 rows8 fieldsutf-8-siga8d9fdfbbf15

versions.json · changes.json · history.tar.zst (28 KB, every version's Parquet and manifest)

Questions

How do I download Young people in detention on an average night, by quarter, Australia as a CSV file?

Open https://publicdata.au/d/au-youth-detention-population-quarterly/latest/data.csv. It redirects to the newest dated version, which is https://publicdata.au/d/au-youth-detention-population-quarterly/v/2017-07-25/data.csv today. The same path serves Excel, JSON, Parquet, SQLite, DuckDB, NDJSON, Arrow. A dated URL never changes, so use it when the file must stay the same.

Can I open Young people in detention on an average night, by quarter, Australia in Excel?

Yes. https://publicdata.au/d/au-youth-detention-population-quarterly/v/2017-07-25/data.xlsx is a workbook with the 42,768 rows on a records sheet, the field list on a second sheet and the provenance on a third. The CSV also opens in Excel. https://publicdata.au/d/au-youth-detention-population-quarterly/v/2017-07-25/data.csv.gz is the CSV at about a tenth of the size.

What years does Young people in detention on an average night, by quarter, Australia cover?

The current version covers 2008 to 2016. Each release from AIHW becomes a new dated version here, and earlier versions stay online.

How often is Young people in detention on an average night, by quarter, Australia updated?

AIHW no longer updates it. This site checks the portal every week and adds a dated version when the file changes.

Can I use Young people in detention on an average night, by quarter, Australia commercially?

Yes. CC BY 3.0 AU allows commercial use, redistribution and derived works as long as the attribution is kept. The attribution string is in this page's side column and inside every file.

Is this the official source for Young people in detention on an average night, by quarter, Australia?

No. The publisher is Australian Institute of Health and Welfare, and its page is https://data.gov.au/data/dataset/youth-justice-detention-data. This site republishes the publisher's file without changing its content. The original sits beside every version as source.csv with its SHA-256, so the two can be compared.

How do I get only the rows for one state?

Every version has one JSON file per value of state, 9 files in the current version, listed with row counts at https://publicdata.au/d/au-youth-detention-population-quarterly/v/2017-07-25/by/state/index.json. For example https://publicdata.au/d/au-youth-detention-population-quarterly/v/2017-07-25/by/state/act.json holds the 4,752 rows where state is ACT.

What this site did to the data. Cells were typed, headers were renamed and the encoding was made UTF-8. Rows were left alone. The publisher's file sits beside every version as source.csv so the change can be checked.