NREL-erad 1.0.0a0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- NREL-erad-1.0.0a0/LICENSE.txt +29 -0
- NREL-erad-1.0.0a0/NREL_erad.egg-info/PKG-INFO +10 -0
- NREL-erad-1.0.0a0/NREL_erad.egg-info/SOURCES.txt +8 -0
- NREL-erad-1.0.0a0/NREL_erad.egg-info/dependency_links.txt +1 -0
- NREL-erad-1.0.0a0/NREL_erad.egg-info/requires.txt +32 -0
- NREL-erad-1.0.0a0/NREL_erad.egg-info/top_level.txt +1 -0
- NREL-erad-1.0.0a0/PKG-INFO +10 -0
- NREL-erad-1.0.0a0/README.md +66 -0
- NREL-erad-1.0.0a0/setup.cfg +4 -0
- NREL-erad-1.0.0a0/setup.py +35 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
BSD 3-Clause License
|
2
|
+
|
3
|
+
Copyright (c) 2023, Alliance for Sustainable Energy, LLC
|
4
|
+
All rights reserved.
|
5
|
+
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
8
|
+
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
10
|
+
list of conditions and the following disclaimer.
|
11
|
+
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
14
|
+
and/or other materials provided with the distribution.
|
15
|
+
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
17
|
+
contributors may be used to endorse or promote products derived from
|
18
|
+
this software without specific prior written permission.
|
19
|
+
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: NREL-erad
|
3
|
+
Version: 1.0.0a0
|
4
|
+
Summary: Graph based scalable tool for computing equitable resilience metrics for distribution systems.
|
5
|
+
Home-page: https://github.com/nrel/erad
|
6
|
+
Author: Kapil Duwadi, Aadil Latif, Kwami Sedzro, Sherin Ann Abraham, Bryan Palmintier
|
7
|
+
Author-email: kapil.duwadi@nre.gov, aadil.altif@nrel.gov, sherinann.abraham@nrel.gov, kwami.sedzro@nrel.gov, bryan.palmintier@nrel.gov
|
8
|
+
Requires-Python: >=3.8
|
9
|
+
Provides-Extra: dev
|
10
|
+
License-File: LICENSE.txt
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
pytest
|
2
|
+
networkx
|
3
|
+
pyyaml
|
4
|
+
geojson
|
5
|
+
neo4j-driver
|
6
|
+
python-dotenv
|
7
|
+
ditto.py
|
8
|
+
boto3
|
9
|
+
botocore
|
10
|
+
OpenDSSDirect.py
|
11
|
+
pandas
|
12
|
+
matplotlib
|
13
|
+
plotly
|
14
|
+
shapely
|
15
|
+
jupyter
|
16
|
+
geopandas
|
17
|
+
stateplane
|
18
|
+
graphdatascience
|
19
|
+
scipy
|
20
|
+
geopy
|
21
|
+
rasterio
|
22
|
+
xmltodict
|
23
|
+
pydantic
|
24
|
+
requests
|
25
|
+
|
26
|
+
[dev]
|
27
|
+
mkdocs
|
28
|
+
mkdocstrings[python]
|
29
|
+
mkdocs-material
|
30
|
+
mkdocs-jupyter
|
31
|
+
pylint
|
32
|
+
black
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: NREL-erad
|
3
|
+
Version: 1.0.0a0
|
4
|
+
Summary: Graph based scalable tool for computing equitable resilience metrics for distribution systems.
|
5
|
+
Home-page: https://github.com/nrel/erad
|
6
|
+
Author: Kapil Duwadi, Aadil Latif, Kwami Sedzro, Sherin Ann Abraham, Bryan Palmintier
|
7
|
+
Author-email: kapil.duwadi@nre.gov, aadil.altif@nrel.gov, sherinann.abraham@nrel.gov, kwami.sedzro@nrel.gov, bryan.palmintier@nrel.gov
|
8
|
+
Requires-Python: >=3.8
|
9
|
+
Provides-Extra: dev
|
10
|
+
License-File: LICENSE.txt
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# erad
|
2
|
+
Graph based python tool for computing equitable resilience
|
3
|
+
|
4
|
+
[Visit full documentation here](https://nrel.github.io/erad/)
|
5
|
+
|
6
|
+
```
|
7
|
+
### :point_right: Generating CSV data set to load to Graph database
|
8
|
+
|
9
|
+
1. Downloading the SMARTDS opendss feeder model
|
10
|
+
|
11
|
+
Use the following code snippet to download the OpenDSS model for the region
|
12
|
+
you are interested in. Just provide the region name and where you would like the downloaded files to be stored.
|
13
|
+
|
14
|
+
```
|
15
|
+
from utils.ditto_utils import download_smartds_data
|
16
|
+
download_smartds_data('P4R', r'C:\Users\KDUWADI\Desktop\NREL_Projects\RADS\smartds_opendss_models')
|
17
|
+
```
|
18
|
+
|
19
|
+
2. Parsing generic opendss model to retrieve metadata
|
20
|
+
|
21
|
+
The command below takes master opendss file and folder where you want to store the extracted data. It will generate csvs for distribution assets.
|
22
|
+
|
23
|
+
```
|
24
|
+
from utils.opendss_utils import extract_opendss_model
|
25
|
+
extract_opendss_model(
|
26
|
+
r'C:\Users\KDUWADI\Desktop\NREL_Projects\RADS\smartds_opendss_models\P4R__2018__SFO__oedi-data-lake_opendss_no_loadshapes\Master.dss',
|
27
|
+
r'C:\Users\KDUWADI\Desktop\NREL_Projects\RADS\graph_csvs'
|
28
|
+
)
|
29
|
+
```
|
30
|
+
|
31
|
+
3. Preparing HIFLD data for the region you are interested in
|
32
|
+
|
33
|
+
First download the HIFLD CSV data set and use the following command to get the subset of the csv for the region you are interedted in. First create a bounding box with 5km buffer. Then use the bounding box corners to filter the csv data set.
|
34
|
+
|
35
|
+
```
|
36
|
+
from utils.opendss_utils import get_bounding_box
|
37
|
+
from utils.hifld import get_subset_of_hifld_data
|
38
|
+
bounds = get_bounding_box(
|
39
|
+
r'C:\Users\KDUWADI\Desktop\NREL_Projects\RADS\smartds_opendss_models\P4R__2018__SFO__oedi-data-lake_opendss_no_loadshapes\Master.dss',
|
40
|
+
5000)
|
41
|
+
|
42
|
+
get_subset_of_hifld_data(
|
43
|
+
r'C:\Users\KDUWADI\Desktop\NREL_Projects\RADS\HIFLD Data\Emergency_Medical_Service_(EMS)_Stations.csv',
|
44
|
+
bounds,
|
45
|
+
r'C:\Users\KDUWADI\Desktop\NREL_Projects\RADS\graph_csvs',
|
46
|
+
logitude_column_name='LONGITUDE',
|
47
|
+
latitude_column_name='LATITUDE',
|
48
|
+
columns_to_keep=['LONGITUDE', 'LATITUDE',
|
49
|
+
'STATE', 'ZIP', 'CITY', 'COUNTY'],
|
50
|
+
name_of_csv_file='medical_centers.csv')
|
51
|
+
```
|
52
|
+
|
53
|
+
4. Creating relationship between HIFLD data and OpenDSS loads
|
54
|
+
|
55
|
+
Use the following snippet to create a relationship csv between HIFLD data and OpenDSS loads
|
56
|
+
|
57
|
+
```
|
58
|
+
from utils.hifld import get_relationship_between_hifld_infrastructures
|
59
|
+
get_relationship_between_hifld_infrastructures(
|
60
|
+
r'C:\Users\KDUWADI\Desktop\NREL_Projects\RADS\graph_csvs\medical_centers.csv',
|
61
|
+
'Id',
|
62
|
+
r'C:\Users\KDUWADI\Desktop\NREL_Projects\RADS\graph_csvs\loads.csv',
|
63
|
+
r'C:\Users\KDUWADI\Desktop\NREL_Projects\RADS\graph_csvs\buses.csv',
|
64
|
+
r'C:\Users\KDUWADI\Desktop\NREL_Projects\RADS\graph_csvs\medical_relationships.csv'
|
65
|
+
)
|
66
|
+
```
|
@@ -0,0 +1,35 @@
|
|
1
|
+
|
2
|
+
#!/usr/bin/env python
|
3
|
+
import io
|
4
|
+
import os
|
5
|
+
import re
|
6
|
+
|
7
|
+
from setuptools import find_packages
|
8
|
+
|
9
|
+
try:
|
10
|
+
from setuptools import setup, find_packages
|
11
|
+
except ImportError:
|
12
|
+
from distutils.core import setup
|
13
|
+
|
14
|
+
with open('requirements.txt') as f:
|
15
|
+
requirements = f.read().splitlines()
|
16
|
+
|
17
|
+
with open('requirements_dev.txt') as f:
|
18
|
+
dev_requires = f.read().splitlines()
|
19
|
+
|
20
|
+
|
21
|
+
setup(name='NREL-erad',
|
22
|
+
version="1.0.0-alpha", # MAJOR.MINOR.PATCH (https://semver.org/)
|
23
|
+
description='Graph based scalable tool for computing equitable \
|
24
|
+
resilience metrics for distribution systems.',
|
25
|
+
author='Kapil Duwadi, Aadil Latif, Kwami Sedzro, Sherin Ann Abraham, Bryan Palmintier',
|
26
|
+
author_email='kapil.duwadi@nre.gov, aadil.altif@nrel.gov, sherinann.abraham@nrel.gov, kwami.sedzro@nrel.gov, bryan.palmintier@nrel.gov',
|
27
|
+
url='https://github.com/nrel/erad',
|
28
|
+
packages=find_packages("src"),
|
29
|
+
install_requires=requirements,
|
30
|
+
python_requires='>=3.8',
|
31
|
+
package_dir={"erad": "erad"},
|
32
|
+
extras_require={
|
33
|
+
"dev": dev_requires,
|
34
|
+
}
|
35
|
+
)
|