Could you not just look at a block on something like blockchain.info and do fees/size to get the median fee for a block.
or: mining reward - 12.5 / blocksize in bytes = average fee per byte? is that what you're after?
bitcoinfees.21.co will look at confirmed transactions for the past 24 hours and say the amount that is median fee-wise.
I would like something more detailed, like information about the fee distribution in a block and its evolution over time. For instance, how many transactions paid more the 50 bits/kB in block 481000? What is the median and the 10th percentile fee in each block?