Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stevage/sheets2geojson
Convert a Google Sheet to GeoJSON
https://github.com/stevage/sheets2geojson
Last synced: 29 days ago
JSON representation
Convert a Google Sheet to GeoJSON
- Host: GitHub
- URL: https://github.com/stevage/sheets2geojson
- Owner: stevage
- Created: 2019-12-18T05:45:23.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-18T05:48:39.000Z (almost 5 years ago)
- Last Synced: 2024-10-10T15:10:07.533Z (about 1 month ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## sheets2geojson
Purpose: fetches a single published Google Sheet and converts it to a GeoJSON of points.
To prepare the Google Sheet:
1. Format it with a Latitude and Longitude column, plus any other columns
2. Under File, select "Publish to Web", then publish as CSV.
3. Copy the URL, and keep just the ID part (no slashes, just letters and numbers)To call:
```js
import { sheets2geojson } from 'sheets2geojson';
const geojson = await sheets2geojson(id, /* optional */{ latitudeColumn: 'lat', longitudeColumn: 'lng' });
```