I am trying to plot distribution of the values in my file. While the chart is looking fine, however the data looks negatively skewed and when i calculated skew it came as positive. I further analyzed data to see what is mean median mode to confirm the chart. And mode is not at the highest point of the distribution chart.
I am using
sns.distplot(AVG.loc[AVG['Month'] == 'May 2020','Asset Value Growth'],hist=True,label='May 2020')
Can someone tell me what am i doing wrong over here ?
Related
I am trying to set up a simple Kibana line chart with these conditions -
I'm trying to set up a Power vs Timestamp chart. In elastic, I have the metrics Current and Voltage. I'll calculate the Power from that. Problem is, I need to show the visual ONLY if the current is decreasing.
So at time t, the current value should be less than the last reported current value.
Cannot figure out how to do this in Lens. If it can't be done in Lens, any help with Vega is appreciated.
Thanks
So it sounds like you want a graph that only shows the values of current for when the previous value is greater. This is not doable in lens, but definitely doable in Vega.
Since you haven't provided an example I will just point you in the right direction. You will need a series of transforms to get the data in a plottable form.
sort the data by timestamp (collect transform)
run a window transform that stores the previous value (window transform)
calculate the difference between these values (formula transform)
filter values with a negative/positive difference (filter transform)
From here you can build the marks etc. if Vega is new to you I would start by looking at the Vega Documentation, Vega Gallery and the Kibana-Vega Documentation (for data ingest).
I would like to create a barplot in TIBCO Spotfire with frequency on Y axis based on two factors: Stage and Genotype.
This is the standard expression that I have from Spotfire:
Count() THEN [Value] / Sum([Value]) OVER (All([Axis.X]))
It turns out, I do not want the frequency over ALL the data, but within Stage. In a way that the sum of the frequency within each is stage it will be 100%.
I watched some videos and I still did not figured out.
I tried to find a solution to your problem but could't find a working expression. This can still help you :
What I would have done in your case is :
remove the Genotype from the X Axis
set the visualization as a 100% stacked bars (with right click)
add the Genotype as a color by parameter (in the visualization options)
my brain is pickled with this one. Below are the two graphs I have plotted with exp2 function. The points do not match the curve, and this is ultimately changing my entire answer, as it is giving the wrong values out, and I cannot understand why?
enter image description here
enter image description here
Here is the code I am using, both graphs plot a concentration against time, but yet give different results:
CH4_fit = fit(Res_time, CH4_exp, 'exp2'); CH4_coeff =
coeffvalues(CH4_fit);
%Co-efficient values for exponential fitting CH4_pred
=(CH4_coeff(1)*exp(CH4_coeff(2)*Res_time)) + ...
(CH4_coeff(3)*exp(CH4_coeff(4)*Res_time)); plot(Res_time,CH4_exp, Res_time, CH4_pred);
Can I just added that the exact same data was run on different computers, and it gave the same equation co-efficients exactly (to 4.dp) and the same times, but yet still outputs different concentrations on my version? I have the R2018b, and I have just used default settings (don't know how to change anything, so I definitely haven't).
I'm using DC.JS scatterplots to let users select points of interest. If you use elastic axis you cannot select the highest value point. Look at the DC.JS example (https://dc-js.github.io/dc.js/examples/scatter-brushing.html). You cannot select the highest point in the left or right plot.
In several cases, the highest or lowest point(s) is exactly what people need to be able to select because those are the outliers we care about. If you disable elastic axis and make sure you specify a range that is higher than the max value, you can select the point.
Is there another solution besides setting the axis domain based on current min/max and expanding them little bit? This is sometimes ugly when the minimum=0 and now your domain needs to include some small negative number.
--Nico
Always when I face this issue, I increase the y domain by 5% manually.
For instance:
var balanceDomain = d3.scale.linear().domain([0, s.balanceDimension.top(1)[0].balance + (s.balanceDimension.top(1)[0].balance*0.05)]);
s.amountOverallScore
.width(400)
.height(400)
.x(someDomain)
.y(balanceDomain)
...
Maybe this is not the best solution, but always work for me.
Hope it helps (=.
In my application the values were always positive and I used the following to get correct behavior:
// using reductio on the all_grp to get easy access to filtered min,max,avg,etc.
totalTimeMinValue = all_grp.top(1)[0].value.min;
totalTimeMaxValue = all_grp.top(1)[0].value.max;
// now use it to scale the charts we want
detail1_chart.y(d3.scale.linear().domain([totalTimeMinValue-1, totalTimeMaxValue+1]));
detail3_chart.y(d3.scale.linear().domain([totalTimeMinValue-1, totalTimeMaxValue+1]));
This keeps both charts in sink. An additional benefit was that my rather large dots (symbolsize=15) are no longer being clipped.
Thanks Roger.
I'm doing a bar chart with google, and my results look like this (link).
If you see that the graph is not beautiful enough. What is the parameter that can reduce the value on the x axis.
Thank you in advance.
try this one
I just added chds=0,10 to scale it properly. That basically sets the data range to 0 min, 10 max.
I would take a look at this link from google regarding Data Scaling. I am not sure of your data set format so the actual answer to your problem will depend on that.
i.e. - I added "&chds=0,10" after your "chd=" statment and got a better looking chart. Example.
Check out the help file here.
Decide whether your data must be scaled to fit your chart. Different formats support different ranges of values. You might want to scale your data so that it spans the full range of values allowed by your format, to make differences more obvious. You can do this either by scaling your data to fit within the data format that you use, or you can use text formatting with custom scaling.