Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add CI and a python notebook to make the CSV files fully reproducible. #7

Merged
merged 16 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/tidy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Tidy ANZSIC

on:
push:

jobs:
tidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x

- name: Install dependencies
run: pip install -r requirements.txt

- name: Run notebook
run: papermill tidy.ipynb tidy-rendered.ipynb

- name: Upload tidy-rendered.ipynb
uses: actions/upload-artifact@v4
with:
name: tidy-rendered.ipynb
path: tidy-rendered.ipynb

- name: Upload anzsic_1993.csv
uses: actions/upload-artifact@v4
with:
name: anzsic_1993.csv
path: anzsic_1993.csv

- name: Upload anzsic_2006.csv
uses: actions/upload-artifact@v4
with:
name: anzsic_2006.csv
path: anzsic_2006.csv

- name: Upload anzsic_1993_to_2006_conversion_table.csv
uses: actions/upload-artifact@v4
with:
name: anzsic_1993_to_2006_conversion_table.csv
path: anzsic_1993_to_2006_conversion_table.csv



1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# anzsic codes
[![Tidy ANZSIC](https://github.com/asiripanich/anzsic/actions/workflows/tidy.yml/badge.svg)](https://github.com/asiripanich/anzsic/actions/workflows/tidy.yml)

ANZSIC codes in a standard table format for people who are sick of ABS for sharing data in non-standard formats.


## Data sources

| Filename | Source | Downloaded date |
|----------|----------|-------|
| `data/1292.0.55.005_ anzsic 2006 - correspondence tables.xls` | https://www.abs.gov.au/AUSSTATS/abs@.nsf/DetailsPage/1292.0.55.0052006?OpenDocument | 2024-10-23 |
| `data/1292.0.55.002_anzsic 2006 - codes and titles.xls` | https://www.abs.gov.au/AUSSTATS/abs@.nsf/DetailsPage/1292.0.55.0022006?OpenDocument | 2024-10-23 |


# Known issues
Please note that the 'nfd' (not further defined) classes are missing from the anzsic tables, as repoted by @baslat in https://github.com/asiripanich/anzsic/issues/1. PRs to fix are welcome.
932 changes: 466 additions & 466 deletions anzsic_1993.csv

Large diffs are not rendered by default.

1,636 changes: 818 additions & 818 deletions anzsic_1993_to_2006_conversion_table.csv

Large diffs are not rendered by default.

1,014 changes: 507 additions & 507 deletions anzsic_2006.csv

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
9 changes: 9 additions & 0 deletions env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: anzsic
dependencies:
- python=3.13.0
- pip=24.2
- pip:
- polars==1.10.*
- pyarrow==17.0.0
- fastexcel==0.12.0
- papermill==2.6.0
6 changes: 6 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
polars==1.10.0
pyarrow==17.0.0
fastexcel==0.12.0
ipython
ipykernel
papermill==2.6.0
Loading