Skip to content

Data enrichment API: spatial join enrichment with demographic, POI, and boundary datasets #374

@mikemcdougall

Description

@mikemcdougall

Context

CARTO's Data Observatory charges heavily for "enrich your data with third-party datasets." The pattern is simple: input features + enrichment dataset → output enriched features. Examples:

  • "Add census demographics (income, population, education) to my store locations"
  • "Count POIs within 500m of each parcel"
  • "Assign administrative boundary names to GPS tracks"

This is also a revenue opportunity — partner with data providers or bundle open data.

Scope

Core Operation

  • Enrich endpoint: POST /api/enrich
    • Input: source features (layer reference or inline GeoJSON)
    • Enrichment dataset: target layer or catalog dataset
    • Method: point-in-polygon, nearest neighbor, within distance, intersects
    • Output fields: selected attributes from enrichment dataset
    • Aggregation: count, sum, avg, min, max within spatial join

Data Catalog

  • Bundled open datasets (Community):
    • Administrative boundaries (country, state/province, county — Natural Earth)
    • Timezone boundaries
    • Coordinate reference grids
  • Premium data catalog (Pro/Enterprise):
    • Census demographics (ACS, Census boundaries)
    • Points of interest (OpenStreetMap extract)
    • Land use / land cover
    • Road network attributes
    • Custom organizational datasets registered as enrichment sources

Enrichment Methods

  • Point-in-polygon: point features get attributes from containing polygon
  • Nearest neighbor: features get attributes from N nearest features in target
  • Buffer + aggregate: features get aggregated stats from features within radius
  • Intersection: polygon features get weighted attributes from overlapping polygons

Batch + Streaming

  • Synchronous enrichment for small feature sets (<1000)
  • Async job for large batch enrichment
  • CDC-triggered enrichment: auto-enrich new features as they're created

Edition Gating

  • Community: enrichment with user's own layers (spatial join as API)
  • Pro: bundled open datasets, batch enrichment, CDC-triggered enrichment
  • Enterprise: premium data catalog, custom enrichment source registration

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/serverCore server (protocols, query, edits)edition/proPro edition featureeffort/XL🌲 XL: 2-4 days (major system change, architecture impact)enhancementNew feature or requestphase/GAGA scopepriority/P3📋 Low priority - nice to have in phase, can be deferred

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions