hendrikknoche / dashboard-exploration

0 stars 3 forks source link

categorical QI attribute example #13

Open mathiassand opened 2 years ago

mathiassand commented 2 years ago

we need to add a categorical example to the list of QIs, which can look like this: e.g. with 7 bins, 1 for each stroke type

mouse over each bar to get stroke type and percentage

examplecategorical

gabCodes commented 2 years ago

These sort of charts can be generated, now just need to put them in the QI section. Here is an example for gender: ApplicationFrameHost_2022-06-28_16-04-47

gabCodes commented 2 years ago

Here's the categorical data now fully integrated into R. rstudio_2022-06-29_00-37-21 I quite like the look of just the QI + Visualisation in the QI section with no metrics and only one visualisation. Shall I adapt the numerical QI's to also be in this format? @hendrikknoche

hendrikknoche commented 2 years ago

can you change the alpha for the country to make it recede into the background a little? make the first column (text) left aligned? given the current data is NA it's unclear what data is missing in the spark lines, any suggestions @mathiassand ?

hendrikknoche commented 2 years ago

Nice progress Gabriel!

mathiassand commented 2 years ago

as a starting point for designing for NA data, we could always have the x-axis show four quarters and then show an unfilled point at the value of "0" when we have NA's (NA=0 in the df). this will make it clearer for users that they have missing data in the quarter, e.g.:

image

however, this may have issues if we have QIs where the value of 0 is a good result. maybe that's something for the datavis students to mess around with @hendrikknoche? :-)

hendrikknoche commented 2 years ago

given that we cannot control check the meaning of zero/0 for each right now I'd prefer a visualization that encodes that information differently. e.g. by not having a mark but a line to it (e.g. an average value of all quarters or years)

hendrikknoche commented 2 years ago

Here's the categorical data now fully integrated into R. rstudio_2022-06-29_00-37-21 I quite like the look of just the QI + Visualisation in the QI section with no metrics and only one visualisation. Shall I adapt the numerical QI's to also be in this format? @hendrikknoche

I'm not sure I understand. in any case can we left align the first column (the names) and try removing some of the white space between the hosp and national bar chart? Please alpha = .5 for the national data.

gabCodes commented 2 years ago

rstudio_2022-06-29_16-05-25 This should be what you meant correct? For the numerical QI visualisation, the reason it looks kind of skewed to the left is because Q4 is an NA value. Meaning it doesn't plot anything for that value.

hendrikknoche commented 2 years ago

great progress. Can you change the factor order that controls the order of the two geom_point and _line, which currently puts the national values on top of the hospital. It should be the other way around. try factor reorder reverse. for the missing NA I would like to include invisible dots. and a dotted line to them. So for NA value we'd replace for quarters by the yearly mean (or the rolling mean of the last four quarters with data), set the NA flag (in a column) and then we can select that in the ggplot call. I'd also like to further decrease the point size and line thickness to make them look more like sparklines. They are also fairly high right now (vertical space is ca. two lines). in the UI it's not clear what quarter/year we are showing.

hendrikknoche commented 2 years ago

for the hosp and national numbers we should also have IQRs/range for many. Can you check Robert's proposal on Miro?

hendrikknoche commented 2 years ago

there also appears to be a clipping issue with the max and min values. the dots get eaten up slightly image