Skip to main content

INFRA-COMPASS is a tool that leverages Large Language Models (LLMs) to create and maintain an inventory of state and local codes and ordinances applicable to energy infrastructure.

Project description

License Zenodo PythonV PyPI Ruff Pixi Static Badge

What is COMPASS?

COMPASS (formally the Infrastructure Continuous Ordinance Mapping for Planning and Siting Systems, or “INFRA-COMPASS”) is an innovative software tool that harnesses the power of Large Language Models (LLMs) to automate the compilation and continued maintenance of an inventory of state and local codes and ordinances pertaining to energy infrastructure.

At a high level, COMPASS does two things: it retrieves the right ordinance documents for each jurisdiction you ask about, and then extracts structured data from those documents into a versioned database that downstream users can query as a CSV, Excel workbook, or GeoPackage.

High-level overview of the INFRA-COMPASS pipeline

What makes COMPASS different from simply asking ChatGPT for ordinance data is the architecture around the LLM call:

  • Structured, downstream-ready output — consistent CSV rows with stable column names, units, and feature labels that drop straight into siting and capacity-modeling tools like reV, GIS workflows, or any pipeline that needs setbacks, height limits, and noise thresholds as numbers rather than prose.

  • Hallucination guardrails — cleaned text is checked against the source and dropped if it drifts too far, so fabricated values never reach the database.

  • Source-URL traceability — every record carries a URL back to the original ordinance document, so any value can be audited or spot-checked.

  • Cost control — cheap heuristic filters reject obviously irrelevant text before any LLM call runs, making it tractable to extract data across hundreds of jurisdictions.

Read more about the tool in the documentation.

Where is the extracted ordinance data?

The National Laboratories of the Rockies (NLR) typically runs the INFRA-COMPASS pipeline annually and publishes refreshed datasets to OpenEI. The latest published ordinance datasets are available here:

Installing COMPASS

The quickest way to install COMPASS for users is from PyPI:

pip install infra-compass

If you would like to install and run COMPASS from source, we recommend using pixi:

git clone git@github.com:NatLabRockies/COMPASS.git; cd COMPASS
pixi run compass

For detailed instructions and troubleshooting, see the installation documentation.

Quickstart

To run a quick COMPASS demo, set up a personal OpenAI API key and run:

pixi run openai-solar-demo <your API key>

This will run a full extraction pipeline for two counties using gpt-4o-mini (costs ~$0.45). For more information on configuring a COMPASS run, see the execution basics example.

Development

Please see the Development Guidelines if you wish to contribute code to this repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

infra_compass-0.18.3.tar.gz (658.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

infra_compass-0.18.3-py3-none-any.whl (680.2 kB view details)

Uploaded Python 3

File details

Details for the file infra_compass-0.18.3.tar.gz.

File metadata

  • Download URL: infra_compass-0.18.3.tar.gz
  • Upload date:
  • Size: 658.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for infra_compass-0.18.3.tar.gz
Algorithm Hash digest
SHA256 84eca662999a6fe0f6ecfe2f9ca1ef0f6dd9e44929061e664e4bb7900799ec7f
MD5 ed34f8a78d631133e424810ad35609ce
BLAKE2b-256 fa3100909a397feef27ebafeaee83ffa6af2c2c1c0b0cecee829add88f128589

See more details on using hashes here.

Provenance

The following attestation bundles were made for infra_compass-0.18.3.tar.gz:

Publisher: publish_to_pypi.yml on NatLabRockies/COMPASS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file infra_compass-0.18.3-py3-none-any.whl.

File metadata

  • Download URL: infra_compass-0.18.3-py3-none-any.whl
  • Upload date:
  • Size: 680.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for infra_compass-0.18.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b720aee9188f7607719e8d9887d3d3b422b7797f4cdbce4101fe7d1f4f3ef67a
MD5 2c7c265af62cd092653fd8c5dfb5a6fa
BLAKE2b-256 150f23cc2450054f8395fd786d73778db7cfb61f621905039c1e2b69e3f83378

See more details on using hashes here.

Provenance

The following attestation bundles were made for infra_compass-0.18.3-py3-none-any.whl:

Publisher: publish_to_pypi.yml on NatLabRockies/COMPASS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page