Pretty Patterns With Power Query And Power Map
Here’s something with no practical use whatsoever. Today, after I finished writing the first draft of the chapter on M of my upcoming Power Query book, I got thinking about how Power View and Power Map get all the attention because of all the eye-catching demos you can create with them. And then I thought – why bother spending time finding real data for these demos when you can generate artificial data in Power Query to create patterns? So I got to work…
As you probably know, you can create animated charts in Power Map so long as you have date-based data. I therefore created a function in Power Query to draw a circle as a series of points on a graph where each point is associated with a date; I also added data for height and colour for each point. Here’s the function definition:
I then created another Power Query query to call this function 30 times to create 30 circles with different radiuses:
And here’s the result of the query plotted on a map using Power Map:
Pretty, isn’t it? You can download the workbook with the Power Query query and the Power Map tour here.