Plot String of States on Power BI Maps - maps

I want to plot a list of states on Power BI for a given state.
My data has a state, and a list of state names (taken from a multi-choice SharePoint List). It also has a type that can be selected. When a state is selected, it should highlight the list of all related states.
For example, on SharePoint Lists, I have:
Alabama -> Alabama, Louisiana, North Carolina, West Virginia (of type A)
Alabama -> Alabama, Alaska, Texas, New York (Type B)
When I select Type A and Alabama, I want the map to highlight Alabama, Louisiana, North Carolina, West Virginia.
Ideas please!

Related

Do not display bar of else condition of row level formula in a Salesforce Report bar chart

I am using salesforce reports.
I have three types of medicines (Type A, Type B and Type C).
I would like to create a bar chart for number of bills with medicines based on Types.
(The only thing is I would like to have grouping just Type A and Type B wise)
I am using below row level formula:
IF(obj.Type = "Type A", "A",
IF(obj.Type = "Type B","B",NULL))
It creates a bar chart but there are 3 bars. I would like to have just 2 bars in output.
Is there any way I can remove the blue bar with count 111 here (Evaluating the NULL from formula) from the chart ?
Thank you in advance

Zing Charts - Place Items on Map

I am trying to put Location markers on an USA map similar to the one in this page
http://www.zingchart.com/blog/2012/07/17/interactive-html5-maps-api/
(Place items on map section.)
I am not able to find the JSON attribute for specifying this (The link on it is taking to the site's home page only).
Please help me on how to do this or point me to any documentation on it.
[--EDIT--]
I found a function to get the XY coordinates on the map using the Lat/Lon value and vice-versa (zingchart.maps.getXY(mapid, lonlat, itemid)).. But I am still stuck with placing a marker on that XY point.
[--EDIT--]
Below answers work as expected. I am trying to put markers on US map. I would like to know how to place markers on Alaska/ Hawaii states with lat/lon info since they are placed below california as a separate polygon though they are geographically above the US.
I'm on the ZingChart team, and I can definitely help you out with this!
It's critical that you wait until the map has loaded before finding the XY coordinates. Use the ZingChart 'load' API event listener to wait until the chart has loaded:
zingchart.load=function() {
drawPoints();
};
Inside our drawPoints function, we'll find the longitude and latitude values. If the values are north and east, the numbers will be positive, south and west will be negative. For example, Sao Paulo is located at 46.6333° W, 23.5500° S, so we would use [-46.63, -23.55]. In this map demo, we've placed a marker at Bangalore, which is located at 77.5667° E, 12.9667° N, so we'll use [77.57, 12.97].
var lonlat = [77.57, 12.97];
var bangalore = zingchart.maps.getXY('map', lonlat);
The getXY method returns an array of length 2, with the value at index 0 being the x position and the value at index 1 being the y position for your map.
Now that we have the X Y coordinates for Bangalore in our variable, we can use the addobject API method to place a marker at that location. Below, 'zc' is the same as the id given to the div used to place the chart.
zingchart.exec('zc', 'addobject', {
type: 'shape',
data: [{
x: bangalore[0],
y: bangalore[1],
type: "circle",
size: 3
}]
});
To see the code in its entirety, view the page source of the map demo provided.
Please let me know if you have any more questions!

Sorting dicom dataset in Matlab

Hi have about 5000 2d images from multiple CT-scans and need to get them sorted. The dataset is directly imported from a GE workstation.
Right now the images are in bunches of about 10 sorted images at a time in some random order.
How could we get these images sorted? If you would suggest dicominfo please tell us exactly which parameter to go after.
Thank you!
How the DICOM CT images should be sorted is ultimately dependent on the usage context, but as a rule of thumb I would recommend that you first group the images based on (patient), study and series using these tags:
(0010,0020) Patient ID
(0020,000D) Study Instance UID
(0020,000E) Series Instance UID
To sort the images within one series, you could use the Instance Number (0020,0013), although there is no guarantee that this value is set since it is a type 2 attribute.
Another alternative is to use the Image Position (Patient) (0020,0032), which is mandatory in CT images. You would need to check the Image Orientation (Patient) (0020,0037) to decide how to sort on position. Often CT image orientation is (1,0,0), (0,1,0), and then the Z (third) component of the image position can be used as the basis for sorting.
If the series also contains a localizer image, this image would have to be excluded from positional sorting.

Hierarchical tree with multiple sub items

I am trying to wrap my head around how to solve this problem in WPF using an MVVM pattern.
I am converting a win32 tree control into WPF. The old tree control uses a Node class hierarchy along these lines (BaseNode being the base class and each following item inheriting from it and extending slightly):
BaseNode, GroupNode, VehicleNode, PersonNode, EquipmentNode, SupplyNodes (etc, etc.)
Going from this, A GroupNode will have a list of child nodes which could be one or more GroupNodes, one or more VehicleNodes and one or more PersonNodes.
A VehicleNode would have a list of PersonNodes that would be the crew for operating the vehicle. The VehicleNode would also have a list of PersonNodes that would be passengers in the vehicle. Each of these is under a 'Dummy' node labeled Crew and Passengers (though they are both PersonNode Types).
Outside of this, a VehicleNode and PersonNode would each have EquipmentNodes and SupplyNodes.
The tree will have several "Group" nodes that will be expanded to list any items of that type.
Hopefully, this text diagram will help solve illustrate the problem.
Ground Fleet (GroupNode)
West Coast (GroupNode)
East Coast (GroupNode)
Truck 1 (VehicleNode)
Truck 2 (VehicleNode)
Crew (DummyNode)
Bill the Driver (PersonNode)
Passengers (DummyNode)
Passenger 1 (PersonNode)
Passenger 2 (PersonNode)
Equipment (DummyNode)
Camera (EquipmentNode)
Sunglasses (EquipmentNode)
Supplies (DummyNode)
Apple (SupplyNode)
Water Bottle (SupplyNode)
Equipment (DummyNode)
Jack (EquipmentNode)
Tire Iron (EquipmentNode)
Supplies (DummyNode)
SpareTire (SupplyNode)
Personnel (DummyNode)
Salesman Tom (PersonNode)
District Manager Sally (PersonNode)
So the instance of Truck 2 (VehicleNode) has six child nodes (list of BaseNodes) of various types:
List children; // {Bill The Driver(PersonNode), Passenger 1 (PersonNode), Passenger 2 (PersonNode), Jack (EquipmentNode), Tire Iron (EquipmentNode), SpareTire (SupplyNode)}
In our existing win32 tree, when we add the Truck 2 node, we manually cycle through the child nodes and add the dummy nodes (As required) and children to create the tree based on the type of nodes in the children list and potentially a property on the child node - the PersonNode has a flag on it to indicate if its a passenger or crew, so we know which parent node to add it should belong to.
I'm struggling with how this can be represented in an MVVM approach on a tree that would allow us to retain the Dummy Nodes as above.
Any help would be greatly appreciated!
Use HierarchicalDataTemplate, see a decent example here.
You would expose a list of nodes from your ViewModel, and bind that to an ItemsSource of a TreeView. Each node will also have a child property that is another list of nodes.
Each of you nodes could just be a simple class, or could actually be ViewModels themselves if you need to put ICommands/Actions/Methods at each node.
Each node can be setup however you wish in C# in your ViewModel, since HierarchicalDataTemplate does alot of binding work for you.

Can I pass the Array values (not the array collection values) to the Bar charts or column charts using Flex 3.5?

Is there anyway where I can pass the Array values (not the array collection values) to the Bar charts or column charts using Flex 3.5?
Here what I need: I have array values like this,
array1 = [23, 49, 40, 239, 20, 80, 39,49,120, 24, 31,41];
and I want to show these values on the Y-axis and months on X-axis.
I have two questions:
How can I pass this array to Bar chart or column chart?
How do I need to show months on X-axis? I have kept a filters that even if we want to see some months or a particular months or particular span of months. On X-axis it need to change the months dynamically depending on the filters. For example on X-axis the values should be [Jan, Apr, Jun, Oct] if I select the 3 months period filter
I have written a logic to collect the values of those particular months into an array, but I don't understand how to pass this array to Bar chart, because there I don't know what X-field and Y-field to be given.
1) how can I pass this array to Bar
chart or column chart.
The dataProvider property of the charts is an object. So you can send anything you want in there. I would expect it to handle an array just as well as it would handle an ArrayCollection.
That said, I believe you're going to have to send in objects with data properties that represent the xField and yField values. An array of simple values doesn't give the component enough information to know what to do.
2) how do I need to show months on
Xaxis. beacuse I'm asking this
regarding, I have kept a filters that
even if we want to see some months or
a particular months or perticalar span
of months... there on Xaxis it need to
change the months dynamically
depending on the filters..... (for ex,
on Xaxis the values should be (Jan,
Apr, Jun,Oct) if i select the 3 months
period filter....)
I believe if you create objects, as I stated before with the Xfield value being a string representing the month and a y field value representing your data point, the graph should know how to display the values.
If you were using an ArrayCollection you could easily use the collection's filtering abilities to change the dataProvider, which I would expect would change the graph.
More docs on this

Resources