Giter Site home page Giter Site logo

hbz / elag2019-bootcamp Goto Github PK

View Code? Open in Web Editor NEW
2.0 5.0 1.0 9.19 MB

From LOD to LOUD: building and using JSON-LD APIs (ELAG 2019 Bootcamp)

Home Page: https://hbz.github.io/elag2019-bootcamp/

License: Creative Commons Attribution 4.0 International

Dockerfile 0.44% CSS 29.31% HTML 25.36% Shell 0.31% JavaScript 40.15% SCSS 4.45%

elag2019-bootcamp's Introduction

ELAG 2019 Bootcamp

From LOD to LOUD: building and using JSON-LD APIs

https://www.elag2019.de/bootcamps.html#loud

Expected time slot: 6 hours

Audience: librarians and developers working with linked open data

Expertise: basic command line and text editor usage

Required: Laptop running VirtualBox. Before the workshop we will publish detailed installation instructions and at the bootcamp we will provide a fully configured virtual machine.

Programming experience: Not required but helpful

Linked Open Usable Data (LOUD) extends Linked Open Data (LOD) by focussing on use cases, being as simple as possible, and providing developer friendly web APIs with JSON-LD. This bootcamp will introduce you to the basic concepts of LOUD, web APIs, and JSON-LD. You'll learn how to publish and document data as LOUD, and how to use that data in different contexts. In this bootcamp, we will:

  • Convert RDF data into usable JSON-LD
  • Index and query the data with Elasticsearch
  • Create a simple web application using the data
  • Visualize the data with Kibana
  • Document the data with Hypothesis annotations
  • Use the data with OpenRefine

Setup

There are three options:

  1. Install all tools locally into your own operating system (OS)
  2. Install VirtualBox and use the virtual machine we provide
  3. Use Docker (thanks @EnnoMeijers & @mjtecka)

Local installation

With sample commands for Debian-based Linux systems, follow links for others.

Basic tools

Install git:

sudo apt install git

Install cURL:

sudo apt install curl

Install jq:

sudo apt install jq

Node.js

Install node (8.x or higher):

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -

sudo apt install -y nodejs

jsonld-cli

Install the hbz jsonld-cli fork:

git clone https://github.com/hbz/jsonld-cli.git

cd jsonld-cli

sudo npm install -g

For details, see the setup instructions.

Elasticsearch

Install Elasticsearch 6.x:

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

sudo apt install apt-transport-https

echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list

sudo apt update && sudo apt install elasticsearch

sudo -i service elasticsearch start

Wait a few seconds for Elasticsearch to start up, then open http://localhost:9200/ to verify Elasticsearch is running.

OpenRefine

See http://openrefine.org/download.html

Then start it:

cd openrefine-3.1/; ./refine

Kibana

Install Kibana:

sudo apt-get install kibana

sudo -i service kibana start

Wait a few seconds for Kibana to start up, then open http://localhost:5601 to verify Kibana is running.

Repository

Clone the repo:

git clone https://github.com/hbz/elag2019-bootcamp.git

Go to the repo:

cd elag2019-bootcamp

Install dependencies:

npm install

(If this fails: sudo apt install g++ and try again)

Run the server (in js/app.js):

npm start

This will serve the local context at http://localhost:3000/context.json.

VirtualBox

As an alternative to the manual setup above, we provide a working environment for VirtualBox. VirtualBox is available for all OSes and allows to run a virtual computer in your own OS. The virtual machine provides every tool mentioned under "Local installation", set up as a Linux box.

Installation of VirtualBox

See: https://www.VirtualBox.org/wiki/Downloads

Start the box. If it doesn't come up with a GUI you may have to install the "virtualbox-qt" package.

Load the virtual machine into VirtualBox

Download the VirtualBox: http://labs.lobid.org/download/2019-elag-vm.zip (~ 3 GB). Make sure you've got around at least 9 GB free space).

Unpack:

unzip 2019-elag-vm.zip

Decompressing takes about 2 minutes, depending on your hardware. Start the VirtualBox.

To load the 2019-elag-vm into your VirtualBox, set it up in your VirtualBox:

  • Menu -> Machine -> Add...
  • Browse to the extracted folder and select the 2019-elag-vm.vbox file

When you are finished, a virtual machine should appear in the VirtualBox. Start the machine. A new window should appear with debian booting until you see the graphical login manager. If you get a "kernel panic" or "VT-x/AMD-V hardware acceleration is not available on your system" try to enable virtualization in your BIOS or EFI or read more about possible causes and solutions.

Configs of your virtual machine

The password for the user i is "12345".

Note: the keyboard-layout is preconfigured to English. If you want to change this to e.g. German type into the terminal: setxkbmap -layout de (to get a list of possible layouts: man xkeyboard-config)

The README.txt gives some useful notes, e.g. if you are using a different layout than the mentioned one, how to copy & paste etc, how to start services etc.: cat README.txt (or double click on the desktop's icon).

Docker

Install docker-compose:

sudo apt install docker-compose

(Or follow these instructions to install docker-compose and install docker)

Start the container:

sudo docker-compose up

In a new terminal, run a bash in the container:

sudo docker exec -it elag2019-bootcamp_elag2019-bootcamp_1 bash

Depending on your setup, your container might be called elag2019bootcamp_elag2019-bootcamp_1 or elag2019-bootcamp_elag2019-bootcamp_1. Check the output of the sudo docker-compose up command (first line, e.g. Starting elag2019bootcamp_elag2019-bootcamp_1 ...).

Services running in the container are available on the host (like Elasticsearch running on http://localhost:9200/).

elag2019-bootcamp's People

Contributors

acka47 avatar dr0i avatar ennomeijers avatar fsteeg avatar mpparsley avatar zuphilip avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

mpparsley

elag2019-bootcamp's Issues

Adjust slides

Going through the slides today and trying out most of the exercises, I noticed several things that have to be adjusted before the bootcamp:

Use library-related JSON API example

Copied from hbz/swib18-workshop#42.

@zuphilip after the SWIB18 workshop wrote via email:

Jetzt habe ich mir noch überlegt, was man alternativ zur GitHub-API
verwenden könnte; vielleicht wäre die Zotero-API interessant und
thematisch für Bibliotheken passend:

https://www.zotero.org/support/dev/web_api/v3/basics

Ich habe vor einiger Zeit hierzu einmal versucht ein Swagger-Interface
zu machen (nicht unbedingt überall vollständig):

https://zuphilip.github.io/swagger-ui/dist/

Meist bekommt man dann auch JSON als Antwort und die API ist m.E. gut
gemacht und bietet vielfältige Möglichkeiten an (aber da seid Ihr die
Spezialisten um dies besser zu beurteilen).

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.