I'm a dabbler, no master and figure there have to be a better way too do this.
I want to show how long it has taken to get to the next million cases of COVID in the US.
I can get the data and get the result am looking for, but it feels like I'm doing it the hard way. How could I do this so I get a TimeLinePlot, but do not have to add each Select individually?
ndata = Total[
Normal@ResourceData[
"Epidemic Data for Novel Coronavirus COVID-19"][
Select[MatchQ[Entity["Country", "UnitedStates"], #Country] && !
MissingQ[#AdministrativeDivision] &]][
All, #ConfirmedCases &]];
ntl = Take[
Transpose[
Flatten[{Take [Select[Normal[ndata], Last[#] < 1000000 &], -1],
Take [Select[Normal[ndata], Last[#] < 2000000 &], -1],
Take [Select[Normal[ndata], Last[#] < 3000000 &], -1],
Take [Select[Normal[ndata], Last[#] < 4000000 &], -1]}, 1]], 1];
TimelinePlot[ntl]