Get a csv output of categorised data

Finish writing test cases and get an output of the categories and put
them into a csv