Shapes from geojson on geo map with Plotly

Realized the best way is to write a function myself. The code below uses the Proj package to translate lat/lon in x/y coordinates for different projections. Then I create shapes for plotting with Plots.

using Plots, JSON, Proj
u = “country”
getShp_json = JSON.parsefile(u * “.geojson”)

trans = Proj.Transformation(“EPSG:4326”, “+proj=eck4 +axis=neu”)

allShp_arr = Plots.Shape

for shp in collect(values(getShp_json[“features”])), subShp in shp[“geometry”][“coordinates”], subSubShp in subShp
shp_arr = map(z → trans(z[1], z[2]), subSubShp)
push!(allShp_arr, Plots.Shape(shp_arr))
end

Plots.plot(allShp_arr,ticks = false, axis = false, legend = false, color = “#d9d9d9”)

filename