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

Download Zenus data for other than Bundesland #104

Open
chesselingfm opened this issue May 15, 2024 · 2 comments
Open

Download Zenus data for other than Bundesland #104

chesselingfm opened this issue May 15, 2024 · 2 comments
Labels
question Further information is requested

Comments

@chesselingfm
Copy link

Hi,
I was wondering if I can download data for a different regional scope than the default "Bundesland" resolution. On the web, I can choose to download data for 1000A-1004 for "Gemeinden". Is that possible?
Another thing: When displaying the table in the current form, there is no distinction between the full number and the percentage. I guess the rawdata is not parsed correctly. Or am I missing something?
Bildschirmfoto 2024-05-15 um 16 26 52

@bergnerjonas bergnerjonas added the question Further information is requested label May 20, 2024
@pmayd
Copy link
Collaborator

pmayd commented May 20, 2024

Hi @chesselingfm,
I will come back to you a little later but the problem with multiple values in the same column is already fixed in dev, we are actively working at parsing the new data format only available in Zensus. My latest PR should fix the issue (without addressing the language selection, yet, so only for de). Zensus changed to a new format where multiple values are all gathered in a single value column which means that one observation has X rows, one for each value (long format instead of wide). We decided to transform the data so that the user gets back a wide format as it should be, meaning that a single row stands for all observations for that particular identity (unique set of statistic, time, zone and available attributes).

To your first question: I am sure that is possible and we should already support this because you can pass any keyword argument to the get_data method that is supported by the API but I also saw this possibility in the Web UI so I will dig a little deeper and add it in an appropriate way!

@pmayd
Copy link
Collaborator

pmayd commented May 20, 2024

Here is your example table with the current dev version:

Stichtag Bundesländer Alter (5er-Jahresgruppen) Personen__% Personen__Anzahl
0 2011-05-09 Schleswig-Holstein Insgesamt 100,0 2800119
1 2011-05-09 Schleswig-Holstein Unter 5 Jahre 4,0 112644
2 2011-05-09 Schleswig-Holstein 5 bis 9 Jahre 4,5 126157
3 2011-05-09 Schleswig-Holstein 10 bis 14 Jahre 5,3 149131
4 2011-05-09 Schleswig-Holstein 15 bis 19 Jahre 5,4 151155

As you can see, the previous value column actually combined two observations: "Personen" as count and as percentage. The general way we are handling this in a standardized way for all supported databases is this:

  • we always use the attribute label as column name, "Personen" in this case
  • we add the unit for this column with a double underscore, so "Anzahl" and "%" in this case

This should give you all the information you need as user to work with this column and understand its content

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants