Skip to main content

A tool for extracting data from FERC XBRL Filings.

Project description

The Federal Energy Regulatory Commission (FERC) has moved to collecting and distributing data using XBRL. XBRL is primarily designed for financial reporting, and has been adopted by regulators in the US and other countries. Much of the tooling in the XBRL ecosystem is targeted towards filers, and rendering individual filings in a human readable way, but there is very little targeted towards accessing and analyzing large collections of filings. This tool is designed to provide that functionality for FERC XBRL data. Specifically, it can extract data from a set of XBRL filings, and write that data to a SQLite database whose structure is generated from an XBRL Taxonomy. While each XBRL instance contains a reference to a taxonomy, this tool requires a path to a single taxonomy that will be used to interpret all instances being processed. This means even if instances were created from different versions of a Taxonomy, the provided taxonomy will be used when processing all of these instances, so the output database will have a consistent structure. For more information on the technical details of the XBRL extraction, see the docs.

As of this point in time this tool is only tested with FERC Form 1, but is intended to extend support to other FERC forms. It is possible it could be used with non-FER taxonomies with some tweaking, but we do not provide any official support for non-FERC data.

Usage

Installation

To install using conda, run the following command, and activate the environment.

conda env create -f environment.yml

Activate:

conda activate ferc-xbrl-extract

CLI

This tool can be used as a library, as it is in PUDL, or there is a CLI provided for interacting with XBRL data. The only required options for the CLI are a path a single XBRL filing, or directory of XBRL filings, and a path to the SQLite database.

xbrl_extract {path_to_filings} {path_to_database}

By default, the CLI will use the 2022 version of the FERC Form 1 Taxonomy to create the structure of the output database. To specify a different taxonomy use the –taxonomy option.

xbrl_extract {path_to_filings} {path_to_database} --taxonomy {url_of_taxonomy}

Parsing XBRL filings can be a time consuming and CPU heavy task, so this tool implements some basic multiprocessing to speed this up. It uses a process pool to do this. There are two options for configuring the process pool, –batch-size and –workers. The batch size configures how many filings will be processed by each child process at a time, and workers specifies how many child processes to create in the pool. It may take some experimentation to get these options optimally configured.

xbrl_extract {path_to_filings} {path_to_database} --workers {number_of_processes} --batch-size {filings_per_batch}

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

catalystcoop.ferc_xbrl_extractor-0.2.1.tar.gz (28.0 MB view details)

Uploaded Source

Built Distribution

File details

Details for the file catalystcoop.ferc_xbrl_extractor-0.2.1.tar.gz.

File metadata

File hashes

Hashes for catalystcoop.ferc_xbrl_extractor-0.2.1.tar.gz
Algorithm Hash digest
SHA256 49468c4f8fc90ed3c07b007a3f8f27b30eb5b29f0019152e96651248f7c9ef2c
MD5 b0b21a1e3501d7502ca213dc17063717
BLAKE2b-256 4a01529535b8cc9640549c97cf5abdd6a0a7cfa499f0c36cae1ec6ad163ce7a1

See more details on using hashes here.

File details

Details for the file catalystcoop.ferc_xbrl_extractor-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for catalystcoop.ferc_xbrl_extractor-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 36f06962333d87137aaaa84d5e10cccd2f994da94f97331a1e6d65f3a92dd5d8
MD5 6c108fb97f89b4e01bc906599b36c21a
BLAKE2b-256 04f22bd328237c052c075f07d515cd631044ecc6825f72c2fc333a4797842a99

See more details on using hashes here.

Supported by

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