{"id":21962714,"url":"https://github.com/icio/ons-output-area","last_synced_at":"2026-05-07T07:34:53.257Z","repository":{"id":143094888,"uuid":"8593008","full_name":"icio/ons-output-area","owner":"icio","description":"Office of National Statistics' 2001-2011 Census Output Area Lookup: PostgreSQL Importer","archived":false,"fork":false,"pushed_at":"2013-03-06T02:27:45.000Z","size":124,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T00:43:06.630Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/icio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-06T01:07:02.000Z","updated_at":"2014-02-23T08:11:22.000Z","dependencies_parsed_at":"2023-03-16T12:25:34.265Z","dependency_job_id":null,"html_url":"https://github.com/icio/ons-output-area","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icio%2Fons-output-area","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icio%2Fons-output-area/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icio%2Fons-output-area/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icio%2Fons-output-area/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icio","download_url":"https://codeload.github.com/icio/ons-output-area/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245020314,"owners_count":20548156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-29T10:53:54.183Z","updated_at":"2026-05-07T07:34:53.218Z","avatar_url":"https://github.com/icio.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ONS's 2001--2011 Output Area Lookup Files: PostgreSQL Importer\n\nThis is an investigatory project aiming to quickly make available some of the spatial data available from the Office of National Statistics. In particular the [2001--20011 Census Output Area Lookup files](http://www.ons.gov.uk/ons/guide-method/geography/products/census/lookup/2001-2011/index.html).\n\nSome further information on this data is available in [the beginners guide](http://www.ons.gov.uk/ons/guide-method/geography/beginner-s-guide/census/output-area--oas-/index.html).\n\n\n## Prerequisites\n\n* Postgres: `psql`, `createdb`\n* `wget`, `unzip`, `iconv`\n\nMost of these should be satisfied on any dev laptop. If you're missing Postgres and want to get set up really quickly on OS X, check out [Postgres.app](http://postgresapp.com/).\n\n\n## Usage\n\nPaste the following command into your terminal to clone this repository, run the project (downloads the data and creates and imports the database) and open an interactive shell to the database with which you can inspect the data.\n\n    git clone git@github.com:icio/ons-output-area.git \u0026\u0026\n        cd ons-output-area \u0026\u0026\n        make \u0026\u0026 \n        psql ons_output_area\n\nYou can import the data using `./build.sh [DATABASE_NAME]` or simply `make` to use the default `ons_output_area` database (created if it doesn't already exist). The build script drops any of the tables which already exists and imports them afresh with the data available.\n\nThe data archives are never downloaded from the internet if they already exist, nor are files unzipped if the extract target already exists. The makefile makes available a utility for removing all of the locally downloaded data:\n\n    make clean\n\n\n## Data Structures\n\n```\nons_output_area=# \\d+ public.*\n                                 Table \"public.lower_super_output_areas\"\n        Column        | Type | Modifiers | Storage  |                     Description\n----------------------+------+-----------+----------+-----------------------------------------------------\n lsoa_code_2001       | text |           | extended | LSOA01CD - 2001 lower layer super output area code\n lsoa_name_2001       | text |           | extended | LSOA01NM - 2001 lower layer super output area name\n lsoa_code            | text |           | extended | LSOA11CD - 2011 lower layer super output area code\n lsoa_name            | text |           | extended | LSOA11NM - 2011 lower layer super output area name\n change_ind           | text |           | extended | CHGIND - change indicator\n authority_code       | text |           | extended | LAD11CD - 2011 local authority district code\n authority_name       | text |           | extended | LAD11NM - 2011 local authority district name\n authority_welsh_name | text |           | extended | LAD11NMW - 2011 local authority district Welsh name\nHas OIDs: no\n\n                                 Table \"public.middle_super_output_areas\"\n        Column        | Type | Modifiers | Storage  |                     Description\n----------------------+------+-----------+----------+-----------------------------------------------------\n msoa_code_2001       | text |           | extended | MSOA01CD - 2001 middle layer super output area code\n msoa_name_2001       | text |           | extended | MSOA01NM - 2001 middl layer super output areaname\n msoa_code            | text |           | extended | MSOA11CD - 2011 middle layr super output area code\n msoa_name            | text |           | extended | MSOA11NM - 2011 middle layr super output area name\n change_ind           | text |           | extended | CHGIND - change indicator\n authority_code       | text |           | extended | LAD11CD - 2011 local authority district code\n authority_name       | text |           | extended | LAD11NM - 2011 local authority district name\n authority_welsh_name | text |           | extended | LAD11NMW - 2011 local authority district Welsh name\nHas OIDs: no\n\n                                         Table \"public.output_areas\"\n        Column        | Type | Modifiers | Storage  |                       Description\n----------------------+------+-----------+----------+---------------------------------------------------------\n oa_code_2001         | text |           | extended | OA01CD - 2001 output area nine character code\n oa_code_2001_old     | text |           | extended | OA01CDO - 2001 output area old style ten character code\n oa_code              | text |           | extended | OA11CD - 2011 output area nine character code\n change_ind           | text |           | extended | CHGIND - change indicator\n authority_code       | text |           | extended | LAD11CD - 2011 local authority district code\n authority_name       | text |           | extended | LAD11NM - 2011 local authority district names\n authority_welsh_name | text |           | extended | LAD11NMW - 2011 local authority district Welsh names\nHas OIDs: no\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficio%2Fons-output-area","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficio%2Fons-output-area","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficio%2Fons-output-area/lists"}