OCHA-DAP / hdx-signals

HDX Signals
https://un-ocha-centre-for-humanitarian.gitbook.io/hdx-signals/
GNU General Public License v3.0
6 stars 0 forks source link

Align caption and titles in maps #149

Closed caldwellst closed 5 months ago

caldwellst commented 5 months ago

Align captions and titles in maps. The distance between them looks particularly bad for countries that are longer rather than wider, like Chile and Vietnam.

image

Can be fixed in the same PR as #148.

zackarno commented 5 months ago

also just noting that in this example the break figures on the bubble look odd? 21, 22, 22?

caldwellst commented 5 months ago

Yeah good catch. Did not expect this behaviour.

 scales::pretty_breaks(n=3)(c(1,2,2))
#> [1] 1.0 1.5 2.0

So it's rounding 2 numbers into 3. Need to add a line to map_points.R that checks the number of unique values and uses that as the number of breaks if lower than 3.

min(length(unique(df[[val_col]])), 3)
hannahker commented 5 months ago

@caldwellst @zackarno is this addressed by #151?

caldwellst commented 5 months ago

yes!