observable-framework-lib-shapefile

Installation
SKILL.md

Library: Shapefile

Observable Framework documentation: Library: Shapefile Source: https://observablehq.com/framework/lib-shapefile

The ESRI shapefile is a binary format for geometry. Shapefiles are often paired with dBASE table files for metadata. You can use the shapefile module to convert shapefiles to GeoJSON for use with libraries such as D3, Observable Plot, and Leaflet. To import the shapefile module:

import * as shapefile from "npm:shapefile";

Then, to read a .shp and .dbf file:

const collection = shapefile.read(
  ...(await Promise.all([
    FileAttachment("ne_110m_land/ne_110m_land.shp").stream(),
    FileAttachment("ne_110m_land/ne_110m_land.dbf").stream()
Related skills
Installs
3
First Seen
Feb 28, 2026
Security Audits