Forum Discussion

maiios's avatar
maiios
Frequent Visitor
6 years ago
Solved

How do you generate a map with census tracts

I have a dataset with each row assigned a census tract. I am trying to generate a map with each census tract in our city, and have the color change based on the number of rows that report as part of t...
  • maiios's avatar
    6 years ago

    While amitchandak and V-lianl-msft were exactly right about using the Shape Map, I wanted to expand the answer a bit. For my problem, I needed to create a map of census tracts in my city, which requires a few extra steps.

     

    1. Enable the shape map as described here: https://docs.microsoft.com/en-us/power-bi/visuals/desktop-shape-map

    2. Next, you will need the map you will use as the basis for your map. In the United States, the Census has lots of shapefiles for various kinds of maps. Pick your map here: https://www.census.gov/cgi-bin/geo/shapefiles/index.php

    3. If applicable, crop your map using QGIS (directions: https://danielcorcoranssql.wordpress.com/2017/08/08/qgis-cropping-and-converting-shp-files-to-topojson-format/).

    4. Create a shape map, and use the topojson file that you created in step 3 (the process for adding it is in the link in step 1)

     

    I had some issues where the map was completely blank when I imported it into the shape map. I had to play with the way I saved the data from QGIS. Specifically, I had to try some of the different options in the 'Save Vector Layer As' window, and change the CRS dropdown. I got it to work after trying all four options, and getting one to work. I don't know enough about this stuff to understand what I was doing, but I got it to work. 

     

    Thanks for everyone's help!