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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Bryan_Schmidt
Helper I
Helper I

How to create census tract maps in Power BI

Is it possible to create census tract maps in Power BI? If so, can someone please advise the steps to take? I've downloaded the shapefiles from the Census Bureau. Power BI doesn't allow importing of shapefiles but does support those in JSON format. I have converted a few of these to JSON format and imported them to Power BI. I have tried using the shape map visual in Power BI to display the results but regardless of what I enter in the Location or Legend box, nothing appears on the map. I need to know the following:

1. What shapefiles are needed to display census tracts and their related numbers? There are multiple shapefiles with extensions of shp, shx, dbf, and others. For now I just need to show census tract boundaries and tract numbers.

2. After the JSON file has been imported to Power BI, what steps are needed to display the tract boundaries and numbers?

 

Any suggestions would be appreciated.

6 REPLIES 6
Bryan_Schmidt
Helper I
Helper I

I would try importing census tracts and shape files for a single county first. If successful, then try an entire state. The big question is after importing, will Power BI recognize them for mapping? The last I looked, census tracts were not an option in the drop down menu or Data Category. So, even if you can import tracts and shape files, is it possible to create maps using them? I could not find a solution in Power BI, but did learn to use the mapping feature in R which is much easier.

Bryan_Schmidt
Helper I
Helper I

Thank you for replying to my question. I was able to create census tract maps in R using a process that is much simpler than what you describe. Hopefully the folks at Microsoft can make the process much simpler going forward.

Thank you for replying to my question. I looked at all the links you provided and, unfortunately, none of them answer my questions. I'm guessing I don't have the correct shapefiles converted to JSON format. There are 125 shapefiles for Polk County, Oregon. Which of these needs to be converted to JSON format? If it is just those with shx, shp, and dbf extensions, there are multiples of these so I need to know which ones. It's interesting that census tract is not an option that appears in Data Category. Does this mean Power BI is not able to recognize census tract geography? 

@Bryan_Schmidt  I'm unable to read census tract info into Power Bi, but here's how to do it with shapefiles.

1. For Oregon, download the shapefile from here (Select 'Census Tracts', then 'State'): https://www.census.gov/cgi-bin/geo/shapefiles/index.php?year=2023&layergroup=Census+Tracts )

2. Use mapshaper to convert the shapefiles to topojson: https://mapshaper.org/   Note: Your shapefile map consists of several files. Select at least the .dbf and .shp files, and if available, also the .shx and .prj files. To select multiple files, hold the CTRL button while selecting the files and drag/upload them to mapshaper. Export as topojson. This creates a single file of Oregon census tracts.

3. Import the JSON file into Power BI, and select the shapemap visulization. Under the 'Format Visual' tab > Visual > Map Settings > Map type, select 'Custom map' (last option) in the drop down menu and under 'Add a map type' select your json file. The 'Projection' drop down option should be Mercator.

4. Format the 'Geography' variable. Census tract data downloaded from Census.gov is in this format: 1400000US41001950100. You'll need to extract the digits after 'US' in order for Power BI to recognize it:  41001950100 (41=Oregon). In the table view in Power BI, save this field as text and select 'Place' as the Data Category.  In the Report view, drag the Census Tract field to Location and your variable of interest to Color Saturation to complete your visualization. 

5. Happy mapping!

 

 

 

Thanks for the detailed instructions.  Given memory limitations with PBI map visuals, can you import JSON census tract files for the entire country, or does it only work state by state?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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