Show realtime charts in SuperSet with Druid - druid

How I can do realtime charts in Superset over Druid?
I can select last day, but then it set the interval to
"2019-06-02T00:00:00+00:00/2019-06-03T00:00:00+00:00".
Meaning from last day 00:00 to today 00:00, so I'm missing all current day data.
If I select last hour it set the interval to "2019-06-02T23:00:00+00:00/2019-06-03T00:00:00+00:00".
Again it takes the hour from 23 to midnight.
When checking "next hour" or "next day", it again calculates everything relative to 00:00.
I wish to see an ongoing chart on real-time data, last our or last day.
How can I achieve this?

Found the trick, need to select from "today" to "tomorrow":

Related

Google Sheets: Automatically Increment Date by 1 Month

I am currently using a budget sheet that automatically updates date cells to the next "payment" date for a bill. As an example:
=VALUE("2019-03-08")+14*FLOOR((NOW()-VALUE("2019-03-08"))/14)
The cell starts with a date and it then updates every 14 days to the new date. This shows me a cell that has the date of the biweekly payment that is due. In the above example, the cell shows the value of "2019-03-08" until 2 weeks have passed. Once 14 days have passed, the cell will automatically upload to "2019-03-22". This automation will continue forever in 14-day increments. The date displayed in the cell will always update automatically to the next 14-day date. This helps me display the exact due date of a biweekly payment without updating the cell.
I want to do the same thing for a monthly payment, but using a day count of 30 is not very accurate. Is there a way to modify this method to let me update the date automatically to the 24th of the month, every month, on that day. So I start with 2/24/2019 and when 3/24/2019 hits, the cell updates to that date, and so on. The reason this is not accurate is that the months are not all 30 day periods. February is 28 days and some are 31 days. I want the cell to increment in 1 month periods in the same way that the above formula updates in 14-day increments. As an example: The date will display "2/24/2019" until the same day on the next month occurs, then the cell will update to "3/24/2019". This process will continue forever with 4/24/2019, 5/24/2019, etc. It will continue with the year as well, so 12/24/2019 will change automatically to 01/24/2020.
UPDATE: Updated the description with examples of how the behavior works and what I am looking for...
It's much simpler than this. Use the EDATE function (e.g.):
=EDATE(A1,1)
Where A1 is your starting date and 1 is the number of months you which to increment by. See https://support.google.com/docs/answer/3092974?hl=en for more details.
this formula will increase the month every 24th and accounts for year change as well
=IF(DAY(TODAY())>=24,
DATE(YEAR(TODAY()), MONTH(TODAY())+1, 24),
DATE(YEAR(TODAY()), MONTH(TODAY()), 24))
paste where you need and drag down:
=VALUE("2019-"&ROW(A3)&"-08")+14*FLOOR((NOW()-VALUE("2019-"&ROW(A3)&"-08"))/14)

Grafana : Compare with same day of the week last year

I have dashboard with a single stat panel showing the number of bookings for the current day. I need to show the same information (in order to compare) for the same of the week for last year on the same dashboard.
I know there is the "Time shift" feature in the panel but I don't want to set 364 days because I will not be sure to compare the same day.
Is there an easy way to do that?
Reagards,
If you're using InfluxDB/Flux you could timeShift your data independently from the Grafana UI.

Tableau: time series chart displaying last day of month instead of first

In any time series chart, it looks like Tableau defaults to the first day of the month on the tick marks.
Is there a way for Tableau to show the last day of the month instead?
You can sort of force it by going into "Edit Axis", starting it on a month end, and 1 as the monthly interval. However, this is not a dynamic process and would require that I update this every time I had new data.
Anyone have any ideas? Thank you!
If in your data series you want each data point to represent the whole month, and you just want to label it with the last date of that month, then this workaround might work:
use calculated field to coerce all dates in the month to the last date of that month: DATEADD('day',-1,DATEADD('month',1,DATETRUNC('month',[Order Date])))
use this field as date in your time series
use 'More -> Custom -> Month / Day /Year' as display option for this field

Google Analytics API Start and End Date

What time of day are the periods? For example, if I have 2013-06-02 for "start-date", does that start at the beginning of the day at 00:00? If I have 2014-01-03 for "end-date", does that mean it ends at the end of the day at 23:59?
If this is true, setting "start-date" and "end-date to the same value will mean it will only return data that has happened during that day?
To put in less words, are both the start and end dates inclusive or exclusive?
That's correct. the dates are inclusive. If you set both start-date and end-date to the same value you will get all data for that specific day.
Also worth noting that they respect the time zone you configured in your View Settings.

Can't understand values being returned by Facebook Insights API

I don't understand the way the API returns values. Here's a sample of a page_impressions call, with 'week' as the period.
"values"=>
[{"end_time"=>"2012-01-08T08:00:00+0000", "value"=>1116},
{"end_time"=>"2012-01-09T08:00:00+0000", "value"=>1171},
{"end_time"=>"2012-01-10T08:00:00+0000", "value"=>1175}]
It seems that they're showing how many hits I had in the last 7 days up to the date in "end_time", is that correct? If it is, then I don't understand what use this would have, there is a huge overlap in the data.
How can I get the number of impressions of the last weeks instead? And how can I get more than 3 values to display? I really can't understand the logic behind this or how it could be useful.
What's happening here is that you're being given the total number of page_impressions for the 7-day period ending on each of the dates shown (i.e., how many times was the page seen over the past 7 days assuming the week ended on the end_time? and then on end_time+1? end_time+2)
Facebook is returning three (3) separate readings, presumably so you can spot/review very local trends (e.g., "are my weekly impressions creeping up?) or perhaps because you missed a measurement and want to have values for every day.
To answer your question specifically:
The 7-day period 2012-01-01 through 2012-01-08 12:00am* had 1,116 impressions.
The 7-day period 2012-01-02 through 2012-01-09 12:00am* had 1,171 impressions.
The 7-day period 2012-01-03 through 2012-01-10 12:00am* had 1,175 impressions.
As is quoted below, the end_time itself is always midnight in PDT. Thus, an end_time of 2012-01-08 really means the measurement stopped the night before, i.e., at 1 minute past 11:59pm on 2012-01-07.
From https://developers.facebook.com/docs/reference/fql/insights/:
The end of the period during which the metrics were collected,
expressed as a UNIX time (which should always be midnight, Pacific
Daylight Time) or using the function end_time_date() which takes a
date string in 'YYYY-MM-DD' format. Note: If the UNIX time provided is
not midnight, Pacific Daylight Time, your query may return an empty
resultset. Example: To obtain data for the 24-hour period starting on
September 15th at 00:00 (i.e. 12:00 midnight) and ending on September
16th at 00:00 (i.e. 12:00 midnight), specify 1284620400 as the
end_time and 86400 as the period. Note: end_time should not be
specified when querying lifetime metrics.