Crates.io | simple-abns |
lib.rs | simple-abns |
version | 0.1.0 |
source | src |
created_at | 2024-04-26 06:44:25.918331 |
updated_at | 2024-04-26 06:44:25.918331 |
description | Simplify the ABR's Australian Business Number dataset for easier analysis |
homepage | |
repository | https://github.com/joelkoen/simple-abns |
max_upload_size | |
id | 1221126 |
size | 40,374 |
simple-abns parses the ABR's Australian Business Number dataset and converts it to a simpler JSON format.
You can download a copy of the converted dataset. Note that this is not updated automatically - please open an issue if it could use a refresh.
You can also find machine-readable names for the entity types the ABR uses in ./entity_types.json.
If you'd like to generate the dataset yourself, you'll need to download the raw XML data and place all 20 chunks in ./raw
. simple-abns will parse them and print each ABN record as a seperate line. You can see progress and compress the output using:
cargo run --release | pv -ls 18M | zstd -T0 -9 > simple-abns.jsonl.zst
Input:
<ABR recordLastUpdatedDate="20240412" replaced="N">
<ABN status="ACT" ABNStatusFromDate="19991101">88712649015</ABN>
<EntityType>
<EntityTypeInd>SGE</EntityTypeInd>
<EntityTypeText>State Government Entity</EntityTypeText>
</EntityType>
<MainEntity>
<NonIndividualName type="MN">
<NonIndividualNameText>STATE EMERGENCY SERVICE (NSW)</NonIndividualNameText>
</NonIndividualName>
<BusinessAddress>
<AddressDetails>
<State>NSW</State>
<Postcode>2500</Postcode>
</AddressDetails>
</BusinessAddress>
</MainEntity>
<GST status="ACT" GSTStatusFromDate="20000701" />
<OtherEntity>
<NonIndividualName type="TRD">
<NonIndividualNameText>NEW SOUTH WALES STATE EMERGENCY SERVICE</NonIndividualNameText>
</NonIndividualName>
</OtherEntity>
</ABR>
Output:
{
"abn": "88712649015",
"status": "Active",
"status_since": "1999-11-01",
"last_updated": "2024-04-12",
"entity_name": {
"type": "NonIndividual",
"name": "STATE EMERGENCY SERVICE (NSW)"
},
"entity_type": "SGE",
"trade_names": [
"NEW SOUTH WALES STATE EMERGENCY SERVICE"
],
"postcode": "2500",
"state": "NSW",
"gst_status": "Active",
"gst_status_since": "2000-07-01"
}