How to use ICON MAP to visualise GeoJSON files in POWER BI // INTERACTIVE MAPS w/ BASEMAPS AND MORE

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we're going to go through how you can visualize your geojson as map visuals within your parbi reports using the icon map custom visual we're going to go through how you can use and customize your icon Maps as well as how you can create or connect to your own data all of that and more so without further Ado let's get started hi my name is fernan and welcome to the solution subro YouTube channel Rover tips tricks and best practices when working with powerbi I upload new videos every week so make sure you hit that subscribe button and the bell icon to get notified when a new one is out so if you've ever browsed the data visualizations Gallery out of the box within the parbi desktop you'll know that there are many different ways that you can visualize maps and there are lots to choose from actually so you will have these options like the the map the field map Azure map the argis map for powerbi or even shape map and I had a scenario at work recently where I had to visualize Maps now the requirement was to create a custom field map to visualize in powerbi this means that within this field map I would need to Define my own Borders or at least defined for me and then visualize them into or on top of a geographical map the first solution that came into mind was using the shape map visual which is something that I covered recently and this would be the perfect solution for this requirements however when I started working on it and applied it to my reports I realized that it only visualizes the shapes of those geographical locations but not putting the maps on top of this or behind the shapes so basically because these areas or polygons are not the standard shapes of a map it's very difficult to understand or even see where you are in the world if you zoom into any of these areas so I needed to find a solution or find a way to visualize these custom shapes as well as put the base map underneath it so that when you look at these polygons they are overlaid on top of a map and this is basically where the icon map saved my day essentially this is a custom visual that you can find in app source and it has a lot of different features one of them fits my specific needs so we're going to go through and explore this geojson option in the icon map visual so to find the icon map visual you will need to import it from the app Source or you can go to Icon map.com websit to download the custom visual there but from the parb desktop here you can go to more visuals click from App source and look for Icon map which you will find here by James Dales so from here you will find a few options you can just click the add button which will allow you to use the custom visual or an more interesting one would be to download a sample which will just download a PBX version that you can use and see how the kind of map works or how does it work in action so um what I'm going to do is I'm going to hit add just to add this custom visual here in our Mt report which actually doesn't even have any data yet but what I've done already in the background is downloaded the sample just so that I can show you how the icon map visual sort of works so this is the icon map Sample reports that I download from the app source and as you can see there are a bunch of other different overlays that you can do but for today we're going to focus specifically on the geojson bit of this and for me this is pretty interesting because as you can see here it's not showing us or showing us the different barrows within the greater London area and um as you can see you will it it's giving us the shapes the polygons so the drawings which is exactly what I needed what's more interesting is under the background layers you can add street maps into this so if I select open street map one of these here we go so you this is exactly what I needed I needed the ability to be able to Overlay those polygon drawings on top of a map which will be really useful so how does this work exactly so these drawings so these different polygons are drawn using the geojson file which this custom visual uses so what is it geojson though so geojson is basically a Json format and it's an open type format which is used to kind of represents locations within a map so a geojson would contain several things like the the longitude and latitude of every single area or every single vertex within this polygon which you don't really need to worry so much because the GI Json and the icon map already deals with that it also contains different properties which you can can use to bind with your data it would be typically be like an ID for that area which you can then use to bind back to the data that you have in the data model we'll I'll show you how this will work and how you can use it for yourself later so in this visual as you can see this is an example of a map that uses a Json there are a few requirements for you to start using geojson with the icon map visual the first thing is that the geojson needs to be a somewhere online so it needs to be stored in a web server either in an Azure blob storage or what I prefer is in GitHub so first of all here is the URL for the geojson that is being used in this map and let's open it just so that you can see exactly what how a geojson looks like I'm going to paste this here and here it is so it looks a little bit scary but don't be as I mentioned there's only a few things here to keep in mind so the coordinates first of all so these are what defines the drawing in the map so where those lines or polygons are being drawn and then the properties of each of these sections so this is the property section for the barking and diagam borrow so it will give you an ID it will give you the name of the B which should correlate with one of these so this drawing here this polygon barking and dagam is being drawn by this set of coordinates so you don't really need to understand oh actually so it's just up to here multi polygon because the thing at the top is just for city of London so you don't really need to know this in more intricate detail just know that it contains properties and coordinates to draw the polygon so this is being stored in a web server somewhere so we're going to try to do the same thing as well for our purposes so what I've done is I've got I've taken this file and I've downloaded it somewhere in my local machine and I'm going to show you a the first few things that you can use to kind of explore and customize or create your own geojson files if you don't have one to begin with so geojson IO is a pretty good sites to use if you wanted to explore or customize your own go Json if you already have one so here it's giving us a map of the world essentially on the right hand side you will have your Gio geojson which is going to be dynamic here it's going to be written out for you as you make some drawings or if you make some changes to your properties and then a table view of any features that you might have Within These polygons so first I'm going to show you how to create your own so let's go and find an area here and let's say we want to draw a circle here here we go so this circle as you saw I created a circle and and it's drawn a polygon Circle here on top of this map and it's generated a gjon that creates or draws this circle for us which is this is exactly what you would need for the geojson icon map on the table itself there is no properties for this polygon but if you wanted to add property here to give it an ID you can do so from here so if you just create a new column here we'll just give this one I Global ID and for this one we're going to just going to call this London or if it's an ID it will need to be a unique ID right so it can be 0000001 something like this so as you can see when I click on it it will just give me that property for this and then at the very bottom here or maybe at the very top you will see that there will be some new properties related to this polygon which will just be the properties in the table that we've just created and then from here if you want to add some more polygons you can create some more can create another one here just call this one Birmingham if you click on it just give this one 00002 so that will be the property for that as you can see it added a new Global ID on it and if you're happy with this you can simply just save it as a geojson file and you can work with this as you know as a gjon file in your icon map if you wanted to use this you can also Al use this as a means to explore G Json file that you already have so for example here we have the London file the geojson file that I downloaded from the the sample file I'll just drag this into the G json. iio and here as you can see it has the drawing of the polygons that um we want to visualize as you can see if I click on any of these it will give me some properties here which uh lets you kind of explore them you can see all of the properties in a table type format here which is actually really handy and what's even interesting at least for me is the ability for you to customize these yourself so if you wanted to rename something or you wanted to delete certain columns or properties you can do it and resave your geojson without having to go and manually edit this yourself within the go Json file so again you can make those changes hit save as a geojson file and you're good to go another helpful site that you might want to think about using is the this one called map shaper.int might be too many so I've had instances where I received a gjon file that is over 100 megabytes worth which is a lot of polygon data if you try to use that in parbi your report will most likely be slow so you want to see if you can perhaps simplify the geometry and you can do that here in map shaper so I'm just going to import the London file that I've just that we were just previewing earlier and not showing me the values here but it's it's meant to have like a few different drawings here the option that you will need to be looking for is this option on the top right called simplify and you can just choose I just chose the default method here and if you notice this this value here so this is one of the borrowers as I reduce the percentage here the simpler the geometry becomes now you'll just need to make sure that your geometry doesn't become too simple but at the same time it gives you a rough detail of what you need however if you need to be more specific then you probably don't want to simplify it however if you want to have a better kind of user experience within your parb reports you want to just make sure that your geometries are sort of optimized so now that we have our geojson the London file geojson in our local machine we need to host it somewhere first so the easiest way that I found for you to host your geojson files in a web server is by using GitHub so GitHub is a website that we typically use for devops for backing up work or collaborating with other developers but in this case we can use it to store and host our geojson in a web server online so what I'm going to do I'm here in my GitHub account I'm just going to create a new repository here I'm just going to call this G yo Json and I'm just going to keep it private keep everything as it is create a repo from here we're going to go to upload an existing file we're going to choose your files here and look for the London G Json file first commit this will just let us upload the G Json file within within GitHub so here now we have the Json file in GitHub so it will give you it will try to give you a preview of the G Json file because it's recognized that you've uploaded a map file here so you can see it's giving us a preview of those borders of the the maps now from here you can just simply hit row and it will give you a URL that you can use in the icon Maps so from here you simply copy the um the URL and we're going to go and open it in our Mt report here finally we're going to go back here bring in the icon map part here and we will need to paste the GS on URL down here now it probably yeah as you can see it doesn't really apply it and that's because as part of the icon map you need to add a few more things in the report or in the visual first in order for you to use the G Json part of the icon map so you need an category and a size as kind of mandatory thing so let's try to do those things first so what I'm going to do is I'm going to import data so I'm going to get more and I'm going to get a Json file and the file that we're looking for is the file that we have just uploaded into GitHub but the one in our local version but typically you would have other data to link with your map so we're just going to use the same GI Json file and Link it by the properties so here we have in RBI desktop the different bits like the geometry here which is what we don't really need the only things that we would need to visualize would be the property name and and perhaps the the ID one of these IDs so I would just take these two and then we'll just call this borrow and this one ID convert them into text and then hit close and apply now here we have imported the data from our G Json what's important with the icon map is the category to match a property that is in your geojson in this case it will need to be the ID right but it could be anything as long as it can find a match in your properties bit for the geojson so that it knows what to bind into then the next thing that is required is the size now for the size it would typically be what you're measuring so it would be population or could be anything so for me I just put whatever there so just put count of ID it doesn't really matter and let's now that we've added those two things you should be able to enable the geojson bit here in the icon map which in turn there you go it gives you the polygon that is drawn on top of the map of London so if you click on one of them it will focus on that which you can customize in a lot of different parts here on the right hand side which there's quite a lot of customization options available to you if you wanted to customize this even further so let's go through some of the more interesting properties that you can customize so first of all you can hide in active shapes so that means that as you click on one value or these two so if you as you click new values or if you create a filter by borrow on the right hand side so if we create that as a filter it will hide everything else and it will auto zoom in that area now this is exactly what I needed because obviously now that it's zoomed in it gives you or it gives you a kind of General view of where that location is in a map of a world which is pretty useful and if we go back to the properties there are a few things that you might want to enable like for example label so if you wanted to add the label of the the borrows like the names on top so like how you saw it on the icon map example you can just use conditional formatting which is actually really interesting you can just get the first borrow which will just give you the name of the different borrow customize how it's being shown the borders and as well as the formatting so the fill colors you can also customize that so if you wanted to show for example the places with the highest population you can change and control that using conditional formatting either add a gradients or add the custom formatting option that you want and that's really it for for this video I hope you now know how easy it is to create polygons and visualize your gjon into a map visual in powerb watching as usual give this video a like if you found it useful give it a dislike if you didn't so wanted to do better for next time ask your questions in the comment section box below so I can help you and you can help others if you like this video we have a patreon page where you can support the channel and get exclusive perks like Early Access demo files and credits at the end of these videos thanks again for watching and see you in the next one bye-bye
Info
Channel: Solutions Abroad
Views: 11,538
Rating: undefined out of 5
Keywords: solutions abroad, power bi, powerbi, power bi tutorials, power bi for beginners, beginners guide to power bi, data analytics, dax, data modelling, data visualisation, business intelligence, how to power bi, power bi how to, power bi best practices, power bi tips and tricks, power bi standards, power bi patterns, power bi help, power bi tips, power bi 2023, power bi map, power bi polygon, polygon maps, geojson, power bi geojson, topojson, power bi maps, power bi geo maps
Id: 0OjejZnEt1g
Channel Id: undefined
Length: 18min 30sec (1110 seconds)
Published: Wed Oct 18 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.