openaustralia / jacaranda-righttoknow

a watchful tree and slack messenger to keep you informed of the use of Right To Know


Jacaranda [Deprecated because this Right To Know version has been incorporated into the original version]

A watchful tree and slack messenger to keep you informed of the use of Right To Know.

Jacaranda is an experiment to see the impact of regular feedback on the people developing and contributing to Right To Know. It aims to keep you more informed of the use and impact of Right To Know; to remind you of the effort you’ve put in to achieve this; and to do this in an quick and unobtrusive way.

Jacaranda collects information about what’s happening on Right To Know and the work contributors do to make it better for them. It then sends a short fortnightly message to our Slack channel to give us a sense of how things are going.

Image of slack message from Jacaranda

This is a very basic start. We’ve interested to see how getting these messages impacts us and what we do with the information.

Currently Jacaranda tells you about:

  • The number of new requests in the last fortnight
  • The number of annotations in the last fortnight
  • The number of requests that were successful in the last fortnight

Feel free to change the text or the information in presents to what you think will have a better impact.

Usage

This program depends on three environment variables:

  • Slack channel webhook url to post the message to
  • Live mode to make it actually post to the Slack channel #townsquare and save to the database

In local development you can add these to a .env file and use dotenv to load them as the scraper runs:

MORPH_SLACK_CHANNEL_WEBHOOK_URL="https://hooks.slack.com/services/XXXXXXXXXXXXX" MORPH_LIVE_MODE=false

Create a .env file using the example provided by running cp .env.example .env.

Running this on morph.io

You can also run this as a scraper on Morph. To get started see the documentation

Image credit

The Jacaranda Slack avatar is cropped from a photograph of the Jacaranda trees on Gowrie St, Newtown, Sydney by Flickr user murry. Thanks murry for making it available under a creative commons license.

Contributors equivalentideas

Last run completed successfully .

Console output of last run

Injecting configuration and compiling...  -----> Ruby app detected -----> Compiling Ruby -----> Using Ruby version: ruby-2.2.6 -----> Installing dependencies using bundler 1.13.7  Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment  Warning: the running version of Bundler (1.13.7) is older than the version that created the lockfile (1.14.4). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.  Fetching gem metadata from https://rubygems.org/........  Fetching version metadata from https://rubygems.org/.  Fetching https://github.com/openaustralia/scraperwiki-ruby.git  Installing json 1.8.3 with native extensions  Installing i18n 0.7.0  Installing minitest 5.9.0  Installing thread_safe 0.3.5  Installing unf_ext 0.0.7.1 with native extensions  Installing httpclient 2.6.0.1  Installing mime-types 2.5  Installing net-http-digest_auth 1.4  Installing net-http-persistent 2.9.4  Installing mini_portile2 2.1.0  Installing pkg-config 1.1.7  Installing ntlm-http 0.1.1  Installing webrobots 0.1.1  Installing sqlite3 1.3.10 with native extensions  Using bundler 1.13.7  Installing tzinfo 1.2.2  Installing rest-client 1.6.7  Installing nokogiri 1.6.8 with native extensions  Installing unf 0.1.4  Installing sqlite_magic 0.0.3  Installing domain_name 0.5.24  Using scraperwiki 3.0.1 from https://github.com/openaustralia/scraperwiki-ruby.git (at morph_defaults@fc50176)  Installing http-cookie 1.0.2  Installing activesupport 4.2.7.1  Installing mechanize 2.7.3  Bundle complete! 7 Gemfile dependencies, 25 gems now installed.  Gems in the groups development and test were not installed.  Bundled gems are installed into ./vendor/bundle.  Bundle completed (33.43s)  Cleaning up the bundler cache. -----> Detecting rake tasks   ###### WARNING:  You have not declared a Ruby version in your Gemfile.  To set your Ruby version add this line to your Gemfile:  ruby '2.2.6'  # See https://devcenter.heroku.com/articles/ruby-versions for more information.   -----> Discovering process types  Procfile declares types -> scraper Injecting scraper and running... In live mode, this will post to Slack and save to the db Check if it has collected data in the last fortnight "I’ve already spoken to the team this fortnight"

Data

Downloaded 0 times

To download data sign in with GitHub

Download table (as CSV) Download SQLite database (6 KB) Use the API

rows 10 / 11

date_posted text
2017-04-04
63 new requests were made through Right To Know last fortnight :saxophone: Our contributors helped people with 32 annotations :heartbeat: 20 requests were marked successful! :trophy:
2017-04-18
80 new requests were made through Right To Know last fortnight :saxophone: Our contributors helped people with 18 annotations :heartbeat: 8 requests were marked successful! :trophy:
2017-05-02
34 new requests were made through Right To Know last fortnight :saxophone: Our contributors helped people with 15 annotations :heartbeat: 10 requests were marked successful! :trophy:
2017-05-16
1228 new requests were made through Right To Know last fortnight :saxophone: Our contributors helped people with 30 annotations :heartbeat: 6 requests were marked successful! :trophy:
2017-05-31
58 new requests were made through Right To Know last fortnight :saxophone: Our contributors helped people with 22 annotations :heartbeat: 10 requests were marked successful! :trophy:
2017-06-14
36 new requests were made through Right To Know last fortnight :saxophone: Our contributors helped people with 20 annotations :heartbeat: 2 requests were marked successful! :trophy:
2017-06-28
39 new requests were made through Right To Know last fortnight :saxophone: Our contributors helped people with 23 annotations :heartbeat: 7 requests were marked successful! :trophy:
2017-07-12
36 new requests were made through Right To Know last fortnight :saxophone: Our contributors helped people with 22 annotations :heartbeat: 3 requests were marked successful! :trophy:
2017-07-28
29 new requests were made through Right To Know last fortnight :saxophone: Our contributors helped people with 21 annotations :heartbeat: 3 requests were marked successful! :trophy:
2017-08-11
27 new requests were made through Right To Know last fortnight :saxophone: Our contributors helped people with 14 annotations :heartbeat: 7 requests were marked successful! :trophy:

Statistics

Average successful run time: less than a minute

Total run time: about 3 hours

Total cpu time used: 4 minutes

Total disk space used: 132 KB

History

  • Auto ran revision b07a1db3 and completed successfully .
    nothing changed in the database
  • Auto ran revision b07a1db3 and completed successfully .
    nothing changed in the database
  • Auto ran revision b07a1db3 and completed successfully .
    nothing changed in the database
  • Auto ran revision b07a1db3 and completed successfully .
    nothing changed in the database
  • Auto ran revision b07a1db3 and completed successfully .
    nothing changed in the database
  • ...
  • Created on morph.io

Show complete history

Scraper code

Ruby

jacaranda-righttoknow / scraper.rb