Add support for tables with two leading zeros#282
Open
conanying wants to merge 2 commits into
Open
Conversation
As of April 2026, tables for the LFS are three characters long, for example Table 001. This adds support for this case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From the April 2026 reference period, the ABS has changed the table names for the Labour Force Survey. For example, "Table 19" is now "Table 017". A concordance is provided here.
As part of this change, table names are now three characters long ("Table 001"). When searching the ABS TSD, the correct number of leading zeros is required. Currently, a maximum of one leading zero is added, which now fails when searching for single digit tables from the LFS.
However, the download still works if you add a leading zero manually.
To resolve this, I've simply added another case. It tries adding two leading zeros ("001") if one leading zero ("01") still does not result in a readable XML file. (I don't often work on R packages, so a closer review may be warranted.)