Buzzart is a Django application ment to connect to external data sources / API's, and provide means to display this data in a meaningfull way. For example plotting gathered data in a dashboard.
Buzzart currently supports the following datasources:
- Google Reporting / Google Metadata: enabling access to Google Analytics data
- Facebook Graph API: providing insights for Fanpages
- Mailchimp API: providing list and campaign statistics
- Niki API: providing woningaanbod
- Niki Interest API: providing subscriber information per project
- Twitter API: providing access to Twitter API
- Facebook Ads API: providing campaign statistics
- Google Ads API: (work in progress) providing campaign statistics
- SurveyGizmo API: basic implementation of user/password authentication and resources
- Buzzart can generate data formatted for usage in Cyfe, a third party dashboarding system. It can be included using the 'private url' widget. Main url entry point for this view is http://buzzartdomain/cyfe
- Buzzart can generate mailings containing plots (images generated from interactive plots) plus contextual advise (provided by hand.) These advisory mailings are semi-automaticly generated over a given time span. Entry point: http://buzzartdomain/digest/{summary-id}. Mailings are sent by mandrill, a transactional mailing service.
- Buzzart can display gathered data in a dashboarding environment. Dashboard template is based on (sb-admin-2
For the plotting of data, initially the Google Visualisation API was used. In the dashboard environment however, Buzzart uses highcharts as a plotting library because of a nicer interface and a lot of options and variations.
#!bash
git clone https://fundamentallmedia@bitbucket.org/fundamentallmedia/buzzart.git
cd buzzart
virtualenv ~/virtualenv/buzzart
source ~/virtualenv/buzzart/bin activate
pip install -r requirements.txt
python manage syncdb
python manage migrate
python manage runserver
Using Fabric, you can automatically update a remote installation (acceptation or production). Updating acceptation (make sure you committed your changes):
cd [PROJECT_DIR]/deployment
fab config.acc upgrade
Updating production:
cd [PROJECT_DIR]/deployment
fab config.production upgrade
- login to http://buzzartdomain/admin
- create new project, fill in all needed data
- Analytics: create analytics settings object and link to project
- Niki interesse: create niki interest object (if there is no nikiInterestAccount available, create a new one)
- create Summary for project: koppelen aan project, fill in dates, texts (lorem ipsum) -> this is your report
- you can access your report at: http://buzzartdomain/digest/ [^][summary_id
Buzzart uses object based permissions to enable project specific access for users. To manage this permissions follow these steps:
- login to http://buzzartdomain/admin
- Users->add new user
- go to 'projects' and select the project you want to give the user access to
- click 'Object permissions'
- enter the username of the newly created user, click 'manage user'
- select 'view project' permission and click 'save'
- repeat the object permission steps for any other project the user has access to
That's it. Now when the user logs in to mijn.buzzart.nl, he will see a list of projects under his permission.
A project has a 'template' property. The template is a subfolder under /dashboard/templates and determines the way your dashboard is rendered. Select your template while configuring/adding a project in the admin.
In your template, you can include widgets with predefined functionality. The titles of the widgets are pretty self explanatory. Exmample inclusion of a widget in your template:
#!python
<div class="row">
<div class="col-lg-3 col-md-3">
{% include "widgets/niki-availability-pie-plot.html" %}
</div>
</div>
- Make sure you have setup a project setup in your Google Developer Console https://console.developers.google.com
- Enable 'analytics api'
- Under 'Credentials', set the REDIRECT URI setting in the Console to: http://buzzartdomain/complete/google-oauth2/
- Set JAVASCRIPT ORIGIN in the Console to: http://buzzartdomain
- Configure settings.py:
#!python
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = CLIENT_ID
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = CLIENT_SECRET
SOCIAL_AUTH_GOOGLE_OAUTH2_SCOPE = ['https://www.googleapis.com/auth/analytics.readonly']
SOCIAL_AUTH_GOOGLE_OAUTH2_AUTH_EXTRA_ARGUMENTS = {'access_type': 'offline'}
Finally as superuser, access http://buzzartdomain/login/google-oauth2?next=/ , it will fetch an oauth token and link it to the current user.
- As superuser, access http://buzzartdomain/login/facebook?next=/ , it will fetch an oauth token and link it to the current user.
- Be sure the linked facebook user is administrator of the configured fanpage ids per project.
- Go to the index page http://buzzartdomain/ and push 'Update facebook tokens fanpages'. It will gather a never expiring access token for each of the configured fanpages.
- Create a Mailchimp API token for the mailchimp account you want to access.
- Get the List Id from your Mailchimp account
- Test the setup by calling http://buzzartdomain/cyfe/mailchimp/?apikey={api_key}&lid={list_id}
- Enter the API token and List Id for your project
- Retrieve an Oauth1 token for your application. (At the moment a key is hardcoded in Buzzart)
- Test the connection by calling http://buzzartdomain/niki/projects, this will retrieve a list of all projects available for your token.
- Configure the resource (from the above response) for your project
- Create and configure a facebook app
- Configure FACEBOOK_ADS_APP_ID, FACEBOOK_ADS_APP_SECRET and FACEBOOK_ADS_ACCESS_TOKEN in settings.py
- The access token can be obtained using the graph api explorer https://developers.facebook.com/tools/explorer/
- Make sure your facebook app has 'app secret proof' enabled
- Permissions for the ACCESS_TOKEN should include 'manage_ads'
- Test your setup by accessing http://buzzartdomain/fbads