JSPM

dot-density

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q41384F
  • License MIT

Input population regions (geojson polygons), output dot-density (geojson points)

Package Exports

  • dot-density

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (dot-density) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

js-standard-style

API

FeaturePopulationCallback

Parameters

  • feature Feature A geojson feature
  • data
  • options

Returns Number The feature's population

index

Produce dot density from population polygons

Parameters

  • data Feature or FeatureCollection an input
  • options object
    • options.population String or FeaturePopulationCallback the property key or accessor function providing each feature's population.
    • options.sampleRate [number] Number of dots per person (optional, default 1)

Examples

var square = require('square')
square(5)

Returns FeatureCollection A dot density FeatureCollection