STATcubeR
STATcubeR copied to clipboard
Handle annotations other than "X"
Currently, as.data.frame()
inserts NA
values whenever the annotation "X"
is applied to a cell value.
https://github.com/statistikat/STATcubeR/blob/1158d375c310ea3856a6d0b3eb25400161bfafc1/R/as_data_frame.R#L52-L54
Figure out if this makes sense for other annotations and handle those cases in as.data.frame()
accordingly.
This table should cover all possible annotations from STATcube
Anmerkungscode | Text deutsch | Text englisch |
---|---|---|
A | Verkreuzung nicht erlaubt | Crosstabulation not allowed |
C | Verbinden nicht erlaubt | Merge not allowed |
D | Die Datenbank wurde aktualisiert, bitte abmelden und erneut anmelden | The database was updated, please logoff and login again |
G | Geheimhaltung | Disclosure control |
L | <Für System reserviert darf NICHT belegt werden> | <Für System reserviert darf NICHT belegt werden> |
M | <Für System reserviert darf NICHT belegt werden> | <Für System reserviert darf NICHT belegt werden> |
N | Wert nicht sinnvoll | Value does not make sense |
Q | STATcube – Statistische Datenbank von STATISTIK AUSTRIA | STATcube – Statistical Database of STATISTICS AUSTRIA |
S | Stichprobenfehler | Sampling error |
T | Summenunterdrückung | Total suppression |
U | Berechnungen bei Geheimhaltung nicht erlaubt | Calculation and disclosure control not allowed |
V | Geänderter Zellenwert | Changed cell value |
W | Wert nicht vorhanden | Value does not exist |
X | Verkreuzung nicht erlaubt | Crosstabulation not allowed |
SW | Datenschutzmaßnahme: Swapping | Statistical disclosure control method: swapping |
ABO | Daten sind im Abo erhältlich (Abo hier bestellen: https://www.statistik.at/web_de/formulare/publikationen_und_services/datenbank_sdb/) | Data available by subscription (Order here: https://www.statistik.at/web_en/forms/publications_services/database_sdb/) |
SPE | Daten als kostenpflichtige Spezialauswertung erhältlich (Kontaktdaten siehe unten) | Data available as paid special evaluation (contact details see below) |
VOL | Die Gesamtmenge wurde überschritten (Abo) | The total amount has been exceeded (Subscription) |
SUB | Daten sind im Abo erhältlich (Abo hier bestellen: https://www.statistik.at/web_de/formulare/publikationen_und_services/datenbank_sdb/) | Data available by subscription (Order here: https://www.statistik.at/web_en/forms/publications_services/database_sdb/) |
ACHTUNG | *** DATEN UNTERLIEGEN DER GEHEIMHALTUNG! *** | *** DATA SUBJECT TO CONFIDENTIALITY! *** |
KN2 | Außenhandel ab 2007 nach KN-2Steller"; Link: http://statcube.at/statcube/opendatabase?id=de1531kn2 | Foreign trade as of 2007 by 2-digit CN"; Link: http://statcube.at/statcube/opendatabase?id=de1531kn2 |
S12 | Außenhandel ab 2007 nach SITC-2, -1Steller"; Link: http://statcube.at/statcube/opendatabase?id=de1531sitc21 | Please select the cube "Foreign trade as of 2007 by 2-,1-digit SITC"; Link: http://statcube.at/statcube/opendatabase?id=de1531sitc21 |
I | Imputierter Wert | Imputation |
I just got notice that this issue is of importance when it comes to the html tables that are generated for our new website. The generated tables should be able to display annotated values differently from normal values. This means that STATcubeR will need to keep all imported annotations and the return value tabulate()
should contain the annotations in some form.
One big question here is how aggregation should be performed if one or more values to be aggregated contain annotations. Most of the time, it would make sense to propagate the annotations like so
annotations(x+y) = union(annotations(x), annotations(y))
but there might be exceptions for values like N
. The open data standard will likely get a special symbol :
to represent confidential values (equivalent to G
in STATcube) in the future. This means the logic to handle annotations will be implemented in the base class.
This issue will most likely be resolved once https://github.com/statistikat/STATcubeR/issues/39 is implemented.