New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@flatfile/plugin-enrich-geocode

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flatfile/plugin-enrich-geocode

A Flatfile plugin for geocoding addresses using the Google Maps Geocoding API

  • 0.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
0
Weekly downloads
 
Created
Source

@flatfile/plugin-enrich-geocode

The @flatfile/plugin-enrich-geocode plugin for geocoding addresses using the Google Maps Geocoding API. This plugin enables automatic geocoding of addresses, reverse geocoding of coordinates, and enrichment of location data within your Flatfile imports.

Event Type: listener.on('commit:created')

Features

  • Forward geocoding: Convert addresses to latitude and longitude coordinates
  • Reverse geocoding: Convert latitude and longitude coordinates to formatted addresses
  • Automatic geocoding based on available data
  • Customizable field mapping
  • Error handling for invalid inputs and API errors
  • Extraction of additional location components (country, postal code)

Parameters

The enrichGeocode function accepts a configuration object with the following properties:

  • sheetSlug (string): The slug of the sheet containing address data. Default: "addresses"
  • addressField (string): The field name for the address input. Default: "address"
  • latitudeField (string): The field name for latitude. Default: "latitude"
  • longitudeField (string): The field name for longitude. Default: "longitude"
  • autoGeocode (boolean): Whether to automatically geocode records. Default: true

Installation

To install the plugin, use npm:

npm install @flatfile/plugin-enrich-geocode

Example Usage

import type { FlatfileListener } from "@flatfile/listener";
import enrichGeocode from "@flatfile/plugin-enrich-geocode";

export default function (listener: FlatfileListener) {
   listener.use(
      enrichGeocode(listener, {
         sheetSlug: 'customer_addresses',
         addressField: 'full_address',
         latitudeField: 'lat',
         longitudeField: 'lng'
      })
   );

   // ... rest of your Flatfile setup
}

Keywords

FAQs

Package last updated on 10 Jan 2025

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc