Closed Mike-Heneghan closed 4 years ago
Filter organisations and services created by an editor:
organisations_created_by_editor = Organisation.objects.filter(created_by__is_editor=True)
print("Number of organisations created by editor: " , len(organisations_created_by_editor))
services_created_by_editor = Service.objects.filter(created_by__is_editor=True)
print("Number of services created by editor: " , len(services_created_by_editor))
How many Editors have updated the information they add:
This seems like it could be challenging to figure out.
Could count the times were an organisation was last updated by its creator who is an editor? Then count the times where a service was last updated by its creator who was an editor. Then combine these data sets and only count the distinct instances of editors.
Work in progress:
organisations_created_by_editor = Organisation.objects.filter(created_by__is_editor=True)
organisations_last_updated_by_creator = organisations_created_by_editor.filter(created_by=F('last_updated'))
print("Number of organisations updated by their creator who was an editor: " , len(organisations_last_updated_by_creator))
Assuming that the proposed questions are regardless of whether the services and organisations are published or not.
That there is not a historical record of when updated occurred on an organisation and service, only who the last user to update was.
Hence if a user created a service, updated it and then someone else subsequently updated then this user would not be counted for the above.
Analytics queries ran on production data and result sent. Still, need to decide on the best place to keep the methods.
Split the user statistics from the location based reporting.
Merged into master
For user research, it would be useful to be able to have prewritten queries to find out the following: