npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

jiskta

v0.5.0

Published

Node.js SDK for the Jiskta Climate Data API

Readme

jiskta

Node.js SDK for the Jiskta Climate Data API — query historical air quality data (NO₂, PM2.5, PM10, O₃) and ERA5 meteorological data via a simple async interface.

Install

npm install jiskta

No runtime dependencies — uses Node.js built-in https.

Authentication

Get your API key from jiskta.com/dashboard. You can pass it directly or set the JISKTA_API_KEY environment variable:

export JISKTA_API_KEY="sk_live_..."
import { JisktaClient } from "jiskta";

// From env var (recommended):
const client = new JisktaClient();

// Or explicitly:
const client = new JisktaClient("sk_live_...");

Quick start

import { JisktaClient } from "jiskta";

const client = new JisktaClient(); // reads JISKTA_API_KEY env var

// Daily NO₂ and PM2.5 over Paris in 2023
const { rows } = await client.query({
  lat: [48.7, 49.0],
  lon: [2.2, 2.5],
  start: "2023-01",
  end: "2023-12",
  variables: ["no2", "pm2p5"],
  aggregate: "daily",
});

console.log(rows[0]);
// { lat: 48.75, lon: 2.25, date: '2023-01-01', no2_mean: 12.34, pm2p5_mean: 8.21 }

CommonJS works too:

const { JisktaClient } = require("jiskta");

Point query

Pass a single number for lat/lon to query a single grid cell (~0.1° resolution):

const { rows } = await client.query({
  lat: 48.85,   // Central Paris — snaps to nearest 0.1° grid cell
  lon: 2.35,
  start: "2023-01",
  end: "2023-12",
  variables: ["no2"],
  aggregate: "monthly",
});

All options

const { rows, meta } = await client.query({
  lat: [lat_min, lat_max],   // bounding box  OR  single number for point query
  lon: [lon_min, lon_max],
  start: "YYYY-MM-DD",       // or "YYYY-MM"
  end:   "YYYY-MM-DD",
  variables: ["no2"],        // no2 | pm2p5 | pm10 | o3 | t2m | u10 | v10 | blh | tp
  aggregate: "daily",        // hourly | daily | monthly | annual
                             // area_hourly | area_daily | area_monthly
                             // diurnal | exceedance | percentile
  threshold: 40.0,           // µg/m³  — enables exceedance mode
  percentile: 95,            // 0–100  — enables percentile mode
});
console.log(meta.credits_remaining);

Summary statistics

const result = await client.stats({
  lat: [48.7, 49.0],
  lon: [2.2, 2.5],
  start: "2023-01",
  end: "2023-01",
  variables: ["no2"],
});
console.log(result.output);
// "Rows matched: 744\nMin: 5.2\nMax: 38.1\nAverage: 14.3"

Exceedance query

Count hours above a threshold (e.g. WHO NO₂ guideline of 25 µg/m³):

const { rows } = await client.query({
  lat: [48.7, 49.0],
  lon: [2.2, 2.5],
  start: "2023-01",
  end: "2023-12",
  variables: ["no2"],
  threshold: 25.0,
});
// [{ lat, lon, hours_above, total_hours, pct_above }, ...]

Error handling

import {
  JisktaClient,
  AuthError,
  InsufficientCreditsError,
  RateLimitError,
  JisktaError,
} from "jiskta";

try {
  const { rows } = await client.query({ ... });
} catch (err) {
  if (err instanceof AuthError) {
    console.error("Invalid API key");
  } else if (err instanceof InsufficientCreditsError) {
    console.error("Buy more credits at https://jiskta.com/pricing");
  } else if (err instanceof RateLimitError) {
    console.error("Server busy — retry later");
  } else if (err instanceof JisktaError) {
    console.error(`API error ${err.statusCode}: ${err.message}`);
  }
}

Client options

const client = new JisktaClient("sk_live_...", {
  baseUrl:    "https://api.jiskta.com",  // override for testing
  timeout:    60_000,                    // ms (default: 60 000)
  maxRetries: 3,                         // retries on 429 (default: 3)
});

Credits

Each query costs geo_tiles × months × variables credits.
1 credit ≈ €0.0015. Buy credits at jiskta.com/pricing.

License

MIT