Coder Social home page Coder Social logo

defrost-consumer's Introduction

DeFROST raster extractor

Nodejs package to retrieve raster data from the DeFROST API.

Setup

Install Nodejs if not installed yet.

Install the package

clone https://github.com/markusand/defrost-consumer.git
cd defrost-consumer
npm install

Create a .env file with the API login credentials

DEFROST_USER=
DEFROST_PSWD=
DEFROST_CATCHMENT= (optional, defaults to 'andorra')

Launch the script passing the desired date(s) as single parameters, a date range or a combination of both.

Provide an optional catchment if not already set up in environment variables. Defaults to andorra.

Provide an optional type of raster sd, sce or swe. Defaults to sd.

Notice all dates must follow the YYYY-MM-DD format

node src/index.js 2022-01-06 2022-02-14 --catchment=andorra --type=sce

node src/index.js --from=2021-12-25 --until=2021-12-31

node src/index.js 2022-01-06 2022-02-14 --from=2021-12-25 --until=2021-12-31

Shorthand argument aliases are also available for convenience.

argument alias
--type=sd -t sd
--catchment=andorra -c andorra
--from=2022-01-01 -f 2022-01-01
--until=2022-01-06 -u 2022-01-06

Am npm start script is available for convenience as well.

npm start -- --from=2022-01-01 --until=2022-01-06

Notice the extra double dash -- that MUST be included after the npm start.

Output

Rasters will be stored in their correspondent subdirectory inside the images directory. All rasters in images can always be deleted, but not the directories themselves neither the .gitkeep files in them.

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.