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

For example:

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.2.tar.gz (15.5 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.2-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tear-0.0.2.tar.gz
  • Upload date:
  • Size: 15.5 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.2.tar.gz
Algorithm Hash digest
SHA256 95c87757511070a0bf69f2e0a0665fe0ae941c73ffab6a1879db5ac90a6ead2f
MD5 baa679a8d7b0c13569bceb64f1f7617b
BLAKE2b-256 887ed8e594b94f4c3bcf6be33cdef8a058b7a6c11ec6a56910060c4d270f1198

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tear-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6e3fc0e19e8f97be4b320f09cc9ae64d1084e4b59b257431a13feb1572ff7581
MD5 6beafa78b83ed03dfb3fc95eb70b30cb
BLAKE2b-256 81e6ee6cf916a52a2166ad11a9427357bb41cb50d812f163922705a68510ddef

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