Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
airtable-geojson
Advanced tools
Convert an Airtable table containing a Map App (aka Map Block) geocoded field into a GeoJSON FeatureCollection
Convert Airtable records into a GeoJSON FeatureCollection.
Given an Airtable configured with the Map App add-on (formerly the Map Block) this library can take the Airtable record result set (as returned by airtable.js) and transform it into a GeoJSON FeatureCollection suitable for mapping or other geospatial applications.
import Airtable from "airtable"
import { createFeatureCollection } from "airtable-geojson"
const apiKey = "secret"
const baseId = "app123xyz"
export const airtable = new Airtable({ apiKey })
export const myBase = airtable.base(baseId)
const records = await myBase("My table")
.select({
fields: ["Name", "Address", "Geocoder cache"],
})
.all()
const options = {
geocodedFieldName: "Geocoder cache",
}
const [features, errors] = createFeatureCollection(records, options)
This would result in features
looking something like:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"id": "rec1",
"geometry": {
"type": "Point",
"coordinates": [-73.932376, 40.772817]
},
"properties": {
"Name": "Foo",
"Address": "8-01 Astoria Blvd"
}
},
{
"type": "Feature",
"id": "rec2",
"geometry": {
"type": "Point",
"coordinates": [-73.914695, 40.7787318]
},
"properties": {
"Name": "Bar",
"Address": "24-20 Ditmars Blvd"
}
}
]
}
And any records whose geodata could not be decoded would be returned in the errors
object:
{
missingGeocodes: [
// Airtable records here
],
invalidGeocodes: [
// Airtable records here
]
}
FAQs
Convert an Airtable table containing a Map App (aka Map Block) geocoded field into a GeoJSON FeatureCollection
The npm package airtable-geojson receives a total of 1 weekly downloads. As such, airtable-geojson popularity was classified as not popular.
We found that airtable-geojson demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.