Custom Numbers of Bars at ECharts - charts

I have the following case, for example i have 3 cities and in each city i have different number of ports, how to display that in ECharts bar chart? the example online is about if the number of ports are the same, for example 4 ports in every city, but what if city 1 has 2 ports, city 2 has 4 ports and city 3 has 1 ports?
The following attachment clarifies my idea

Related

Merging tables based on two fields instead of just one?

I have data on sites where invasive species have been managed, and I'm trying to merge information between two tables based on two fields.
The first table includes things like site code, species, area.
Site Code
Scientific Name
Area
001
Alliaria petiolata
Area 1
002
Clematis ternifolia
Area 2
003
Clematis ternifolia
Area 3
The second table has the "tier" or rank of importance according to experts (i.e. 1 means most important, 4 means least important, and there are some confusing letter categories as well).
scientific name
Area 1
Area 2
Area 3
Acer palmatum
2
M
M
Alliaria petiolata
4
4
4
Clematis ternifolia
4
1a
3
I'm trying to add a new column to the first table (because the actual thing has way more information) that shows the tier for that site code, based on the species and area.
Site Code
Scientific Name
Area
Tier
001
Alliaria petiolata
Area 1
4
002
Clematis ternifolia
Area 2
1a
003
Clematis ternifolia
Area 3
3
I'm not even really sure how to approach this because it's like a merge but it's contingent upon two pieces of information. I don't really want to do a giant if-else block.
Any ideas???

Campaign analysis in Tableau

I am doing campaign analysis and the objective of campaigns is to convert lead into customer. I want to see how many leads are exposed to how many campaigns in terms of percentages before they convert to customer.
Below is the sample data where there are four unique lead.
abc has seen three campaigns, efg has seen two campaigns and so on and so forth
I want to show in pie chart may be something like below in tableau where out of 4 leads 2 leads has seen 1 campaign each so 50%, 1 lead has seen 2 campaigns so 25% and 1 lead has seen 3 campaign so another 25%
First of all you have to find how many campaigns have been exposed for each Lead, Count Campaign:
{ FIXED [Lead id] : COUNT([Campaign])}
Since you want to breakdown your pie with this value, you need to convert this calculated field into a dimension.
In order to calculate the % you're looking for, you need just an additional step; Metric:
COUNTD([Lead id]) / attr({ FIXED : COUNTD([Lead id])})
Doing so you're going to compare each value to the total distinct value of your Lead (4)

Crystal Reports Pie Chart - How to show 0 values in legend

I am creating pie charts in Crystal Reports to show the number of grades awarded to a student in various tests throughout the year. A student can be awarded a grade 5, 4, 3, 2 or 1 only. Here is an example of a pie chart for one student.
This student did 5 assessment points in the class shown in 2014. He got a grade 5 for one assessment, Grade 4 for 3 assessments and then one Grade 3 for another assessment.
Is there any way, in the legend, of showing the colours that are used for Grades 2 or 1 and showing them as 0%. that is, how can I show all 5 grades in the legend, and, if a student hasn't received that grade, it still shows in the legend with a count of 0 and 0% next to it?
Any help greatly appreciated.

How to select one value to be displayed in SPSS to be displayed as chart

I have two variables Career and Internet usage, there are two career options but I only want to select one value.
When I generate the pie chart in the output window I get and overview of internet usage but it includes both of the careers I only want a specific career to be shown in the pie chart e.g
How do people from System engineering use the internet as opposed to how does everyone use the internet
I don't know if this is clear, but if it is how would I do this in SPSS? is there some sort of filter_?
For one chart you can use TEMPORARY followed by a SELECT IF. If the the chart command follows directly after it will only plot that subset.
DATA LIST FREE / Career Internet.
BEGIN DATA
1 1
1 2
1 3
2 1
2 2
2 2
END DATA.
VALUE LABELS Internet
1 '2-4 Hours a Day'
2 '5-7 Hours a Day'
3 'Over 7 Hours a Day'.
TEMPORARY.
SELECT IF Career = 2.
GRAPH
/PIE=COUNT BY Internet.
If you have multiple charts see the FILTER command.

Inter annotator agreement when users annotates more than one category for any subject

I want to find the inter annotator agreement for few annotators.
Annotators annotates few categories (out of 10 categories) for each subjects.
For e.g. there are 3 annotator , 10 categories and 100 subjects .
I am aware about http://en.wikipedia.org/wiki/Cohen's_kappa (For two annotators) and http://en.wikipedia.org/wiki/Fleiss%27_kappa (for more than two annotators) inter annotator agreement but I realized that they may not work if user annotates more than one category for any subject.
Do anyone has any idea for determining inter annotation agreement in this scenario.
Thanks
i had to do this several years back. i cant recall how exactly i did it(i dont have code anymore) but i have a worked example to report to my professor. i was dealing with annotation of comments and have 56 categories and 4 annotators.
note:at the time i need a way to detect where annotators most disagree so that after each annotation session they can focus on why they disagree and set out reasonable rules to maximize this statistic. it worked well for that purpose
Let's assume A-D are annotators and 1-5 are categories. This is a possible scenario.
A B C D Probability of agreement
1 X X X X 4/4
2 X X X 3/4
3 X X 2/4
4 X 1/4
5
A tags this comment as 1,2,3,4 B->1,2,3, and so forth.
For each category the probability of agreement is calculated.
Which is then divided by the number of unique categories tagged for that particular comment.
Therefore for the example comment, we have 10/16 as annotator's agreement. This is a value between 0 and 1.
if this doesnt work for you then (http://www.mitpressjournals.org/doi/pdf/10.1162/coli.07-034-R2) pg-567, which was referenced by pg-587 case study.
Compute agreement on a per-label basis. If you treat one of the annotators as the gold standard, you can then compute recall and precision on label assignments. Another option is label overlap, which would be the proportion of subjects where either annotator assigned a category where the both assigned it (intersection over union).