CorrelAid / datenguideR

R wrapper for the datengui.de GraphQL API to easily access German regional statistics
GNU General Public License v3.0
25 stars 3 forks source link

Source field as a default. #4

Closed KonradUdoHannes closed 4 years ago

KonradUdoHannes commented 4 years ago

I would recommend the source field (including relevant sub fields) as a default. The reason is that it is the only field that sometimes distinguishes between different values for the same year. If the user does not see the source in the output she might not know why there are several values for a particular year. An extreme example is WAHLSR, which is election participation

{region (id: "01"){id name WAHLSR {year value source {
  title_de
  name }}}}

The source is the only field that contains the information about which election the value belongs to.

Grouping the source fields towards the right inside the output data frame might be a reasonable thing to do if this is implemented as a default. In that case the use can easily ignore these columns with a select(1:5) statement or similar.

favstats commented 4 years ago

I think we did this with this commit here: https://github.com/CorrelAid/datenguideR/commit/a8c717e44eb61af5000a64d4a73f0e60eeb77469

No?

KonradUdoHannes commented 4 years ago

Looks good. If you have tested that it works properly, either manually or ideally inside your framework you can just close the issue. I haven't looked at it yet in an example and also don't know whether there are any test cases for it (the commit itself does not seem to include any) otherwise I would have closed it.