Skip to main content

LES2 Logo

VERUS

Vulnerability Evaluation for Resilient Urban Systems

Python Jupyter Notebook OSMnx Folium Documentation DOI

Description

VERUS (Vulnerability Evaluation for Resilient Urban Systems) is a Python library for extracting points of interest from OpenStreetMap, clustering them based on spatial proximity and time-based vulnerability indices, and analyzing urban vulnerability patterns.

Documentation

Comprehensive documentation is available at https://les2feup.github.io/verus/

Publications

  • Bittencourt, J. C. N., Costa, D. G., Portugal, P., Peixoto, M. L. M., & Vasques, F. (2025). On the spatiotemporal knowledge-driven vulnerability assessment of urban areas: A clustering-based approach. International Journal of Disaster Risk Reduction, 127, 105681. https://doi.org/10.1016/j.ijdrr.2025.105681

Installation

pip install verus

Reproducing Results

The experiment notebooks read their inputs from data/. They use a continuous-occupancy time-window table (every category stays active between its peaks), a 100 m hexagonal grid and four scenarios, one per activity regime of the week (weekday morning rush, weekday late morning, weekday night, Saturday daytime):

To reproduce the results of the IJDRR article (2025), check out the git tag ijdrr-article, which has the article's notebooks, time windows and 250 m grid.

Basic Usage

from verus import VERUS
from verus.data import DataExtractor, TimeWindowGenerator
from verus.grid import HexagonGridGenerator

# Extract default urban data from OpenStreetMap
extractor = DataExtractor(region="Porto, Portugal")
poi_data = extractor.run()

# Define default time-based vulnerability scenarios
twg = TimeWindowGenerator(reference_date="2023-11-06")
time_windows = twg.generate_from_schedule()

# Generate analysis grid
grid = HexagonGridGenerator(region="Porto, Portugal", edge_length=250)
hex_grid = grid.run()

# Run vulnerability assessment
assessor = VERUS(place_name="Porto")

# Load extracted data
assessor.load(
    potis_df=poi_data,
    time_windows_dict=time_windows,
    zones_gdf=hex_grid,
)

# Perform assessment and get results
evaluation_time = twg.to_unix_epoch("2023-11-06 17:30:00")
results = assessor.run(evaluation_time=evaluation_time)

# Visualize results
map_obj = assessor.visualize()

# Save results to file
assessor.save("./results/porto/")

Features

  • Extract points of interest from OpenStreetMap for any city
  • Create hexagonal grid systems for spatial analysis
  • Implement OPTICS density-based clustering for identifying urban patterns
  • Apply K-means clustering with Haversine distance for geographic data
  • Generate time-dependent vulnerability assessments
  • Create interactive maps for visualization with folium
  • Export results in various formats (GeoJSON, CSV, HTML)

Contributions

Contributions are welcome! To contribute:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open a pull request

Please make sure to update tests and documentation as appropriate.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Research developed at the Laboratory of Emerging Smart Systems (LES2) at the Faculty of Engineering of University of Porto
  • This work was supported by the Associate Laboratory Advanced Production and Intelligent Systems – ARISE LA/P/0112/2020 (DOI 10.54499/LA/P/0112/2020), by the Base Funding (UIDB/00147/2020) and Programmatic Funding (UIDP/00147/2020) of the R&D Unit Center for Systems and Technologies -- SYSTEC, and by the Fundação para a Ciência e a Tecnologia (FCT) through the PhD scholarship (2024.02446.BD).

Metadata

Release files for verus 1.1.2

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

Source distribution (sdist)

Source distribution for verus 1.1.2
File Size Uploaded Provenance
verus-1.1.2.tar.gz 6.7 MB Without provenance Details

Built distribution (wheel)

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

Total release size: 7.3 MB

Release files / verus-1.1.2.tar.gz

Download URL verus-1.1.2.tar.gz
Size 6.7 MB
Tags Source
SHA-256 checksum
How to use checksums
d2fcfce2c9bbf5205396e93dfb4ef872b1c5abfb34e6520788340b4828019204
BLAKE2b-256 checksum
How to use checksums
538429f2be4eb21ddd46b1dd6e41f5974ab19f4b55fe6da5e130233c838ee1d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.21

Release files / verus-1.1.2-py3-none-any.whl

Download URL verus-1.1.2-py3-none-any.whl
Size 582.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1337600e6840a6eb45e81852cfca63d0b4aedf5c75387fd0416c5479bb40393
BLAKE2b-256 checksum
How to use checksums
01a08ae553f53f831ea69d8c0b5aae82572b524a488afeb3602d0ec062882a44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.21

Security for verus 1.1.2

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.

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