sheets2geojson
v0.0.4
Published
Fetch a published Google Sheet, convert to GeoJSON
Downloads
6
Readme
sheets2geojson
Purpose: fetches a single published Google Sheet and converts it to a GeoJSON of points.
To prepare the Google Sheet:
- Format it with a Latitude and Longitude column, plus any other columns
- Under File, select "Publish to Web", then publish as CSV.
- Copy the URL, and keep just the ID part (no slashes, just letters and numbers)
To call:
import { sheets2geojson } from 'sheets2geojson';
const geojson = await sheets2geojson(id, /* optional */{ latitudeColumn: 'lat', longitudeColumn: 'lng' });