https://github.com/asiripanich/abs
Read csv tables exported from ABS TableBuilder and ABS Census TableBuilder.
https://github.com/asiripanich/abs
abs abstablebuilder australian-bureau-of-statistics r tablebuilder
Last synced: 3 days ago
JSON representation
Read csv tables exported from ABS TableBuilder and ABS Census TableBuilder.
- Host: GitHub
- URL: https://github.com/asiripanich/abs
- Owner: asiripanich
- License: other
- Created: 2019-12-19T01:28:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-08T10:46:14.000Z (over 5 years ago)
- Last Synced: 2025-10-25T12:54:21.238Z (9 months ago)
- Topics: abs, abstablebuilder, australian-bureau-of-statistics, r, tablebuilder
- Language: R
- Homepage: https://abs.amarin.dev
- Size: 863 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# abs
[](https://www.tidyverse.org/lifecycle/#maturing)
[](https://zenodo.org/badge/latestdoi/228950913)
[](https://github.com/asiripanich/abs/actions)
The goal of abs is to provide a function to read csv tables downloaded from ABS TableBuilder without having to 'tidy' them first. Thus, this helps ti retain the meta information of the tables.
## Table Builder
Currently, The package only works with Table Builder files downloaded as "CSV String Value (.csv)", as shown in the image below.

## Installation
You can install the development version of abs from GitHub with:
``` r
remotes::install_github("asiripanich/abs")
```
## Example
The main function is `abs_read_tb()` which let you read in a TableBuilder file downloaded as "CSV String Value (.csv)" into a tidy data by ignoring all its metadata.
```{r example}
library(abs)
data_dir <- system.file("extdata", package = "abs")
test_csv <- file.path(data_dir, "tb1.csv")
mytable <- abs_read_tb(test_csv, .names = "simplify", exclude_total = TRUE)
mytable
```
Note that `abs_read_tb` returns a data.table object. To convert it back to data.frame simply use `as.data.frame()`.
## Related packages
- [readabs](https://github.com/MattCowgill/readabs): for reading time series data from ABS.
- [stplanr](https://github.com/ropensci/stplanr): has a utility function, stplanr::read_table_builder(), for reading Table Builder files.