{"id":21297495,"url":"https://github.com/fvdm/nodejs-planetos","last_synced_at":"2026-05-17T13:33:05.496Z","repository":{"id":48589837,"uuid":"53986376","full_name":"fvdm/nodejs-planetos","owner":"fvdm","description":"Access the Planet OS API with your Node.js app (unofficial)","archived":false,"fork":false,"pushed_at":"2021-10-22T15:51:07.000Z","size":51,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-02-19T12:54:58.371Z","etag":null,"topics":["api-client","dataset","earth","nodejs","planetos","statistics","unlicense"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/planetos","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fvdm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-15T23:40:39.000Z","updated_at":"2022-02-03T13:38:04.000Z","dependencies_parsed_at":"2022-08-27T11:12:01.242Z","dependency_job_id":null,"html_url":"https://github.com/fvdm/nodejs-planetos","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdm%2Fnodejs-planetos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdm%2Fnodejs-planetos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdm%2Fnodejs-planetos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdm%2Fnodejs-planetos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fvdm","download_url":"https://codeload.github.com/fvdm/nodejs-planetos/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243765697,"owners_count":20344648,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","dataset","earth","nodejs","planetos","statistics","unlicense"],"created_at":"2024-11-21T14:37:44.729Z","updated_at":"2026-05-17T13:33:05.490Z","avatar_url":"https://github.com/fvdm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"planetos\n========\n\nAccess the Planet OS API with your Node.js app.\n\n[![npm](https://img.shields.io/npm/v/planetos.svg?maxAge=3600)](https://github.com/fvdm/nodejs-planetos/blob/master/CHANGELOG.md)\n[![Build Status](https://travis-ci.org/fvdm/nodejs-planetos.svg?branch=master)](https://travis-ci.org/fvdm/nodejs-planetos)\n[![Coverage Status](https://coveralls.io/repos/github/fvdm/nodejs-planetos/badge.svg?branch=master)](https://coveralls.io/github/fvdm/nodejs-planetos?branch=master)\n\n\n* [Node.js](https://nodejs.org)\n* [Package on npm](https://www.npmjs.com/package/planetos)\n* [Planet OS](https://planetos.com)\n* [API documentation](http://data.planetos.com/guide/)\n\n\nExample\n-------\n\n```js\nconst planetos = require ('planetos') ({\n  apikey: 'abc123'\n});\n\n// NOAA Wave Watch 3 data\nconst params = {\n  lon: -50.5,\n  lat: 49.5,\n  count: 1,\n  context: 'reftime_time_lat_lon'\n};\n\nplanetos ('noaa_ww3_global_1.25x1d', params, console.log);\n```\n\n\nInstallation\n------------\n\nThis module requires an API key from Planet OS.\nYou can find it in your [account settings](http://data.planetos.com/account/settings/).\n\n`npm install planetos`\n\n\nConfiguration\n-------------\n\nThe module takes the following settings:\n\n\nparam    | type   | required | default   | description\n:--------|:-------|:---------|:----------|:---------------------\napikey   | string | yes      |           | Your API key\ntimeout  | number | no       | 5000      | Request timeout in ms\nendpoint | string | no       | Planet OS | Override default API endpoint (i.e. proxy)\n\n\n```js\nconst planetos = require ('planetos') ({\n  apikey: 'abc123',\n  timeout: 10000,\n  endpoint: 'https://my.proxy/http://data.planetos.com/v1'\n});\n```\n\n\nAPI call\n--------\n\nThe function takes these arguments:\n\n\nargument | type     | required | description\n:--------|:---------|:---------|:-------------------------\ndataset  | string   | yes      | Dataset name, i.e. `noaa_ww3_global_1.25x1d`\nparams   | object   | yes      | Dataset query parameters\ncallback | function | yes      | `function (err, data) {}`\n\n\n```js\n// Process results\nfunction myCallback (err, data) {\n  if (err) {\n    return console.log (err);\n  }\n\n  console.dir (data, {\n    depth: null,\n    colors: true\n  });\n}\n\n// Query parameters\nconst params = {\n  lon: -50.5,\n  lat: 49.5,\n  count: 1,\n  context: 'reftime_time_lat_lon'\n};\n\n// Request data from API\nplanetos ('noaa_ww3_global_1.25x1d', params, myCallback);\n```\n\n\n#### Output:\n\n```js\n{ stats: { maxCount: 61, offset: 0, count: 1 },\n  entries: \n   [ { context: 'reftime_time_lat_lon',\n       axes: \n        { reftime: '2016-03-17T18:00:00',\n          time: '2016-03-17T18:00:00',\n          longitude: -49.99999999999997,\n          latitude: 50 },\n       data: \n        { Wind_speed_surface: 5.519999980926514,\n          Wind_direction_from_which_blowing_surface: 288.3900146484375,\n          'v-component_of_wind_surface': -1.7400000095367432,\n          'u-component_of_wind_surface': 5.239999771118164,\n          Direction_of_wind_waves_surface: 72.16000366210938,\n          Primary_wave_mean_period_surface: 7.929999828338623,\n          Primary_wave_direction_surface: 81.6500015258789,\n          Significant_height_of_wind_waves_surface: 0.4399999976158142,\n          Mean_period_of_wind_waves_surface: 7.940000057220459,\n          Secondary_wave_mean_period_surface: 3.1500000953674316,\n          Significant_height_of_combined_wind_waves_and_swell_surface: 0.9700000286102295,\n          Secondary_wave_direction_surface: 259.6300048828125 } } ] }\n```\n\n\nUnlicense\n---------\n\nThis is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or\ndistribute this software, either in source code form or as a compiled\nbinary, for any purpose, commercial or non-commercial, and by any\nmeans.\n\nIn jurisdictions that recognize copyright laws, the author or authors\nof this software dedicate any and all copyright interest in the\nsoftware to the public domain. We make this dedication for the benefit\nof the public at large and to the detriment of our heirs and\nsuccessors. We intend this dedication to be an overt act of\nrelinquishment in perpetuity of all present and future rights to this\nsoftware under copyright law.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to \u003chttps://unlicense.org\u003e\n\n\nAuthor\n------\n\n[Franklin](https://frankl.in)\n| [Buy me a coffee](https://frankl.in/donating)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffvdm%2Fnodejs-planetos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffvdm%2Fnodejs-planetos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffvdm%2Fnodejs-planetos/lists"}