publicdataau publicdata.au on GitHub
Published by NSW Department of Education under CC BY 4.0 and republished here without change to the content. NSW Department of Education has not endorsed this site.An independent republication of open government data. No government agency has endorsed it. Read more

Average class sizes in government primary schools by year, New South Wales

live
Publisher NSW Department of EducationUpdated yearlyLicence CC BY 4.0Latest 2024-06-13Rows 26Fields 9

The Average class size by year table from the NSW Department of Education. Each row is one year, with the average number of students per class in government primary schools for Kindergarten, Years 1 to 6 and Kindergarten to Year 6. The Department also publishes a fact sheet each year as a PDF, which is not read here.

Also called: NSW primary school class sizes, Average students per class NSW public schools, Kindergarten class sizes NSW.

Before you use it
What is in each row?
One school year, with the average number of students per class in NSW government primary schools for Kindergarten, each of Years 1 to 6, and Kindergarten to Year 6 together.
Why do some years not appear?
The Department's file has the years it published averages for, from 1997. Years it did not report are not rows.
26years
1997 to 2023years drawn
9fields
9formats
1version
01020301997: 26.919971998: 271999: 26.92002: 26.52003: 26.320032004: 26.22005: 25.32006: 24.72007: 24.320072008: 24.22009: 24.32010: 24.22011: 2420112012: 242013: 242014: 242015: 24.120152016: 24.12017: 24.12018: 24.12019: 23.920192020: 23.82021: 23.62022: 23.42023: 23.32023
Average K-6 class size per year, 1997 to 2023. 2024 is not drawn because the year was not over when the publisher released this version on 13 June 2024. The figure is an average of the kindergarten to year 6 average class size column from version 2024-06-13, 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 9 fields, count and filter across all 26 rows and diff its versions. Every answer names the version and carries Department of Education's attribution. No key.

Then ask it: What does Average class sizes in government primary schools by year, New South Wales 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/nsw-primary-class-sizes/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/nsw-primary-class-sizes/latest/ redirects to the newest version.

https://publicdata.au/d/nsw-primary-class-sizes/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
yearintegerYear
kindergartennumberK
year_1numberYear 1
year_2numberYear 2
year_3numberYear 3
year_4numberYear 4
year_5numberYear 5
year_6numberYear 6
k_to_6numberK-6

Download this table as a data dictionary (Excel), or read it as a Frictionless Table Schema at schema.json. The key is year.

A sample of 10 rows

From the latest version, newest first by year, then in the publisher's order, with every field. A blank cell is shown as null.

yearkindergartenyear_1year_2year_3year_4year_5year_6k_to_6
202418.120.621.524.624.925.125.223.2
202318.420.621.624.825.125.425.523.3
202218.420.721.824.925.225.525.523.4
202118.620.92225.125.425.625.723.6
202018.82122.225.425.625.925.923.8
201918.821.122.325.725.926.126.123.9
201819.121.422.525.826.126.426.424.1
201719.121.322.525.726.126.426.424.1
201619.121.322.625.926.226.326.324.1
201519.221.322.725.926.226.526.424.1
The first row as JSON

As it appears in data.json.

GET https://publicdata.au/d/nsw-primary-class-sizes/latest/data.json
{
  "year": 1997,
  "kindergarten": 24.1,
  "year_1": 25.5,
  "year_2": 26.2,
  "year_3": 26.6,
  "year_4": 26.8,
  "year_5": 26.8,
  "year_6": 26.8,
  "k_to_6": 26.9
}

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.

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.

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

Questions

How do I download Average class sizes in government primary schools by year as a CSV file?

Open https://publicdata.au/d/nsw-primary-class-sizes/latest/data.csv. It redirects to the newest dated version, which is https://publicdata.au/d/nsw-primary-class-sizes/v/2024-06-13/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 Average class sizes in government primary schools by year in Excel?

Yes. https://publicdata.au/d/nsw-primary-class-sizes/v/2024-06-13/data.xlsx is a workbook with the 26 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/nsw-primary-class-sizes/v/2024-06-13/data.csv.gz is the CSV at about a tenth of the size.

What years does Average class sizes in government primary schools by year cover?

The current version covers 1997 to 2023. Each release from Department of Education becomes a new dated version here, and earlier versions stay online.

How often is Average class sizes in government primary schools by year updated?

Department of Education releases it yearly. This site checks the portal every week and adds a dated version when the file changes.

Can I use Average class sizes in government primary schools by year commercially?

Yes. CC BY 4.0 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 Average class sizes in government primary schools by year?

No. The publisher is NSW Department of Education, and its page is https://data.nsw.gov.au/data/dataset/nsw-education-average-government-primary-school-class-sizes-by-year. 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.

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.