Skip to main content

This version of code is refactored by Vedant Mathur

TAR Software Package Repository

Code combining preprocessing, data collection, training and inference to generate automated disaster reports.

Key Files

  • tar_main.py - File that consolidates relevant functions to produce a report
  • date2template* - Files that do different collectiong/processing of USGIS data to be added to the briefings
  • classifiers.py - Calls classifiers (regression, SVN, GAN, CNN) and runs a majority vote to determine the final classification for sentences according to 4 categories (buildings, infrastructure, resilience, other)
  • resilience_curve.py - Generates resilience curves, and calculates t0 and t1 (to calculate recovery time for disaster)
  • config.ini - Set of parameters to control briefing generation
  • data - Folder containing log of earthquakes, tweets and news articles

Usage

Generating a report

To generate a report, run

python -m tear

This will iterate through earthquakes listed in the earthquake log and output a report to the "reports" directory.

Generating a resilience curve

To do this, call the generateResilience function in resilience_curve.py. It takes the following parameters -

  • ruptureTime - Reference time to when the earthquake happened (e.g. 2021-02-24 02:05:59)
  • twitterFile - CSV with tweets for earthquake
  • keywords - keywords to filter tweets by

For example:

generateResilience("2021-02-24 02:05:59", "data/tweets/ArgentinaTweets.csv", ["electricity", "lights"])

Metadata

Release files for tear 0.0.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 tear 0.0.2
File Size Uploaded Provenance
tear-0.0.2.tar.gz 15.5 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 31.2 kB

Release files / tear-0.0.2.tar.gz

Download URL tear-0.0.2.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
95c87757511070a0bf69f2e0a0665fe0ae941c73ffab6a1879db5ac90a6ead2f
BLAKE2b-256 checksum
How to use checksums
887ed8e594b94f4c3bcf6be33cdef8a058b7a6c11ec6a56910060c4d270f1198
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.1

Release files / tear-0.0.2-py3-none-any.whl

Download URL tear-0.0.2-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e3fc0e19e8f97be4b320f09cc9ae64d1084e4b59b257431a13feb1572ff7581
BLAKE2b-256 checksum
How to use checksums
81e6ee6cf916a52a2166ad11a9427357bb41cb50d812f163922705a68510ddef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.1

Security for tear 0.0.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