Wedg / PlotShapefiles.jl

A package to plot shapefiles with Julia.
MIT License
12 stars 3 forks source link

Issue plotting choropleth following demo #21

Open bradlindblad opened 4 years ago

bradlindblad commented 4 years ago

My error message:

ERROR: MethodError: no method matching choropleth(::Array{Union{Missing, Shapefile.PolygonZ},1}, ::Array{Float64,1})

My code:

using PlotShapefiles
using DBFTables
using DataFrames

table_file = "/home/brad/Desktop/NDGAMEFISH.UNIT_DEER_polygon.shp"
db_file = "/home/brad/Desktop/NDGAMEFISH.UNIT_DEER_polygon.dbf"

states = open_shapefile(table_file)
states_df = DataFrame(DBFTables.Table(db_file))

states_df[:SHAPES] = states.shapes
states_df

choropleth(states_df[:SHAPES], states_df[:ACRES])

plotshape(states_df[:SHAPES], fill_color="MediumAquamarine")

choropleth(states_df[:SHAPES], states_df[:ACRES])

As you can see, I'm trying to plot a set of polygons, and fill by ACRES. The error I get is strange since I believe I'm following your demo to the T.

Thanks!