Use Brownie to scrape historical on-chain data for analyses.
When connected with an RPC that is capable of reading an archive node, you can pass the block_identifier argument to run the transaction at an historical block.
> Contract.function_call(block_identifier=<block_height_or_hash>)