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

a5-js

v0.7.0

Published

A5 - Global Pentagonal Geospatial Index

Readme

A5 - Global, equal-area, millimeter-accurate geospatial index

Website: A5Geo.org

Introduction

A5 is a geospatial index that partitions the world into pentagonal cells. The cells are available at 31 different resolution levels, with the largest cell covering the whole world, and the smallest less than 30mm². Within each resolution level the cells have equal area, as per the OGC definition.

A5 cells provide simple way to represent spatial data as a collection of cells, which together represent regions on the globe. These can be anything, from city districts to parcels of land. Once data is in a cell-based format, it becomes much simpler to perform analysis such as calculating the correlation between different variables - for example elevation and crop yield.

Cells can also be used to group (aggregate) point data, to understand how it spatially distributed. For example, the density of holiday rentals across a city.

To understand how it works, take a look at the Examples.

A5 is implemented in TypeScript and is available as a library, with API documentation here. It is open source and licensed under the Apache 2.0 License.

Benefits over alternative systems

Like other DGGSs, A5 can be used for indexing, spatial joins, and other spatial operations. The appropriate choice of DGGS will depend on the use case, the key strengths of A5 over other similar indexing systems are:

  • Equal area cells group spatial features without introducing bias.
  • Very high resolution of 30mm² at final resolution level, encoded as a 64-bit integer.
  • Single cell topology type, with minimal shape distortion across the globe.

Geometric Construction

DGGSs are generally based on a planar cell tiling which is applied to the sides of a platonic solid, before being projected onto a sphere.

A5 is unique in that it uses a pentagonal tiling of a dodecahedron. The pentagon chosen for the tiling is equilateral, but not regular - unlike other common DGGSs which use regular polygons, for example HTM uses triangles, S2 uses squares, and H3 uses hexagons.

The benefit of choosing a dodecahedron is that it is the platonic solid with the lowest vertex curvature, and by this measure it is the most spherical of all the platonic solids. This is key for minimizing cell distortion as the process of projecting a platonic solid onto a sphere involves warping the cell geometry to force the vertex curvature to approach zero. Thus, the lower the original vertex curvature, the less distortion will be introduced by the projection.