AWS Quicksight Scatter Plot Using Timestamps - scatter-plot

Does anyone know how I can plot Datetime timestamps on the Y axis of a scatter plot? I want to have a visual of when records are spaced throughout the day. So I am looking to put Users on the X and timestamps on the Y. However, Quicksight will not allow me to add the Datetime field on the visual, as it states it must be a numeric measure. Thank you.

I'm a member of QuickSight team. Current version of QuickSight only supports numeric fields on both axis of the scatter plot. Let me open a bug for it and investigate what it would take to fix it.

Related

Kibana Visual: Show visual only when a field. is decreasing

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).

How can I align linear and ordinal scales in d3 graphs?

I have an ordinal scale, that I am creating a bar chart with.
I create it like this:
d3.scale.ordinal()
.rangeRoundBands(js.Tuple2(0, widthOfMySvgElem), 0.1)
.domain(labels)
The labels are in fact weeks, or months, or similiar periods, and I have data for those periods.
Now, I have something like expected values, that I want to show in this graph as well.
Furthermore, those expected values can change in time, and I want to display that too.
I want to display, that I have expectedValue1 in march, and the start of April, but then at 7th of April, the expected value changed to expectedValue2, and I want to place it where the 7th of April would be on my axis. (I want to display those expected values as the straight line, that changes height as value change.)
But I have no luck matching exact location in relation to this ordinal axis.
Do you have any ideas how can I successfully align those two scales, so they will meet at the data points of ordinal scale, but that I would be able to position other values correctly as well?

Create D3 x-axis that excludes weekends and holidays

I am trying to create a simple d3 chart using the library NVD3 (the information that I am using NVD3 is somewhat irrelevant), and I am struggling to create the correct x-Axis and get the correct spacing between points. I do want a scaled display of dates, so, the jump from 2014-03-01 to 2014-04-01 would be less than to 2014-03-07. So essentially what I want is the typical default time scale, except I don't want it to consider weekends and holidays as possible points, because the market is closed on these days.
I apologize in advance that I cannot post code, as the data is from a source I can't put into a fiddle or bin.
Essentially the data that I am returned is not garunteed to have the price of a stock on a valid date, and some points could be missing. Currently a single day tick on the x-axis is twice as large as the regular single day tick should be if there is data on a Monday and a Friday.
If this is confusing please tell me and I will try and reword.
If anyone has done this before or has any insight, all help is appreciated!

Mac Excel 2011 - Histogram with normal distribution

Let's say I have a list of values and I have already chunked them into groups to make a histogram.
Since Excel doesn't have histograms, I made a bar plot using the groups I developed. Specifically, I have the frequencies 2 6 12 10 2 and it produces the bar plot you see below.
Next, I want to add a normal distribution (line plot) with a mean of 0.136 and standard deviation of 0.497 on top of this histogram. How can I do this in excel? I need the axis to line up such that it takes up the width of the bar plot. Otherwise, you get something like I've attached.
But...the normal should be overlayed on the bar plot. How can I get this effect?
There are two main part to this answer:
First, I reverse-engineered the grouped data to come up with an appropriate mean and standard deviation on this scale.
Second, I employed some chart trickery to make the normal distribution curve look right when superimposed on the column chart. I used Excel 2007 for this; hopefully you have the same options available in your version.
Part 1: Reverse-Engineer
The column B formulae are:
Last Point =MAX(A2:A6)
Mean =SUMPRODUCT(B2:B6,A2:A6)/SUM(B2:B6)
E(x^2f) =SUMPRODUCT(A2:A6^2,B2:B6)
E(xf)^2 =SUMPRODUCT(A2:A6,B2:B6)^2
E(f) =SUM(B2:B6)
Variance =B10-B11/B12
StDev =SQRT(B13/(B12-1))
Part 2: Chart Trickery
Data table:
Column D is just an incremental counter. This will be the number of data points in the normal distribution curve.
E2 =D2/$B$8 etc.
F2 =NORMDIST(E2,$B$9,$B$14,FALSE) etc.
Chart:
Now, add Columns E:F to the chart. You will need to massage a few things:
Change the series to be an X-Y plot. This might require some editing of the chart series to force a single series to use your desired X and Y values.
Change the series to use the secondary axes (both X and Y).
Change the secondary X-axis range to 0.5-5.5 (i.e., 0.5 on either side of the column chart category values). This will effectively align the primary and secondary X-axes.
Change the secondary Y-axis range to 0-1
Format the X-Y series appearance to taste (I suggest removing value markers).
The result so far:
Lastly, you can remove the tick marks and labels on the secondary axes to clean up the look.
Postscript: Thanks to John Peltier for innumerable charting inspirations over the years.

How do I reduce the X axis on a Google Chart?

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.

Resources