Coder Social home page Coder Social logo

vulnerability's Introduction

Local and Utility-Wide Cost Allocations for a More Equitable Wildfire-Resilient Distribution Grid

This is the code repository for the following paper. To use this repo, please cite:

  • Wang, Z., Wara, M., Majumdar, A., & Rajagopal, R. (2023). Local and Utility-Wide Cost Allocations for a More Equitable Wildfire-Resilient Distribution Grid. To appear in Nature Energy.

The operating system for developing this code repo is Ubuntu 16.04, but it should also be able to run in other environments. The Python version used for developing this code repo is Python 3.6.

Install required packages

Run the following command line:

$ pip install -r requirements.txt

Download data and model checkpoints

Run the following command lines to download the ZIP files right under the code repo directory:

$ curl -O https://opendatasharing.s3.us-west-2.amazonaws.com/vulnerability/checkpoint.zip
$ curl -O https://opendatasharing.s3.us-west-2.amazonaws.com/vulnerability/dataset.zip
$ curl -O https://opendatasharing.s3.us-west-2.amazonaws.com/vulnerability/results.zip

Unzip them such that the directory structure looks like:

vulnerability/checkpoint/...
vulnerability/dataset/...
vulnerability/results/...

Note 1: for the street view imagery dataset under dataset, due to the restriction of the imagery data source, we are not able to publicly share the full training/validation/test sets. Instead, we sample 20 images (10 positive and 10 negative) for each of them.

Note 2: to run Jupyter Notebook, the default kernel is called "conda_tensorflow_p36", which does not necessarily exist in your computer. Please change the kernel to the one where all required packages are installed.

Functionality of each script/notebook

test_classification_pytorch_for_lines.py: This script loads the trained power line identification model checkpoint checkpoint/deepGrid_seg_pretrained.tar and runs it on the demo image test set. This script is run on a Nvidia Tesla K80 GPU by default.

train_classification_pytorch_for_lines.py: This script trains the power line identification model using the images in the demo training set and saves the model with the best performance on the validation set. A pre-trained model can be specified. The default pre-trained model is the model pretrained on ImageNet dataset: checkpoint/inception_v3_google-1a9a5a14.pth. This script is run on a Nvidia Tesla K80 GPU by default.

analyze_grid_vulnerability.ipynb: This notebook is used for analyzing the distribution grid vulnerability (undergrounding rate, vegetation proximity, etc) at the census block group level and correlating it with regional characteristics (demographics, etc). It also contains the code for cost allocation analysis (the variation of undergrounding cost per household relative to income under different income threshold X). It can be used to generate the plots in Figure 2 to Figure 5.

spatial_map_visualization.ipynb: This notebook is used for visualizing the block-group-level geospatial distribution of various characteristics such as undergrounding rate, wildfire threats, and median household income in California. It can be used to generated Figure 1.

vulnerability's People

Contributors

wangzhecheng avatar

Stargazers

Durbank avatar Linwei Sang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.