GithubHelp home page GithubHelp logo

cmr-exchange / sample-data Goto Github PK

View Code? Open in Web Editor NEW
0.0 6.0 1.0 915 KB

Sample Data Files for the open source NASA Common Metadata Repository (CMR)

License: Apache License 2.0

Clojure 100.00%
cmr sample-data nasa testing testing-data support

sample-data's Introduction

cmr.sample-data

Build Status Dependencies Status Clojure Version Clojars Project Tag

Sample Data for the open source NASA Common Metadata Repository (CMR)

About the CMR

The Common Metadata Repository (CMR) is a high-performance, high-quality, continuously evolving metadata system that catalogs all data and service metadata records for the EOSDIS system and will be the authoritative management system for all EOSDIS metadata. These metadata records are registered, modified, discovered, and accessed through programmatic interfaces leveraging standard protocols and APIs.

Usage

Start the REPL:

$ lein repl

Sample data files have two general result types: they may either be returned as a file object or as the data stored in the file:

[cmr.sample-data.dev] λ=> (data/get-ges-disc-provider :obj)
#object[java.net.URL 0x6717aefa
  "file:/alt/home/oubiwann/lab/NASA/CMR/cmr-sample-data/resources/data/providers/GES_DISC.json"]
[cmr.sample-data.dev] λ=> (data/get-ges-disc-provider :data)
"{\n  \"provider-id\": \"GES_DISC\",\n  \"short-name\": \"GES_DISC\",\n  \"cmr-only\": true,\n
\"small\": true\n}\n"

Additionally, if the data stored in the file is JSON, you may have it parsed as JSON and converted Clojure's native data format, EDN:

[cmr.sample-data.dev] λ=> (pprint (data/get-ges-disc-provider [:json :edn]))
{:provider-id "GES_DISC",
 :short-name "GES_DISC",
 :cmr-only true,
 :small true}
nil

This particular sample data returns a JSON string (i.e., the :data option) by default, so you may call it with no options if that's what you need:

[cmr.sample-data.dev] λ=> (data/get-ges-disc-provider)
"{\n  \"provider-id\": \"GES_DISC\",\n  \"short-name\": \"GES_DISC\",\n  \"cmr-only\": true,\n
\"small\": true\n}\n"

The default data format returned is determined by how the CMR typically uses the data in question (i.e., what format it expects the data to be in).

For a full list of functions availble for accessing the sample data, refer to the cmr.sample-data.core source file (aliases to data in the cmr.sample-data.dev REPL namespace).

License

Copyright © 2017 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All Rights Reserved.

sample-data's People

Contributors

oubiwann avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sample-data'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.