WISPO-POP / PowerPlots.jl

Functions plot PowerModels networks
BSD 3-Clause "New" or "Revised" License
22 stars 2 forks source link

Geographic plots #40

Closed noahrhodes closed 3 years ago

noahrhodes commented 3 years ago

If a system already has latitude/longitude coordinates, you might want to plot that (with a coordinate transformation) rather than as x/y.

Vegalite requires the position for a geo plot to be lat/lon/lat2/lon2 rather than x/y. Can this be done via a keyword argument to vega_plot? Does it need to pass to a separate plotting function for geographic data?

noahrhodes commented 3 years ago

Maybe use setfield and have some functions cartesian2geo(plot) cartesian2geo(pm_data) geo2cartesian(plot) geo2cartesian(pm_data)

Likely the only one that is needed at first is cartesian2geo(plot). This function would use setfield to make each layer's x->lon, y->lat and add a geographic projection to the 0 layer.