Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
maiios
Frequent Visitor

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 that census tract. How do I do that?
1 ACCEPTED SOLUTION
maiios
Frequent Visitor

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-topojs...).

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!

View solution in original post

5 REPLIES 5
maiios
Frequent Visitor

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-topojs...).

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!

V-lianl-msft
Community Support
Community Support

Hi @maiios ,

 

Refer to shape map.

https://docs.microsoft.com/en-us/power-bi/visuals/desktop-shape-map 

It may cause some performance issues.

ArcGIS map and mapbox can also be choices.

ArcGIS map will not work with embedded.

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

pranit828
Community Champion
Community Champion

HI @maiios 

 

For the census tract in our city, to plot it on a map, you need some field which you can determine what is the location of the census.

My best bet will be on longitude and latitude or pin code(Zip code). Once you have it you can use it in the Map visual.

and in the legend section you can have the count of it.

 

pranit828_0-1597975077075.png

pranit828_0-1597975265887.png

 

 





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile
lbendlin
Super User
Super User

what is a "tract"  - is it a geojson or topojson string that identifies an area?

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.