Skip to main content

Overview

This project attempts to map the organization of the US Federal Government by gathering and consolidating information from various directories.

PyPI License PyPI Version PyPI Downloads

Current sources:

Each source is scraped (see out directory) in raw JSON format, including fields for the organizational unit name/parent (if any), unique ID/parent-ID fields (if the names are not unique) as well as any other attribute data for that organization available from that source.

A normalized name (still WIP) is then added, which corrects letter case, spacing and expands acronyms. Acronyms are selected and verified manually using data from USCD GovSpeak and the DOD Dictionary of Military and Associated Terms as well as manual entry when needed.

Each source is them imported into a tree and exported into the following formats for easy consumption:

  • Plain text tree
  • JSON flat format (with path to each element)
  • JSON nested tree format
  • CSV format (with embedded JSON attributes)
  • Wide CSV format (with flattened attributes)
  • DOT file (does not include attributes)
  • GEXF graph file (includes flattened attributes)
  • GraphQL graph file (includes flattened attributes)
  • Cytoscape.js JSON format (includes flattened attributes)

To merge the lists, each tree is merged into a selected base tree by comparing the normalized names of each node in the tree to the names of each node in the base tree using a fuzzy matching algorithm. Similarity scores between each pair of parents are incorporated into the score to more correctly identify cases where the same/similar office or program name is used for different organizations.

Note that the fuzzy matching is imperfect and may have some inaccurate mappings (although most appear OK) and will certainly have some entries which actually should be merged, but aren't.

The final merged dataset is written in the above formats to the data/merged directory.

Setup

Requirements

Installation

Check out this repository, then from the repository root, install dependencies:

$ poetry install

See command line usage:

poetry run allusgov --help

Run a complete scrape and merge:

poetry run allusgov

Metadata

Release files for allusgov 0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for allusgov 0.0
File Size Uploaded Provenance Actions
allusgov-0.0.tar.gz 424.3 kB Without provenance Details for allusgov-0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for allusgov 0.0
File Interpreter ABI Platform Actions
allusgov-0.0-py3-none-any.whl Python 3 none any Details for allusgov-0.0-py3-none-any.whl

Total release size: 856.6 kB

Release files / allusgov-0.0.tar.gz

Download URL allusgov-0.0.tar.gz
Size 424.3 kB
Tags Source
SHA-256 checksum
How to use checksums
61b30f67e940c86245e9e0cc283f1b8fdc3fd862e857928a9ee26c37173802af
BLAKE2b-256 checksum
How to use checksums
b53c49a19363563c76022891ef0bf89ce246dd4189e316d300b6049bdcfb2e36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / allusgov-0.0-py3-none-any.whl

Download URL allusgov-0.0-py3-none-any.whl
Size 432.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b256e2ca95f5165f0bc3a910b61a696db5b99bb3458e4f605053874671184f50
BLAKE2b-256 checksum
How to use checksums
0dd10ac8bd591070d67e81c3365d8a98ffc4e981f7fe21aa2c1ddc0a2159b4a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.3

Security for allusgov 0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page