Added data_to_csv helper to facilitate dynamic calls to the database for views. No longer using a csv, so method needs to change. Also need to test variables.