Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 3.08 KB

File metadata and controls

50 lines (37 loc) · 3.08 KB

PlanScore Command-Line Client

Simple client for interacting with PlanScore’s experimental web API.

Install

PlanScore CLI is available from Python’s package index:

pip install PlanScore-CLI

Run

Score a single plan:

planscore-client <API token> <Input GeoJSON> <Output JSON>

See API Sample Request for details on input GeoJSON formating, API Sample Response index_url for details on output JSON content. Please contact info@planscore.org to request an API token.

Advanced Use

Score many plans in parallel with GNU Parallel (documentation). Example plans in ok-example have been exported from Dave’s Redistricting App samples linked from Oklahoma Senate Redistricting Page on April 27, 2021.

parallel planscore-client <API token> '{}' '{//}/score-{/.}.json' \
    ::: `ls -1 ok-example/*geojson`

The command above will generate ok-example/score-* files such as this one. Each score will also be visible as a public PlanScore result page like the ones below.