brails.scrapers.nbi_scraper.nbi_scraper module

This module defines a class for retrieving bridge data from NBI.

NBIScraper([input_dict])

A class for scraping and processing National Bridge Inventory (NBI) data.

class brails.scrapers.nbi_scraper.nbi_scraper.NBIScraper(input_dict: Dict[str, Any] | None = None)

Bases: object

A class for scraping and processing National Bridge Inventory (NBI) data.

The class handles tasks such as fetching and processing bridge data, meshing the region into smaller cells for efficient data retrieval, and organizing the results into an AssetInventory.

Attributes:
length_unit (str):

The unit of length (default is ‘ft’).

inventory (AssetInventory):

An inventory object that holds the assets for this instance.

Methods:
get_assets(region: RegionBoundary) -> AssetInventory:

Retrieves bridge inventory data within a given region boundary, processes the data, and returns the inventory of assets.

get_assets(region: RegionBoundary) AssetInventory

Retrieve bridge inventory within a given region.

This method processes the region boundary, splits it into smaller cells, fetches the necessary bridge data for each cell, and returns the processed bridge asset inventory.

Args:
region (RegionBoundary):

A RegionBoundary object representing the geographic region for which to retrieve bridge inventory data.

Returns:
AssetInventory:

An AssetInventory object containing the bridge assets within the specified region.

Raises:
TypeError:

If the region argument is not an instance of the RegionBoundary class. The error message will indicate that the ‘region’ argument must be an instance of the RegionBoundary class.