Skip to main content

TExt Analytics for Reconnaissance.

Project description

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

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

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

tear-0.0.1.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tear-0.0.1-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file tear-0.0.1.tar.gz.

File metadata

  • Download URL: tear-0.0.1.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for tear-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1ccb691eece1ad84fe14e87ff743de129d863d3c50bed235f695cd678b640a68
MD5 b72a0a93f356107b6ccb44aaeafa5b82
BLAKE2b-256 8e9a466ed300569bc5394762ab10d57f4d4609ee08c33f2af8ea79f2989f4315

See more details on using hashes here.

File details

Details for the file tear-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: tear-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for tear-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e1833506ecf72b3ff3d166f7f8c90b8354b3da6fa721f37f0cdb0992c74cf123
MD5 173f4df7a7497811601203dc560864bf
BLAKE2b-256 38762081900aeef0ab839ae0a9a135747fa2b2bab2cff1d35140849ae98a851d

See more details on using hashes here.

Supported by

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