DataUSA / datausa-tracker

0 stars 0 forks source link

remove "Total" occupation from median earnings tables (1 and 5 year) #242

Closed davelandry closed 2 years ago

davelandry commented 5 years ago

https://xenium-api.datausa.io/ui/#eyJkcmlsbERvd25zIjpbWyJBQ1MgT2NjdXBhdGlvbiIsIkFDUyBPY2N1cGF0aW9uIiwiT2NjdXBhdGlvbiJdXSwiY3V0cyI6W10sImN1YmUiOiJhY3NfeWdzb19nZW5kZXJfYnlfb2NjdXBhdGlvbl9mb3JfbWVkaWFuX2Vhcm5pbmdzXzEiLCJtZWFzdXJlcyI6WyJNZWRpYW4gRWFybmluZ3MgYnkgT2NjdXBhdGlvbiBhbmQgR2VuZGVyIl19

davelandry commented 5 years ago

@hwchen this issue is present in both the ygso and ygsi tables

hwchen commented 5 years ago

Unfortunately, it's not possible to do so without altering the structure of the table. The Total is required so that when you're not drilling down on Occupation or Industry, the query will return a correct value. (This is because you can't aggregate over medians).

I suppose that if always drilldown on occuption/industry for these tables, I could make the change. But I can see a situation in which a vizbuilder user first asks for median income per occupation per gender, then removes the occupation to see just by gender.

Median tables require some special handling; I wonder if, for mondrian-rest at least, vizbuilder-datausa can build in some handling on its side.

Also, any thoughts on this @jspeis?

jspeis commented 5 years ago

Nothing else to add here. But based on my understanding from Walther I think we might need to close this as wontfix since this bumps up against a limitation of mondrian-rest when using non-additive measures such as medians :/