Git Product home page Git Product logo

cdms-jpl-api's Introduction

Getting Started

Get information from the JPL and CDMS databases by molecule tag.

To obtain data by single molecule tag, use the following code:

import axios from 'axios';
import { JPL, CDMS } from 'cdms-jpl-api';

// usage example
// first obtain the url data either by using node-fetch or axios or any other library to fetch the HTML data

// fetching HTML data from CDMS

const cdms_tag = '003501' // for HD
const cdms_url = `https://cdms.astro.uni-koeln.de/cgi-bin/cdmsinfo?file=e${tag}.cat`;
const res = await axios.get(cdms_url);
const res = await axios.get(cdms_url);
const html_data = res.data;
const parsed_informations = await CDMS(jpl_html);

// similiar approach for JPL but use the corresponsing URL
const jpl_tag = '3001' // for HD
const jpl_url = `https://spec.jpl.nasa.gov/ftp/pub/catalog/doc/d${jpl_tag}.cat`;

To obtain the full data table from the JPL and CDMS databases, use the following code:

import { parse_cdms_data, parse_jpl_data } from 'cdms-jpl-api';

const cdms_html = await fetch_data_from_url('CDMS');
const cdms_data = await parse_cdms_data(cdms_html);

License

MIT

cdms-jpl-api's People

Contributors

aravindhnivas avatar

Watchers

 avatar

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.