Skip to content

CLI for spreading aggregated GeoJSON feature values into random points within intersecting polygons

License

Notifications You must be signed in to change notification settings

pjsier/aggspread

Repository files navigation

aggspread

Build status

A CLI tool based on Conveyal's aggregate-disser for spreading aggregated GeoJSON feature data throughout points inside overlapping spread features. An example would be distributing precinct-level election results into points within contained residential parcels.

Screenshot of voting results spread into parcels

Installation

If you have Go installed, you can run go get github.com/pjsier/aggspread to download the binary package and add it to your path.

There are also binaries available for MacOS, Windows and Linux.

Usage

Usage of aggspread:
  -agg string
        File including aggregated info or '-' to read from stdin (default "-")
  -output string
        Optional filename to write output or '-' to write to stdout (default "-")
  -prop string
        Aggregated property to spreads
  -spread string
        File to spread property throughout or '-' to read from stdin (default: value in 'agg')

Example

Convert a feature collection of voting precincts with a property indicating the number of votes into points spread throughout residential parcels within each precinct.

aggspread -agg precincts.geojson -prop votes -spread parcels.geojson -output output.csv

Contributing

See CONTRIBUTING.md

About

CLI for spreading aggregated GeoJSON feature values into random points within intersecting polygons

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •