How should I get all transaction history in a format that I can analyze?
I wanted to do a similar thing to put all the transactions in the database (it was PostgreSQL for me, but you can use anything). After some research ended up using bitcoin abe and it worked great for me. Be patient though, it does take a long time - was several days in my case.