The statbank library can be installed using pip:
$ pip install statbank
Import the statbank package
import statbank
info = printstatbank.tableinfo('aup03')
print(info.description)
Pulls data from a table and generates rows. Variables is a dictionary mapping variable codes to values. Streaming: Values must be chosen for all variables when streaming
List subjects from the subject hierarchy. If subjects is not given, the root subjects will be used.
Fetch metadata for statbank table. Metadata includes information about variables, which can be used when extracting data.
Find tables placed under given subjects.
Data instances have the following attributes:
Data.valueData.timeData.variables
Subject instances have the following attributes:
Subject.idSubject.descriptionSubject.subjectsSubject.tables
Table instances have the following attributes:
Table.idTable.textTable.unitTable.firstPeriodTable.latestPeriodTable.activeTable.variablesTable.updated
Tableinfo instances have the following attributes:
Tableinfo.idTableinfo.updatedTableinfo.unitTableinfo.variables