esi-utils-pager


Nameesi-utils-pager JSON
Version 1.1.12 PyPI version JSON
download
home_pageNone
SummaryUSGS PAGER loss modeling functionality
upload_time2024-04-30 15:41:41
maintainerNone
docs_urlNone
authorNone
requires_python<=3.10
licenseLicense ======= Unless otherwise noted, This project is in the public domain in the United States because it contains materials that originally came from the United States Geological Survey, an agency of the United States Department of Interior. For more information, see the official USGS copyright policy at https://www2.usgs.gov/visual-id/credit_usgs.html#copyright Additionally, we waive copyright and related rights in the work worldwide through the CC0 1.0 Universal public domain dedication. CC0 1.0 Universal Summary ------------------------- This is a human-readable summary of the [Legal Code (read the full text)][1]. ### No Copyright The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission. ### Other Information In no way are the patent or trademark rights of any person affected by CC0, nor are the rights that other persons may have in the work or in how the work is used, such as publicity or privacy rights. Unless expressly stated otherwise, the person who associated a work with this deed makes no warranties about the work, and disclaims liability for all uses of the work, to the fullest extent permitted by applicable law. When using or citing the work, you should not imply endorsement by the author or the affirmer. [1]: https://creativecommons.org/publicdomain/zero/1.0/legalcode
keywords losses earthquake
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Table of Contents
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Installation](#installation)
- [Upgrading](#upgrading)
- [Required data](#required-data)
- [Configuration (for calc\_pager\_event API usage and command line usage)](#configuration-for-calc_pager_event-api-usage-and-command-line-usage)
- [Command Line Usage](#command-line-usage)
- [Library Usage](#library-usage)

# Introduction

This library of tools forms the modeling core of the Prompt Assessment for Global Earthquake Response (PAGER) system,
which provides fatality and economic loss impact estimates following significant earthquakes worldwide. The models implemented here are based on work described in the following papers:

```
Jaiswal, K. S., and Wald, D. J. (2010). An Empirical Model for Global Earthquake Fatality Estimation. Earthquake Spectra, 26, No. 4, 1017-1037
```

```
Jaiswal, K. S., and Wald, D. J. (2011). Rapid estimation of the economic consequences of global earthquakes. U.S. Geological Survey Open-File Report 2011-1116, 47p.
```

```
Jaiswal, K. S., Wald, D. J., and D’Ayala, D. (2011). Developing Empirical Collapse Fragility Functions for Global Building Types. Earthquake Spectra, 27, No. 3, 775-795
```

The software here can be used for other applications, although it is important to note that the empirical loss models
have not been calibrated with events newer than 2010, and the semi-empirical fatality model results are less accurate than the empirical equivalent.

# Installation

`pip install esi-utils-pager`

# Upgrading

`pip install --upgrade esi-utils-pager`

# Required data

A number of data files external to the repository are required for usage:

 - Population grid, which can be obtained from Oakridge National Labs [Landscan project](https://landscan.ornl.gov/about)
 - Country code grid, which can be obtained upon request from the PAGER team.
 - Urban/rural code grid, obtained from the Socioeconomic Data and Applications Center [(SEDAC)](https://sedac.ciesin.columbia.edu/data/collection/grump-v1)

# Configuration (for calc_pager_event API usage and command line usage)
To run the `pagerlite` program (see below), you must first create a `.losspager/config.yml` file in your home directory. 
You can make the .losspager directory using this command (on Linux and Mac platforms):

`mkdir ~/.losspager`

You may then create the config.yml file in that directory using your text editor of choice. 
This file should look like the following: 

```
#############Minimum PAGER configuration################
#This is where output data goes
output_folder: /data/pagerdata/output/

#Anything not already captured by PAGER event logs will be written here
log_folder: /data/pagerdata/logs

#This section describes all the data needed to run models and make maps
model_data:
  timezones_file: /data/pagerdata/model_data/combined_shapefile.shp
  country_grid: /data/pagerdata/model_data/countriesISO_Aug2022_withbuffer.tif
  population_data:
  - {population_grid: /data/pagerdata/model_data/population/lspop2018.flt, population_year: 2018}
  urban_rural_grid: /data/pagerdata/model_data/glurextents.bil
```


# Command Line Usage
The command line program made available by this repository is `pagerlite`. This program outputs detailed empirical
(fatality/economic) PAGER model results to a tabular format. To see the help for this program:

`pagerlite -h`

There are three input modes for pagerlite:

 - `pagerlite -e <eventid>` Run pagerlite on a single event specified by a ComCat event ID.
 - `pagerlite -g <grid.xml>` Run pagerlite on a single grid.xml file.
 - `pagerlite -f <gridfolder>` Run pagerlite on a directory containing many grid.xml files 
    (these files can be in sub-directories).

## Examples

To run the PAGER empirical models *only* on a ShakeMap grid.xml file in the current directory and write the results to an Excel file:

`pagerlite -g grid.xml -o output.xlsx`

To run the PAGER empirical models *only* on a directory containing (potentially) many sub-directories with 
files ending in "grid.xml":

`pagerlite -f /data/shakemap_output/ -o output.xlsx`

To run the PAGER empirical models *only* on a ComCat event ID (this will download the authoritative 
ShakeMap grid.xml file from ComCat):

`pagerlite -e us7000lz23 -o output.xlsx`

To run the PAGER empirical AND semi-empirical models, simply add the `-s` flag to any of the above commands:

`pagerlite -e us7000lz23 -s -o output.xlsx`

To run the PAGER empirical models on a folder but only for events between 2010 and 2017:

`pagerlite -f /data/shakemap_output/ -t 2010-01-01 2017-12-31T23:59:59 -o output.xlsx`

See the help for more options (spatial bounds and magnitude range) on restricting processing of ShakeMap
grids.



# Library Usage

Usage of the relevant code modules is detailed in the Jupyter notebooks, most notably in the 
[Earthquake Losses notebook](https://code.usgs.gov/ghsc/esi/esi-utils-pager/-/blob/main/notebooks/EarthquakeLosses.ipynb)



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "esi-utils-pager",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<=3.10",
    "maintainer_email": null,
    "keywords": "losses, earthquake",
    "author": null,
    "author_email": "Mike Hearne <mhearne@usgs.gov>",
    "download_url": "https://files.pythonhosted.org/packages/a2/21/13d22be9eaac1980cf298aad2eb5c1e423c96e92d8e6ccfaad2bcb8d0f56/esi_utils_pager-1.1.12.tar.gz",
    "platform": null,
    "description": "# Table of Contents\n- [Table of Contents](#table-of-contents)\n- [Introduction](#introduction)\n- [Installation](#installation)\n- [Upgrading](#upgrading)\n- [Required data](#required-data)\n- [Configuration (for calc\\_pager\\_event API usage and command line usage)](#configuration-for-calc_pager_event-api-usage-and-command-line-usage)\n- [Command Line Usage](#command-line-usage)\n- [Library Usage](#library-usage)\n\n# Introduction\n\nThis library of tools forms the modeling core of the Prompt Assessment for Global Earthquake Response (PAGER) system,\nwhich provides fatality and economic loss impact estimates following significant earthquakes worldwide. The models implemented here are based on work described in the following papers:\n\n```\nJaiswal, K. S., and Wald, D. J. (2010). An Empirical Model for Global Earthquake Fatality Estimation. Earthquake Spectra, 26, No. 4, 1017-1037\n```\n\n```\nJaiswal, K. S., and Wald, D. J. (2011). Rapid estimation of the economic consequences of global earthquakes. U.S. Geological Survey Open-File Report 2011-1116, 47p.\n```\n\n```\nJaiswal, K. S., Wald, D. J., and D\u2019Ayala, D. (2011). Developing Empirical Collapse Fragility Functions for Global Building Types. Earthquake Spectra, 27, No. 3, 775-795\n```\n\nThe software here can be used for other applications, although it is important to note that the empirical loss models\nhave not been calibrated with events newer than 2010, and the semi-empirical fatality model results are less accurate than the empirical equivalent.\n\n# Installation\n\n`pip install esi-utils-pager`\n\n# Upgrading\n\n`pip install --upgrade esi-utils-pager`\n\n# Required data\n\nA number of data files external to the repository are required for usage:\n\n - Population grid, which can be obtained from Oakridge National Labs [Landscan project](https://landscan.ornl.gov/about)\n - Country code grid, which can be obtained upon request from the PAGER team.\n - Urban/rural code grid, obtained from the Socioeconomic Data and Applications Center [(SEDAC)](https://sedac.ciesin.columbia.edu/data/collection/grump-v1)\n\n# Configuration (for calc_pager_event API usage and command line usage)\nTo run the `pagerlite` program (see below), you must first create a `.losspager/config.yml` file in your home directory. \nYou can make the .losspager directory using this command (on Linux and Mac platforms):\n\n`mkdir ~/.losspager`\n\nYou may then create the config.yml file in that directory using your text editor of choice. \nThis file should look like the following: \n\n```\n#############Minimum PAGER configuration################\n#This is where output data goes\noutput_folder: /data/pagerdata/output/\n\n#Anything not already captured by PAGER event logs will be written here\nlog_folder: /data/pagerdata/logs\n\n#This section describes all the data needed to run models and make maps\nmodel_data:\n  timezones_file: /data/pagerdata/model_data/combined_shapefile.shp\n  country_grid: /data/pagerdata/model_data/countriesISO_Aug2022_withbuffer.tif\n  population_data:\n  - {population_grid: /data/pagerdata/model_data/population/lspop2018.flt, population_year: 2018}\n  urban_rural_grid: /data/pagerdata/model_data/glurextents.bil\n```\n\n\n# Command Line Usage\nThe command line program made available by this repository is `pagerlite`. This program outputs detailed empirical\n(fatality/economic) PAGER model results to a tabular format. To see the help for this program:\n\n`pagerlite -h`\n\nThere are three input modes for pagerlite:\n\n - `pagerlite -e <eventid>` Run pagerlite on a single event specified by a ComCat event ID.\n - `pagerlite -g <grid.xml>` Run pagerlite on a single grid.xml file.\n - `pagerlite -f <gridfolder>` Run pagerlite on a directory containing many grid.xml files \n    (these files can be in sub-directories).\n\n## Examples\n\nTo run the PAGER empirical models *only* on a ShakeMap grid.xml file in the current directory and write the results to an Excel file:\n\n`pagerlite -g grid.xml -o output.xlsx`\n\nTo run the PAGER empirical models *only* on a directory containing (potentially) many sub-directories with \nfiles ending in \"grid.xml\":\n\n`pagerlite -f /data/shakemap_output/ -o output.xlsx`\n\nTo run the PAGER empirical models *only* on a ComCat event ID (this will download the authoritative \nShakeMap grid.xml file from ComCat):\n\n`pagerlite -e us7000lz23 -o output.xlsx`\n\nTo run the PAGER empirical AND semi-empirical models, simply add the `-s` flag to any of the above commands:\n\n`pagerlite -e us7000lz23 -s -o output.xlsx`\n\nTo run the PAGER empirical models on a folder but only for events between 2010 and 2017:\n\n`pagerlite -f /data/shakemap_output/ -t 2010-01-01 2017-12-31T23:59:59 -o output.xlsx`\n\nSee the help for more options (spatial bounds and magnitude range) on restricting processing of ShakeMap\ngrids.\n\n\n\n# Library Usage\n\nUsage of the relevant code modules is detailed in the Jupyter notebooks, most notably in the \n[Earthquake Losses notebook](https://code.usgs.gov/ghsc/esi/esi-utils-pager/-/blob/main/notebooks/EarthquakeLosses.ipynb)\n\n\n",
    "bugtrack_url": null,
    "license": "License =======  Unless otherwise noted, This project is in the public domain in the United States because it contains materials that originally came from the United States Geological Survey, an agency of the United States Department of Interior. For more information, see the official USGS copyright policy at https://www2.usgs.gov/visual-id/credit_usgs.html#copyright  Additionally, we waive copyright and related rights in the work worldwide through the CC0 1.0 Universal public domain dedication.   CC0 1.0 Universal Summary -------------------------  This is a human-readable summary of the [Legal Code (read the full text)][1].   ### No Copyright  The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.  You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.   ### Other Information  In no way are the patent or trademark rights of any person affected by CC0, nor are the rights that other persons may have in the work or in how the work is used, such as publicity or privacy rights.  Unless expressly stated otherwise, the person who associated a work with this deed makes no warranties about the work, and disclaims liability for all uses of the work, to the fullest extent permitted by applicable law. When using or citing the work, you should not imply endorsement by the author or the affirmer.    [1]: https://creativecommons.org/publicdomain/zero/1.0/legalcode ",
    "summary": "USGS PAGER loss modeling functionality",
    "version": "1.1.12",
    "project_urls": null,
    "split_keywords": [
        "losses",
        " earthquake"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1aeaaeca9ba4c8d0c7fb4a2d051728daa43becb71cff8d34fc43b7beb47c3b68",
                "md5": "f0e9d5744f13f917af18e37086bdc747",
                "sha256": "bbb0635df5a57ded994224eb507ec7b52abf43964a97c6900528bf630b408373"
            },
            "downloads": -1,
            "filename": "esi_utils_pager-1.1.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f0e9d5744f13f917af18e37086bdc747",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<=3.10",
            "size": 1280771,
            "upload_time": "2024-04-30T15:41:40",
            "upload_time_iso_8601": "2024-04-30T15:41:40.172256Z",
            "url": "https://files.pythonhosted.org/packages/1a/ea/aeca9ba4c8d0c7fb4a2d051728daa43becb71cff8d34fc43b7beb47c3b68/esi_utils_pager-1.1.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a22113d22be9eaac1980cf298aad2eb5c1e423c96e92d8e6ccfaad2bcb8d0f56",
                "md5": "8df1fd43df4cbaf6f6ddb353683d6304",
                "sha256": "1894b704ee02e3dbdb69ce235d4e0af98ffe33876f109aa5310b5f3ac2fd2630"
            },
            "downloads": -1,
            "filename": "esi_utils_pager-1.1.12.tar.gz",
            "has_sig": false,
            "md5_digest": "8df1fd43df4cbaf6f6ddb353683d6304",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<=3.10",
            "size": 1271803,
            "upload_time": "2024-04-30T15:41:41",
            "upload_time_iso_8601": "2024-04-30T15:41:41.934852Z",
            "url": "https://files.pythonhosted.org/packages/a2/21/13d22be9eaac1980cf298aad2eb5c1e423c96e92d8e6ccfaad2bcb8d0f56/esi_utils_pager-1.1.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-30 15:41:41",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "esi-utils-pager"
}
        
Elapsed time: 0.25208s