OCHA-DAP / Data-Team

A place for tracking data team issues
0 stars 1 forks source link

Monitoring the number of sources for hardcoded number in CKAN #50

Closed JavierTeran closed 10 years ago

JavierTeran commented 10 years ago

Hi Javier,

You may remember that the total number of sources that appears on the ckan homepage can't (yet) be automatically generated. I've made a gdoc where we can keep a (rough) listing of the sources. Could the data team check it and add to it as you add sources? Just let us know when the number has changed significantly and we can update it on CKAN. After Warp Coil, we can look at automating based on metadata.

https://docs.google.com/spreadsheets/d/1-8DQ3hXijzSjN3xRn2AsXYddBGGIOaq1gD2A98Zc-fI/edit?usp=sharing

--cj

luiscape commented 10 years ago

Hi @JavierTeran and @cjhendrix the Gdoc idea seems great. I was wondering if we could use the number of sources available on CPS instead: http://test-manage.hdx.rwlabs.org/hdx/admin/curated/sources/ ?

luiscape commented 10 years ago

So, I noticed that the source is not being shown in the metadata part on CKAN. However, it is being registered in the database as you can see by querying the API:

http://test-data.hdx.rwlabs.org/api/3/action/package_show?id=number-of-uniformed-personnel-in-un-peacekeeping-operations


resources: [
{
resource_group_id: "74781d07-6abb-4393-a042-5ad50e7d8a99",
resource_uploader: "javier",
cache_last_updated: null,
revision_timestamp: "2014-05-07T19:32:10.535708",
webstore_last_updated: null,
id: "00355c72-1f86-48ec-8863-c6986ea316e0",
size: null,
caveats: "",
source: "DPKO",
state: "active",
hash: "",
description: "",
format: "xlsx",
tracking_summary: {
total: 0,
recent: 0
},
mimetype_inner: null,
mimetype: null,
cache_url: null,
name: "TCCs AND PCCs FOR UN PKO AS AT 31 MARCH 2014.xls",
created: "2014-05-07T19:32:10.556032",
url: "http://test-data.hdx.rwlabs.org/storage/f/2014-05-07T19%3A37%3A59.288Z/tccs-and-pccs-for-un-pko-as-at-31-march-2014.xls",
webstore_url: null,
last_modified: null,
position: 0,
revision_id: "373be0d3-83e3-4d3e-88d3-920c0bc8b9c5",
resource_type: "file.upload"
}

As you can see above, the source lists "DPKO". Would there be a way of calculating how many of those unique sources are there in using a series of API calls within CKAN?

luiscape commented 10 years ago

@cjhendrix Is this a CKAN UI feature?

JavierTeran commented 10 years ago

@cjhendrix I am closing this issue. The UI feature will be developed by the dev team.