sparklines are out of order
jordansread opened this issue · 10 comments
They should be sorted south to north (based on latitude of the site)
The number of sites needs to be thinned out a good bit too. It's a bit of a jumbled mess right now.
I'm on this but don't have enough permissions to assign myself.
So... turns out that, while we are passing sites to data retrieval in sorted order, what we get back isn't sorted anymore. So we can either sort the dataretrieval response here or pull data out of it in sorted order here.
I'll implement one or the other, but will need some dplyr help if the former is the solution.
hmmm - seems like something we should suggest as an improvement in dataRet, but yeah, we probably shouldn't count on getting sorted back anyhow.
the former seems easier
Sorting would maybe best be done when drawing the sparklines though? Which is the second solution.
or you could sort the sparkline data.frame that comes out. That is probably easier. You could sneak a sites call from dataRet to get the lat, and sort on that after a left_join.
👍 I think that's going to be easiest. Staring at dplyr black magic thinking -- I hate this.
OK, so I sorted them. Still out of order. I'm wondering if the flows aren't scaled right so they are plotting all over the place?
I've tracked this all through. I get to the clip step in building the base map and everything looks fine. What I realized is that the sites were not in the right place but it seems like the spark lines ARE ok with the changes I've made.
Fixed in #43