Coder Social home page Coder Social logo

cmr-exchange / cmr-graph Goto Github PK

View Code? Open in Web Editor NEW
1.0 6.0 2.0 9.92 MB

A service and API for querying graph-theoretic CMR metadata relationships

License: Apache License 2.0

Clojure 5.49% Shell 0.02% HTML 42.01% CSS 52.28% JavaScript 0.20%
cmr nasa graph-database neo4j cypher metadata earth earth-science earth-observation earth-data

cmr-graph's Introduction

cmr-graph

A service and API for querying CMR metadata relationships Build Status

Contents

About

This is an experimental project created as part of a 2-day Hackfest for improved relational data and discovery for NASA's Earthdata Search system. In particular, here we are exploring the use of graph databases and related indexing methodologies with the aim of helping users find out more about the Earth science data they care about.

Future explorations:

  • Apache TinkerPop
  • JanusGraph
  • Clojure Ogre

A separate "CMR Recommend" service that utilizes the graph database service to identify data sets the Earthdata Search user may be interested in.

Documentation

Dependencies

  • Java
  • lein
  • docker
  • docker-compose

Note that your Docker installation needs have at least 4GB of memory allocate to it in order for Elasticsearch and Kibana to run.

Quick Start

For an interactive environment:

$ lein start-infra

Note that Elasticsearch and Kibana used in this setup need 4GB of free space in Docker; be sure your settings have been updated to account for this.

Then, in another terminal:

$ lein repl
[cmr.graph.dev] λ=> (startup)

For a non-interactive environment:

$ lein start-infra

and:

$ lein start-cmr-graph

Ingesting Demo Data

If you want to exercise the movie demo portions of CMR Graph, you will need to ingest the movie data. In particular, once the infrastructure is up:

  1. Visit the Neo4j web console at http://localhost:7474/browser/.
  2. In the "Jump into code" box, click the "Write Code" button.
  3. In the new section that appears at the top of the page, click the "Create a Graph" button in the "Movie Graph" box.
  4. In the tutorial carousel that appears at the top of the page, click the right arrow.
  5. In the next frame of the carousel, there is a little "play" button at the top left of the code (right before the first CREATE statement): click it.
  6. A code section now appears at the top of the page with a "play" button at the far right: click it.

At this point, your instance of Neo4j should have the demo movie data.

Ingesting Collection Data

curl -i -XPOST http://localhost:3012/collections/import

Read More

Be sure to check out the "Guides" section below for links to more details on setup and use of CMR Graph.

Example Usage

For a quick taste of using CMR Graph, we've put a snippet of JavaScript code below, using the experimental CMR Client. See the links in the "Guides" section below for links to more detailed examples and other usage.

var client = cmr.client.graph.create_client({"return-body?": true});
var channel = cmr.client.graph.get_collection_url_relation(
	client, "C1276812863-GES_DISC");
cmr.client.common.util.with_callback(channel, function(data) {
  var formatted_output = JSON.stringify(data, null, 2);
  document.getElementById("data").innerHTML = formatted_output;
});

This does require a running CMR Graph system (Neo4j + CMR Graph REST server; follow the instructions above to start them up). If you have everything running, you can make that call in your web developer tools JavaScript console at:

Project Guides

Project Reference

Related Resources

License

Copyright © 2018 NASA

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

cmr-graph's People

Contributors

chris-durbin avatar eereiter avatar mschmele avatar oubiwann avatar ygliuvt avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cmr-graph's Issues

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.