GithubHelp home page GithubHelp logo

nextgeoss / ckanext-kpis Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 73 KB

A CKAN extension for monitoring KPIs related to the content and usage of a dataportal

Python 49.77% CSS 0.61% JavaScript 20.48% HTML 23.20% Shell 5.94%

ckanext-kpis's Introduction

https://travis-ci.org/NextGeoss/ckanext-kpis.svg?branch=master

ckanext-kpis

ckanext-kpis tracks and presents KPIs on a dedicated page.

Goals can be defined in the portal configuration file.

The goals/tracking currently supported are:

  1. Number of datasets, evaluated weekly
  2. Number of sources/harvesters, evaluated weekly
  3. Number of unique monthly users (of the website and of the API)

The extension is based on ckanext-stats, though most of the back end code is different now. The basic presentation on the front end remains much the same.

The extension replaces the CKAN core TrackingMiddleware with a modified version that also tracks API calls.

Requirements

ckanext-kpis works with CKAN version 2.6.x and up. There are no additional requirements.

Installation

To install ckanext-kpis, activate your CKAN virtualenv and do:

git clone https://github.com/nextgeoss/ckanext-kpis.git cd ckanext-kpis python setup.py develop

Config Settings

# Set the start date for displaying stats on the portal # (not the date on which tracking begins, but the earliest # date for which you want to display stats). # (Optional. Default value: the date of the first revision # in the CKAN database) # Format: YYYY/mm/dd ckanext.kpis.first_date = 2017/04/19

# By default, the KPI stats are displayed in a table. If this # setting is enabled, a graph of the stats will also be # displayed above each table. # (Optional. Default value: False) ckanext-kpis.show_graphs = True

# The goals for the total number of datasets, total number of # harvesters/sources and the number of monthly users can be # configured with a JSON dictionary. # (Optional. Default values: see exmple below) # Format: {"total_datasets": an_integer, "monthly_users": an_integer, "total_sources": an_integer} ckanext.kpis.goals={"total_datasets": 10000000, "monthly_users": 2000, "total_sources": 10}

ckanext-kpis's People

Contributors

kmbn avatar jgulic avatar

Watchers

James Cloos avatar  avatar

ckanext-kpis's Issues

Total Datasets -1

The number of Total Datasets in the kpis page in Total Datasets tab displays wrong number of datasets that are available in the portal

Dataset count includes 1) datasets that are private and 2) datasets that are deleted but have not yet been purged

The dataset count displayed by CKAN at {site_url}/dataset and anywhere else the count is derived in the same way only counts datasets that the user has the right to see. For example, the user is annonymous and there are 5 public and 5 private datasets, the count displayed will be 5. An admin user would see count == 10. The dataset count also (as one would expect) does not include datasets that are in the trash ({site_url}/ckan-admin/trash).

The dataset count for the KPIs just counts datasets created โ€“ datasets deleted, regardless of whether they're public or private or restricted to members of certain groups.

The dataset count for the KPIs also doesn't filter out datasets with status == deleted.

As a result, if there are 5 public and 5 private datasets with active status and 1 dataset (with deleted status (that still hasn't been purged):

  • An annonymous user would see 5 datasets on the site but see a total KPI dataset count of 11
  • An admin user would see 10 datasets on the site but see a total KPI dataset count of 11

Two questions:

  1. Should the KPI dataset count default to public datasets only, or public+private?
  2. How should we treat deleted-but-not purged and purged datasets? If we're really charting the weekly dataset count, then it should be possible to keep the count consistent as things change. For example, if the count is 10 in week 1 and 5 in week two because 5 datasets were deleted, we should see counts equal to 10 and 5, respectively. But if purging a dataset can remove it from the count entirely, then we might end up with counts equal to 5 and 5, respectively. The final count would be correct, but the picture of how we arrived at the final count would be wrong.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.