Add the file data.py

This file contains several functions that will return the required aggregated data from the database. The functions use Django's Database API to fetch the data. The data is returned in the form of a dictionary.