DOI-USGS / hurricane-irma

Creative Commons Zero v1.0 Universal
55 stars 20 forks source link

sparklines are out of order #57

Closed jordansread closed 7 years ago

jordansread commented 7 years ago

They should be sorted south to north (based on latitude of the site)

wdwatkins commented 7 years ago

The number of sites needs to be thinned out a good bit too. It's a bit of a jumbled mess right now.

dblodgett-usgs commented 7 years ago

I'm on this but don't have enough permissions to assign myself.

dblodgett-usgs commented 7 years ago

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.

jordansread commented 7 years ago

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

dblodgett-usgs commented 7 years ago

Sorting would maybe best be done when drawing the sparklines though? Which is the second solution.

jordansread commented 7 years ago

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.

dblodgett-usgs commented 7 years ago

👍 I think that's going to be easiest. Staring at dplyr black magic thinking -- I hate this.

dblodgett-usgs commented 7 years ago

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?

dblodgett-usgs commented 7 years ago

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.

dblodgett-usgs commented 7 years ago

Fixed in #43