I want to highlight a number of different regions (e.g. all countys) of a country map. Is this possible to achieve when using Google Charts, not using the default bubble-shaped markers? I want the highlights to look like regular drawn regions (i.e. custom regions).
Tried Raphael before and considering switching back to it as it has exactly what I'm after - http://raphaeljs.com/australia.html
I know this post is kind of old but you should be able to do this, you'll have to hack the map a bit. If you look at the source for the map you'll notice a bunch of path elements. Each path element has a "logicalname" property (not attribute). The logical name is just a bunch of data points seperated by #'s. I believe the fourth index should be the region code e.g. 002 for Africa or US for United States. If you did:
$("path").each(function(){ if($(this).prop("logicalname").indexOf("#{REGIONCODE}#") != -1) {/*TO STUFF HERE*/} });
You should be able to target specific regions. Please note that the region codes supplied to the map are dependent on the map resolution.
Related
The FILLED MAP visualization tool in PowerBI allows one to quickly build a map dashboard, but only if you prepare your data in the RIGHT way.
In my case, I'm trying to build a map of Brazilian states. I have columns for Cities, States, and the Country itself, and have categorized them as "City", "State or Province" and "Country" respectively. There are 26 different states in Brazil, and, while most of them have special characters (ã, á, õ, í, etc), typing them with regular characters usually allows PowerBI encoding to properly understanding.
However, for the state of "Pará", I can't make it appear correctly on the map.
I've tried every possible combination, writing the state field using every possible combination, but they always have the same result: either not appearing at all on the map, or appearing on the state of Pensylvania in US, as shown in the images below.
Every other state works perfectly when written without any special characters, without needing additional clues inside the cell (For example, the state of "São Paulo" is recognized properly when writting "Sao Paulo" in the state cell).
Different combinations
Issue shown on map. The red arrow shows where the state should be highlighted, the yellow arrow shows a wrongly placed state when using "Para, PA" in the state cell
Is there anything I'm forgetting? An additional categorization step, or an internal ID code that I could use to refer to this specific state? The PowerBI documentation shows additional identifier codes for US and Canada states, but for Brazilian states, the only identifier seems to be the state name.
For reference, I'm using PowerBI Desktop, Version 2.96.701.0 64-bit in a 64-bit Windows 10 system.
I am trying Tableau with data extracted from Salesforce. The input includes a "Country" record were the row have different spellings for the same thing.
Example: Cananda, CANADA, CAnada etc.
Is there a way to fix this in Tableau?
The easiest solution is create a group field based on your Country field.
Select Country in the data pane on the left side bar, right click and choose Create Group. Select elements that you want to group together put them into a single group, say Canada, that contains all variations of spelling.
This new group field initially has a name of Country (group). You may want to rename it Country_Corrected. (Or even better, rename the first field, Country_Original, and call the group field simply Country. Then you can hide Country_Original)
Groups are implemented using SQL case statements. They have many uses, but one application is to easily tolerate some inconsistent spellings in your data source without having to change your data. In general, you can specify several transformations like this that take effect at query and visualization time. For very large data sets, or for very complicated transformations, you may eventually want to push some of them upstream in your data pipeline to get better performance. But make those optimizations later when you've proven the necessity.
If the differences are just in case (upper vs lower), you can right-click the Country dimension, and create a calculated field called something like "New Country", and use the following formula to make the case consistent:
upper([Country])
Use this new "New Country" calc dimension instead of your "Country" dimension, and it will group them all without case sensitivity, and display as uppercase. Or you can use "lower" instead of "upper" if preferred.
would like to thank you advance.
New to Power BI but have found that filled Maps does not working despite working on same data with normal Maps.
I am trying to produce a filled map using US States (full state name used).
Could this be a bug with Power BI (as this seems very intuitive for it not to work) or am I missing something?
Screenshots below:
1. Screenshot shows that Maps is working and is picking up on the State names.
Screenshot shows when chart type is switched to Filled Maps, State data is not represented as a filled map.
Hi Simon were you ever able to get the filled maps working? If so do you care to share what you did? I have attempted and am not able to get it to work.
Take a look at this post.
Things to try:
Provide some measure or value to the Color saturation field of your filled map visualisation.
Set the data category of your State property to State/Province (Modelling tab)
Change your state names to use geo location terms, e.g. Washington->Washington, DC.
Include country name: Southampton->Southampton, England.
Specify latitude/longitude as well as above.
I have a situation where I'm using the IEditorDataFilter interface within a custom UltraGrid editor control to automatically map values from a bound data source when they're displayed in the grid cells. In this case it's converting guid-based key values into user-friendly values, and it works well by displaying what I need in the cell, but retaining the GUID values as the 'value' behind the scenes.
My issue is what happens when I enable the built-in group by functionality and the user groups by a column using my editor. In that case the group by headers default to using the cell's value, which is the guid in my case, so I end up with headers like this:
Column A: 7F720CE8-123A-4A5D-95A7-6DC6EFFE5009 (10 items)
What I really want is the cell's display value to be used instead so it's something like this:
Column A: Item 1 (10 items)
What I've tried so far
Infragistics provides a couple mechanisms for modifying what's shown in group by rows:
GroupByRowDescriptionMask property of the grid (http://bit.ly/1g72t1b)
Manually set the row description via the InitializeGroupByRow event (http://bit.ly/1ix1CbK)
Option 1 doesn't appear to give me what I need because the cell's display value is not exposed in the set of tokens they provide. Option 2 looks promising but it's not clear to me how to get at the cell's display value. The event argument only appears to contain the cell's backing value, which in my case is the GUID.
Is there a proper approach for using the group by functionality when you're also using an IEditorDataFilter implementation to convert values?
This may be frowned upon, but I asked my question on the Infragistic forums as well, and a complete answer is available there (along with an example solution demonstrating the problem):
http://www.infragistics.com/community/forums/p/88541/439210.aspx
In short, I was applying my custom editors at the cell level, which made them unavailable when the rows were grouped together. A better approach would be to apply the editor at the column level, which would make the editor available at the time of grouping, and would provide the expected behavior.
I have a custom variable set for all visitors; for our registered users it's some value, for unregistered users, it's empty.
I can find unregistered users in an advanced segment using the settings Exclude Custom Variable (Value 02) Matching Regexp .+ -- works brilliantly.
But I need a report of unregistered visitors for a dashboard, and tried to do the same thing with a filter. I have a metric of Visits and a dimension of something all vistors will have (e.g. Browser). My filter is identical to the one in the advanced segment, but ... not brilliant. I get no visits. I have tried to Include with a regex ^$ but no love there, either.
Any ideas what I am doing wrong?
To understand your problem and the solution yourself, let me illustrate how the data recording works in any collection process (Google Anlaytics is one of the tools used for data collection and analysis):
To record and analyse data, you first decide what you want to record, and then how. Maybe this how is where Google Analytics comes in for you. So, the data that you want to see is the metric, it can have a name and a (usually numeric) value, and each dimension is how you want to separate or drill down into the various views of the data. As an example, if you want to know how many visitors visited your site everyday, and you want to be able to see through which source they came, Daily Visitor Count is your metric and Source is your dimension.
The important thing to understand here is that Dimensions and Metrics are not bound together. What I mean here is that just because you decided that Daily Visitor Counts should be viewable by Source, doesn't add a source to every updation of the Daily Visitor Count metric. In order to view the metric by the dimenision, you need to update a value for the dimension every time you record the metric.
If you don't record a dimension for a metric, then you cannot obtain the value of the metrics for which you didn't record a dimension by applying a filter on the dimension. Because, using a dimension filter only lets you access the values recorded for the dimension, and not all metrics, because, dimensions don't contain values of metrics, only metrics can optionally contain values for dimensions.
So when you query "dimension equals regex +*", it works, with both include and exclude, but you cannot query metrics with empty dimension using a dimensional filter. The best way would be to only add a standard or default value for the dimension every time you record the metric so that you can separate, something like (not set) or unknown.
Hope that helps. :)
I just hope you understand what you were trying to do is conceptually wrong, though it could still have been made technically feasible.