Metadata-Version: 2.4
Name: brails
Version: 4.2.0
Summary: BRAILS++: Building Regional Asset Inventories for Large Scale Simulation
Author-email: NHERI SimCenter <nheri-simcenter@berkeley.edu>
License: BSD-3-Clause
Classifier: Programming Language :: Python
Classifier: Development Status :: 5 - Production/Stable
Classifier: Natural Language :: English
Classifier: Environment :: Console
Classifier: Framework :: Jupyter
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: addict
Requires-Dist: Cython
Requires-Dist: ftfy
Requires-Dist: jsonschema
Requires-Dist: matplotlib
Requires-Dist: opencv-python
Requires-Dist: geopandas~=1.0
Requires-Dist: pandas
Requires-Dist: pillow
Requires-Dist: plotly
Requires-Dist: pycocotools
Requires-Dist: pyarrow
Requires-Dist: rasterio
Requires-Dist: reverse-geocode
Requires-Dist: requests
Requires-Dist: scikit-learn
Requires-Dist: seaborn
Requires-Dist: shapely
Requires-Dist: simcenter-pyncoda-fork==3.0.0.post1
Requires-Dist: supervision
Requires-Dist: numpy<2.0
Requires-Dist: timm
Requires-Dist: tensorboard
Requires-Dist: tensorboardX
Requires-Dist: torch<=2.5.0
Requires-Dist: torchvision<=0.20.0
Requires-Dist: transformers
Requires-Dist: wget
Requires-Dist: yacs
Requires-Dist: webcolors
Requires-Dist: yapf
Provides-Extra: development
Requires-Dist: flake8; extra == "development"
Requires-Dist: pylint; extra == "development"
Requires-Dist: black; extra == "development"
Requires-Dist: ruff==0.12.10; extra == "development"
Requires-Dist: codespell; extra == "development"
Requires-Dist: pytest; extra == "development"
Requires-Dist: pytest-cov; extra == "development"
Requires-Dist: pytest-mock; extra == "development"
Requires-Dist: jupyter; extra == "development"
Requires-Dist: jupytext; extra == "development"
Requires-Dist: sphinx; extra == "development"
Requires-Dist: sphinx-autoapi; extra == "development"
Requires-Dist: nbsphinx; extra == "development"
Requires-Dist: flake8-rst; extra == "development"
Requires-Dist: flake8-rst-docstrings; extra == "development"
Dynamic: license-file

# BRAILS++: Building Regional Asset Inventories for Large Scale Simulation

[![Tests](https://github.com/NHERI-SimCenter/BrailsPlusPlus/actions/workflows/tests.yml/badge.svg)](https://github.com/NHERI-SimCenter/BrailsPlusPlus/actions/workflows/tests.yml/badge.svg)
[![DOI](https://zenodo.org/badge/184673734.svg)](https://zenodo.org/badge/latestdoi/184673734)
[![PyPi version](https://badgen.net/pypi/v/BRAILS/)](https://pypi.org/project/BRAILS/)
[![PyPI download month](https://img.shields.io/pypi/dm/BRAILS.svg)](https://pypi.python.org/pypi/BRAILS/)

## What is it?

```BRAILS++``` is an object-oriented framework for building applications that focus on generating asset inventories for large geographic regions.


 BRAILS++ provides modular workflows for generating inventories by integrating diverse data sources, including public datasets, features extracted from imagery, and ruleset-based inference models.

![Brails Workflow](docs/brailsPlusPlus.png)

In BRAILS++, an asset inventory consists of geographically referenced points, line-strings, or polygons, each annotated with key attributes. To build these inventories, the data scrapers in BRAILS++ interact with web servers to create an inventory blueprint suitable as a starting point for regional-scale analysis. Example datasets accessed through BRAILS++ include FEMA’s USA Structures (FEMA, 2022), Microsoft Footprints (Microsoft, 2022), Overture Maps (Overture Maps Foundation, 2023), OpenStreetMap (OpenStreetMap contributors, 2017), the U.S. Army Corps of Engineer’s NSI, TIGER/Line roadway data (U.S. Census Bureau, 2024), FHWA’s National Bridge and Tunnel Inventories (FHWA, 2023; FHWA, 2024), ASCE REST services for design loads (ASCE, 2025), and HIFLD infrastructure data (U.S. Department of Homeland Security, 2024).

Despite their value, these datasets often contain incomplete or inconsistent information, requiring further enhancement to address the corresponding uncertainties. BRAILS++ incorporates methods for handling missing data and enhancing the available datasets through modules that enable: 1) feature extraction from publicly available images, e.g. Google Street View; 2) inventory merging to integrate metadata from various sources and resolve inconsisties, such as differening metadata values or spatial issues e.g. misaligned footprints ; 3) statistical imputation to generate pluasable inventories with all features defined for all assets given some assets will have missing features and finally 4) data inference to add asset attributes for which no information exists in the inventory, e.g. building codes applicable at the time of construction can be used to infer typical connection details (Kijewski-Correa et al., 2022) such as roof-to-wall connections for wind vulnerability assessments.


## How is the repo laid out?

+ ```brails```: A directory containing the classes
  - ```brails/types```: directory containing useful datatypes, e.g., ```ImageSet``` and ```AssetInventory```
  - ```brails/processors```: directory containing classes that do ```image_processing``` to make predictions, e.g. RoofShape
  - ```brails/scrapers```: directory containing classes that do internet downloads, e.g., footprint and image scrapers.
  - ```brails/filters```: directory containing image filters, e.g., classes that take images and revise or filter out unnecessary portions of images.
  - ```brails/aggregators```: directory containing classes for doing merge, join and allocation operations, e.g., combining data from different datasets (inventories or other) to create a single inventory.  
  - ```brails/imputers```: directory containing classes that fill in missing ```AssetInventory``` datasets, i.e., filling in features that are missing in certain Assets of the AssetInventory.
  - ```brails/inferers```: directory containing classes that infer new asset features based on existing features in the Assets of ```AssetInventory```.
  - ```brails/utils```: directory containing misc classes that do useful things, e.g. geometric conversions
+ ```examples```: A directory containing example scripts and Jupyter notebooks
+ ```tests```: A directory containing unit tests. The directory structure follows that of ```brails```

## Quick Links

- [Documentation & Guides](https://nheri-simcenter.github.io/BrailsPlusPlus/)

## Installation

   ```
   pip install brails
   ```

> **Note**  
> To install the package from GitHub, run:
>
> ```shell
> pip install git+https://github.com/NHERI-SimCenter/BrailsPlusPlus
> ```
>  If it's already installed and you want to update:
>
> ```shell
> pip install --upgrade git+https://github.com/NHERI-SimCenter/BrailsPlusPlus
> ```      


## Acknowledgments

This work is based on material supported by the National Science Foundation under grants CMMI 1612843 and CMMI 2131111.

## Contributors

Want to see who made this possible? Check out the full list of contributors [here](./contributors.md).

## Contact

NHERI-SimCenter nheri-simcenter@berkeley.edu

<!-- todo: instructions on how to lint the code, and specific subfolder or file. -->
<!-- todo: example with the test suite. -->
<!-- todo: instructions on how to run the tests -->
<!-- todo: instructions on how to check coverage -->
<!-- python -m pytest tests --cov=brails --cov-report html -->
