Git Product home page Git Product logo

bartoc.org's People

Contributors

cthoyt avatar davidbrohrer avatar montybitto avatar nichtich avatar rwalkerands avatar sarndt-tib avatar schuchaa avatar stefandesu avatar umab7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bartoc.org's Issues

Implement creation of new vocabularies

Requires a method to mint a new URI. Best solution so far might be

  • either an input field
  • or mint a number above 20.000 + total number of entries in BARTOC, this is save (number availabe in X-Total header or stats)

Link Format and Access to local instance

Format and Access types are shown with their global BARTOC URI but the links should be turned into local links to keep browsing in the current instance. Should be solved together with #29.

Better propagate FAIR vocabularies

BARTOC should allow to filter for FAIR vocabularies. This requires

  • findable documentation
  • known license
  • resolvable globally unique and persistent identifiers

Open questions: does a FAIR vocabulary require resolvable URIs or is it possible to have other means of resolving (e.g. lookup in the documentation). Is machine-readable vocabulary content a requirement for a FAIR vocabulary? Without more clear definition of FAIR is its hard to get the information about FAIRness into BARTOC. By now we collect information about;

  • Access ("Licensed", "Registered" and "Free")
  • Link (Homepage URL)
  • License

Is this enough to decide whether a vocabulary is FAIR?

Create daily statistics

A lot of statistics (growth over time, vocabularies by country etc...) can be generated from the daily dumps. What kind of statistics are useful?

  • total number of vocabularies
  • number of vocabularies by type
  • number of vocabularies by API type
  • ...

Show topic labels for DDC, EuroVoc and ILC

By now topics (DDC and EuroVoc) are only shown with their URI. For client-side rendering we might use cocoda-sdk (when gbv/cocoda-sdk#15 has been implemented). For more reliable access we should import DDC, EuroVoc and ILC into the bartoc jskos-server instance.

Infere MARC field

Could be done with a bot or as part of the edit form:

var locid = (scheme.identifier||[]).find(id => id.startsWith("http://id.loc.gov/vocabulary/classSchemes/"))
if (locid && !scheme.MARCSPEC) {
  scheme.MARCSPEC = '084{$2='+locid.substr(42)+'}'
}

Cache vocabulary data

For more flexible querying its seems better to cache vocabularies in a jskos-server instance (or in a flat file) instead of passing all queries to DANTE API.

`npm run cache` gets stuck on jskos-validate

❯ npm run cache

> [email protected] cache /Users/stefan/repos/gbv/bartoc.org
> mkdir -p cache; npm run cache:nkostype; cd bin; make


> [email protected] cache:nkostype /Users/stefan/repos/gbv/bartoc.org
> curl http://api.dante.gbv.de/voc/nkostype/top | jq -c .[] > cache/nkostype.ndjson

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 16744    0 16744    0     0  61520      0 --:--:-- --:--:-- --:--:-- 61558
./vocabularies2jskos.pl < ../data/vocabularies-dump.ndjson > ../cache/vocabularies.ndjson
npm run validate -- -v scheme 

> [email protected] validate /Users/stefan/repos/gbv/bartoc.org
> jskos-validate "-v" "scheme"

The script gets stuck here indefinitely.

Provide daily database dumps and document at /download

The full list of vocabularies can be accessed via JSKOS API (with limit large enough). Nevertheless we should provide daily dumps, also to better track changes. There could be a latest pointer and old dumps kept only when something was changed. Dumps should also be normalized and sorted by URI.

curl 'http://localhost:3883/api/voc?limit=5000' | jq -cS 'sort_by(.uri)|.[]' > latest.ndjson

remove /cache

licenses and nkostypes should be retrieved when the server is started instead of having to run an initialization step before.

Show links to Wikipedia articles

Drual-based implementation, should be changed to Vue

/**
* Get Wikidata URI, query corresponding Wikipedia links and inject into page.
*/
(function ($) {
"use strict";
// get Wikidata URI
var item = $('.field-name-field-wikidata a[href^="http://www.wikidata.org/entity/"]').attr('href');
// inject list of sitelinks into HTML page
function inject_sitelinks(links) {
if (!$.isArray(links) || !links.length) return;
var fieldName = 'field-name-field-wikipedia-urls';
$('.field-name-field-wikidata').after('<div class="field '+fieldName+' field-type-taxonomy-term-reference field-label-inline clearfix"></div>');
$('.'+fieldName).append('<div class="field-label">Wikipedia: </div');
$('.'+fieldName).append('<div class="field-items"></div');
$.each(links, function(i, link){
var url = link.url;
var lang = link.lang;
var parity = i % 2 ? 'even' : 'odd';
$('.'+fieldName+' > .field-items').append('<div class="field-item '+parity+'"><a href="'+url+'" class="ext" target="_blank">'+lang+'</a></div>');
$('.'+fieldName+' > .field-items > .field-item > a').css({'color':'#3F5E70','border':'1px solid #3F5E70','background':'#FFF'});
});
};
// perform query
var api = "https://query.wikidata.org/bigdata/namespace/wdq/sparql";
var sparql = "PREFIX schema: <http://schema.org/>\n"
+ "SELECT * { ?url schema:about <"+item+">; schema:inLanguage ?lang }";
$.ajax({
url: api,
data: { format: 'json', query: sparql },
success: function(data) {
inject_sitelinks(
$.map(data.results.bindings, function(row) {
return { url: row.url.value, lang: row.lang.value }
})
);
},
});
// TODO (MAYBE): nicer links
// - get names of projects via
// https://www.wikidata.org/w/api.php?action=sitematrix
// - get names of languages (how?)
})(jQuery);

DDC Main classes

Have URLs such as

/en/DDC-Class/Arts-and-Recreation
/en/DDC-Class/General-works-Computer-science-and-Information
/en/DDC-Class/History-and-Geography
/en/DDC-Class/Language
/en/DDC-Class/Literature
/en/DDC-Class/Pure-Science
/en/DDC-Class/Social-sciences
/en/DDC-Class/Technology

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.