Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nrel-sienna/powersystemsmaps.jl
https://github.com/nrel-sienna/powersystemsmaps.jl
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/nrel-sienna/powersystemsmaps.jl
- Owner: NREL-Sienna
- License: bsd-3-clause
- Created: 2022-08-18T02:45:59.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T11:59:20.000Z (about 2 months ago)
- Last Synced: 2024-10-29T13:37:06.195Z (about 2 months ago)
- Language: MATLAB
- Size: 989 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# PowerSystemsMaps.jl
[![main - CI](https://github.com/NREL-SIIP/PowerSystemsMaps.jl/actions/workflows/main-tests.yml/badge.svg)](https://github.com/NREL-SIIP/PowerSystemsMaps.jl/actions/workflows/main-tests.yml)
[![codecov](https://codecov.io/gh/NREL-SIIP/PowerSystemsMaps.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/NREL-SIIP/PowerSystemsMaps.jl)
[](https://join.slack.com/t/nrel-siip/shared_invite/zt-glam9vdu-o8A9TwZTZqqNTKHa7q3BpQ)A (relatively) simple Julia module for plotting [PowerSystems.jl](https://github.com/nrel-siip/PowerSystems.jl) networks and making maps.
## Installation
```julia
using Pkg; Pkg.add("PowerSystemsMaps")
```## Example
```julia
using PowerSystems
using PowerSystemsMaps
PSM = PowerSystemsMaps
PSM.Plots.plotlyjs() # load the PlotlyJS backendsys = System("system.json")
# create a graph from the system
g = make_graph(sys, K = 0.01)# load a shapefile
shp = PSM.Shapefile.shapes(PSM.Shapefile.Table("municipalities.shp"))
shp = PSM.lonlat_to_webmercator(shp) #adjust coordinates# plot a map from shapefile
p = plot(
shp,
fillcolor = "grey",
background_color = "white",
linecolor = "darkgrey",
axis = nothing,
border = :none,
label = "",
legend_font_color = :red,
)# plot the network on the map
p = plot_net!(
p,
g,
nodesize = 3.0,
linecolor = "blue",
linewidth = 0.6,
lines = true,
#nodecolor = "red",
nodealpha = 1.0,
shownodelegend = true,
size = (1500,800),
buffer = 0.4e4
)```