Plotting some covid19 data with gnuplot, I am trying to find a way to pick a raw in my dataset to use it as a starting point.
E. g. I have something like:
#date #cases
2010-03-01 11
2010-03-02 13
2020-03-03 17
2020-03-04 20
2020-03-05 29
2020-03-06 38
2020-03-07 50
2020-03-08 63
2020-03-09 82
2020-03-10 105
2020-03-11 140
2020-03-12 180
2020-03-13 240
...
Now I want to find the date when the number of cases became greater than 100 and use this date to adjust/normalise/whatever all my plots.
So I what to somehow find the "2020-03-10 105" row and set two variables
start_date = '2020-03-10'
start_index = 11
to be able to do things like
stats <datafile> every ::start_index
set xrange [start_date:]
...
etc etc to basically ignore everything before the date of >100 cases.
I suppose, it can be possible using some basic for+if loop over the raws of my datafile but I am a bit stuck with his as I can't find a good example/explanation of how to iterate through datafile raws.
P. S. Of course, I could do this with external tools but I'd prefer to not as I'm doing some batch plotting with quite some scripting around to gather the data, and would like to keep all the plotting logic inside my gnuplot jinja2 template to not over-complicate the whole stuff.
