Skip to content

PlanScore/PlanScore-CLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 [email protected] 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published