I was curious how much revenue is coming from fees from the transactions which miners include in only the next one or two blocks.,
One problem with using OP's data (confirmation_times.csv) for this is that it uses a timestamp, instead of block #. So there's no real way to know how many confirmations it took for a transaction to get mined. But using the average of 1 block = 10 minutes, I should be able to get kind of close.
What information this provides us is that miners receive ~%75 of their revenue from transactions they include within the first two blocks (well, within the first 20 minutes, to be technically accurate).

Very cool! Note that the latest data file does have # of blocks to confirm for each transaction which may simplify your script. That file is at
to generate the best fee estimates possible.