Forum Discussion

stwinter's avatar
stwinter
Regular Visitor
2 years ago
Solved

Zip Code Color by Category

Apologies if this has been posted before, but I could not find anything quite like it.  I am trying to create a map of Ohio by zip code, and have the zip code areas colored by category.  I have a file with all the zips in Ohio in coloumn, and a second column which identifies each zip code as being categorized as 1-10.   

 

 

I have tried using a shape map (custom) with a topojson file that contains all the zip codes.  While this provides a map of Ohio when I add the category numbers to color saturation color will not show up. 

 

 

 

If I try using a fill map, I can able to color by category, but I have to zoom in on Ohio, which is not idea as not only due to error messages keep popping up as I try to zoom in, but in order to zoom in close enough part of the state is cut-off. 

 

 

 

I have also tried the arc-gis map in power bi.  While this will fill the areas by zip code, and I can filter on them, I am unable to color code the categories.  So, for example, if I select category 2 and category 3, they are the same color.  In addition, I am (as with the filled map) unable to get it to the right size because I can only use the zoom feature which is taking account of the entire US, not just Ohio.

 

 

 Any help would be greatly appreciate.

Thank you.

4 Replies

  • I have tried using a shape map (custom) with a topojson file that contains all the zip codes.  While this provides a map of Ohio when I add the category numbers to color saturation color will not show up. 

    Your TopoJSON file needs to include the category attribute, with the same name as in your data table.

    • stwinter's avatar
      stwinter
      Regular Visitor
      Thank you for your help. I am having difficulties determining where to put the category. Unfortunately, I didn't write the initial code. Here is an example of the arcs and id: {"arcs":[[-2307,-2289]],"type":"Polygon","id":"43948"} as they are in the topojson file. Would I change it to something like this? {"arcs":[[-2307,-2289]],"type":"Polygon","id":"43948", "properties": {"Bin":2}}
      • lbendlin's avatar
        lbendlin
        Super User

        Use Mapshaper.org or other topojson tools to maintain that.