Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle annotations other than "X" #3

Open
GregorDeCillia opened this issue Sep 17, 2020 · 3 comments
Open

Handle annotations other than "X" #3

GregorDeCillia opened this issue Sep 17, 2020 · 3 comments
Assignees
Labels
feature New feature or request parse

Comments

@GregorDeCillia
Copy link
Contributor

GregorDeCillia commented Sep 17, 2020

Currently, as.data.frame() inserts NA values whenever the annotation "X" is applied to a cell value.

annotations <- get_annotations(x, i)
if (recode_na)
values[annotations == "X"] <- NA

Figure out if this makes sense for other annotations and handle those cases in as.data.frame() accordingly.

@GregorDeCillia GregorDeCillia added the feature New feature or request label Sep 17, 2020
@GregorDeCillia GregorDeCillia self-assigned this Sep 17, 2020
@GregorDeCillia GregorDeCillia added parse and removed feature New feature or request labels Feb 5, 2021
@GregorDeCillia GregorDeCillia added the feature New feature or request label Aug 10, 2021
@GregorDeCillia
Copy link
Contributor Author

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:https://statcube.at/statcube/opendatabase?id=de1531kn2 Foreign trade as of 2007 by 2-digit CN"; Link: http:https://statcube.at/statcube/opendatabase?id=de1531kn2
S12 Außenhandel ab 2007 nach SITC-2, -1Steller"; Link: http:https://statcube.at/statcube/opendatabase?id=de1531sitc21 Please select the cube "Foreign trade as of 2007 by 2-,1-digit SITC"; Link: http:https://statcube.at/statcube/opendatabase?id=de1531sitc21
I Imputierter Wert Imputation

@GregorDeCillia
Copy link
Contributor Author

GregorDeCillia commented Apr 29, 2022

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.

@GregorDeCillia
Copy link
Contributor Author

This issue will most likely be resolved once #39 is implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request parse
Projects
None yet
Development

No branches or pull requests

1 participant