Giter Club home page Giter Club logo

gsl-parser's Introduction

gsl-parser

Parse GSL format ascii reports from https://rucsoundings.noaa.gov

pnpm install --save gsl-parser

then parse away! ๐ŸŽ‰

import parse from 'gsl-parser'

// fetch the ascii report from
// https://rucsoundings.noaa.gov/get_soundings.cgi
//
// documentation on parameters here:
// https://rucsoundings.noaa.gov/text_sounding_query_parameters.pdf

const data = parse(asciiReport)

console.log(data)

Example output

This project is 100% Typescript, which helps a lot! However, you can also check out the test fixtures.

Note: Units of measurement are a little non-trivial. (For example, temperature is measured in tenths of a degree celsius.) Check out the format docs for more.

Limitations

This parser is just tested with Op40 and GFS analyses at the moment. Other reports are untested. PRs welcome!

gsl-parser's People

Contributors

aeharding avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gsl-parser's Issues

src/index.ts:9:20 - error TS2304: Cannot find name 'asciiReport'

*I'm very new to TypeScript, so this might just be my oversight.

I'm trying to parse GSL formatted data with your parser. I understand the readme, however when using the example code in index.ts the command line doesn't quite understand the asciiReport variable. Is that supposed to be replaced with a txt file containing the GSL output from noaa.gov?

The code:

import parse from 'gsl-parser'

// fetch the ascii report from
// https://rucsoundings.noaa.gov/get_soundings.cgi
//
// documentation on parameters here:
// https://rucsoundings.noaa.gov/text_sounding_query_parameters.pdf

const data = parse(asciiReport)

console.log(data)

Command line output:

> [email protected] start
> npm run build && node dist/index.js


> [email protected] build
> npx tsc

src/index.ts:9:20 - error TS2304: Cannot find name 'asciiReport'.

9 const data = parse(asciiReport)
                     ~~~~~~~~~~~


Found 1 error in src/index.ts:9

I extend my sincere appreciation beforehand for any assistance you might offer in facilitating in helping me understand the parser's functionality.

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.