Plotting a time series
I have this problems:
A user should be able to choose some data from an access db and ask for a plotting. I am trying this:
a) Servlet A queries the data base and presents all choices for user. User chooses one and submit it to Servlet B;
b) Servlet B queries the values;
c) using serialzation, an applet gets the values from Servlet B and plot them.
The problem is that Seervlet B cannot call the applet and when the applet calls Servlet B, it seems that the data are not available. Is there a way to resolve?
thanks no any one. amaral
Sorry to say that, but that is not an advanced language topic as to my understanding.
Anyway, why do you want to plot using an applet? Create a gif with the plot on the server.
Similar Messages
-
Scatter plot using time series function - Flash charting
Apex 3 + XE + XP
I am trying to build a time series scatter plot chart using flash chart component.
Situation :
On each scout date counts are taken within each crop. I want to order them by scout dates and display them in a time series chart. Each series represents different crop.
I am posting the two series queries I used
Queries:
Series 1
select null LINK, "SCOUTDATES"."SCOUTDATE" LABEL, INSECTDISEASESCOUT.AVERAGECOUNT as "AVERAGE COUNT" from "COUNTY" "COUNTY",
"FIELD" "FIELD",
"VARIETYLIST" "VARIETYLIST",
"INSECTDISEASESCOUT" "INSECTDISEASESCOUT",
"SCOUTDATES" "SCOUTDATES",
"CROP" "CROP"
where "SCOUTDATES"."CROPID"="CROP"."CROPID"
and "SCOUTDATES"."SCOUTID"="INSECTDISEASESCOUT"."SCOUTID"
and "CROP"."VARIETYID"="VARIETYLIST"."VARIETYLISTID"
and "CROP"."FIELDID"="FIELD"."FIELDID"
and "FIELD"."COUNTYID"="COUNTY"."COUNTYID"
and "INSECTDISEASESCOUT"."PESTNAME" ='APHIDS'
and "VARIETYLIST"."VARIETYNAME" ='SUGARSNAX'
and "COUNTY"."COUNTNAME" ='Kings' AND CROP.CROPID=1
order by SCOUTDATES.SCOUTDATE' ASC
Series 2:
select null LINK, "SCOUTDATES"."SCOUTDATE" LABEL, INSECTDISEASESCOUT.AVERAGECOUNT as "AVERAGE COUNT" from "COUNTY" "COUNTY",
"FIELD" "FIELD",
"VARIETYLIST" "VARIETYLIST",
"INSECTDISEASESCOUT" "INSECTDISEASESCOUT",
"SCOUTDATES" "SCOUTDATES",
"CROP" "CROP"
where "SCOUTDATES"."CROPID"="CROP"."CROPID"
and "SCOUTDATES"."SCOUTID"="INSECTDISEASESCOUT"."SCOUTID"
and "CROP"."VARIETYID"="VARIETYLIST"."VARIETYLISTID"
and "CROP"."FIELDID"="FIELD"."FIELDID"
and "FIELD"."COUNTYID"="COUNTY"."COUNTYID"
and "INSECTDISEASESCOUT"."PESTNAME" ='APHIDS'
and "VARIETYLIST"."VARIETYNAME" ='SUGARSNAX'
and "COUNTY"."COUNTNAME" ='Kings' AND CROP.CROPID=4
order by SCOUTDATES.SCOUTDATE' ASC
Problem
As you can see the observations are ordered by scout date. However when the chart appears, the dates dont appear in order. The chart displays the data from crop 1 and then followed by crop 4 data, which is not exactly a time series chart. Does flash chart support time series or they have no clue that the data type is date and it should be progressive in charting ? I tried to use to_char(date,'j') to converting them and apply the same principle however it did not help either.
Any suggestions ?
Message was edited by:
tarumugam
Message was edited by:
aruArumugam,
All labels are treated as strings, so APEX will not compare them as dates.
There are two workarounds to get all your data in the right order:
1) Combine the SQL statements into single-query multi-series format, something like this:
select null LINK,
"SCOUTDATES"."SCOUTDATE" LABEL,
decode(CROP.CROPID,1,INSECTDISEASESCOUT.AVERAGECOUNT) as "Crop 1",
decode(CROP.CROPID,4,INSECTDISEASESCOUT.AVERAGECOUNT) as "Crop 4"
from "COUNTY" "COUNTY",
"FIELD" "FIELD",
"VARIETYLIST" "VARIETYLIST",
"INSECTDISEASESCOUT" "INSECTDISEASESCOUT",
"SCOUTDATES" "SCOUTDATES",
"CROP" "CROP"
where "SCOUTDATES"."CROPID"="CROP"."CROPID"
and "SCOUTDATES"."SCOUTID"="INSECTDISEASESCOUT"."SCOUTID"
and "CROP"."VARIETYID"="VARIETYLIST"."VARIETYLISTID"
and "CROP"."FIELDID"="FIELD"."FIELDID"
and "FIELD"."COUNTYID"="COUNTY"."COUNTYID"
and "INSECTDISEASESCOUT"."PESTNAME" ='APHIDS'
and "VARIETYLIST"."VARIETYNAME" ='SUGARSNAX'
and "COUNTY"."COUNTNAME" ='Kings'
AND CROP.CROPID in (1,4)
order by SCOUTDATES.SCOUTDATE ASC2) Union the full domain of labels into your first query. Then the sorting will be applied to the full list, and the values of the second series will be associated with the matching labels from the first.
- Marco -
Time series chart doesn't work
I am trying to create a simple time series chart, plotting five time series over a 5 year period. I have a table with the time series in rows, but when I select the chart to graph it, the data appears as if the time series is in the columns! Then, when I re-created the chart with the data in the columns and selected it, it created the same chart! I tried "transposing" the columns and rows as the "Help" command suggested, by going into the "Data Series" box, but it won't accept any input in the box. Help.
Hello
(1) Before charting time or duration values, I convert them as decimal numbers representing a decimal number of days (you may choose a decimal number of hours or a decimal number of minutes).
Here is what I get.
It appears that the chart tool defaults to the orientation where there is the greater number of values.
This is the case for Graphique 1 and for Graphique 2
Clicking on the orientation button I may change the behavior accordingly as I did for Graphique 1 rotate and Graphique 2 rotate.
I don't see any oddity here.
Just for info, to build the transposed tables, I didn't used the TRANSPOSE() function but formulas like:
B9 =OFFSET($D$2,COLUMN()-COLUMN($B$9),ROW()-ROW($B$9))
fill down, fill right
G9 =OFFSET($I$2,COLUMN()-COLUMN($G$9),ROW()-ROW($G$9))
fill down, fill right
Yvan KOENIG (from FRANCE mercredi 28 janvier 2009 14:29:02) -
Time series analysis in Numbers
Has anyone done any chart showing time series analysis in Numbers? I could not find a way to change the axis to reflect the right data series.
Hi sanjay,
Yes, Numbers has a different style. Instead of a single large, multi-purpose table, Numbers uses several small tables, each with a purpose.
To plot a time series (or any Category graph) the X values must be in a Header Column. Here is a database of measurements over time as a tree grows:
That database can be left alone. No need to juggle with it. You can even lock it to prevent accidental edits.
A table to pull data and graph them:
Formula in B1
=Tree Data::B1
Formula in B2 (and Fill Down)
=Tree Data::B2
Next graph, pull some other data
(Scatter Plots do not require X data to be in a Header Column. Command click on each column to choose.)
Regards,
Ian. -
Is there a standard way to create a time series chart in Apex 4.2?
The line chart does not take into account irregular time intervals - it assumes that the data points on the X axis are equally spaced, its just really a bar chart but with a line instead.
The scatter chart handles the x axis values correctly but does not have the option to join the points with a line, so all sense of time series trend is lost.
Using the line chart I can fudge the values to add extra null values for a defined list of dates so that the spacing of points is more accurate, but this is only really ok when say there is one point per day and there may be missing days. If there are sometimes 3 points per day or zero points per day this approach is too cumbersome.
Alternatively I can change the scatter chart to use a line. Anychart has the option to use a line (line_style) but this isn't included in apex and it cant be added to the XML because it exists within the #DATA# section so the only way would be to fudge the series query to bring that back before the data.
I would have thought that a time series plot would be quite a common requirement - have I missed it somewhere?
KathrynHi thanks for the reply.
I have attached the report I have made. I have written a VBA code to fill in all the details and graphs accordingly. Now the test requirements are as given in the table. I need to specify that in the graph. I dont want the encircled straight line. Just the 2 limits from 10 to 30 ms. In fact the more correct and logical wasy of representing the limits would be 3 horizontal lines, 1 at 10 ms from 22.5-27.5g, 1 at 20 ms from 17.6-22.6g and 1 at 30 ms from 12.5-18.5g.
Hope i have put my doubt across clearly. Again with the code you have given, I dont know how to 'tell' diadem to plot that particular graph in that particular X-Y plot in the report/LPD.
For the 2 lines, this is the code i have written.
'Find 10 ms time
L3= ChnLength(1)
L4 = 0
Do while (L4 < L3)
L4= L4 + 1
R1= ChD(L4,1)
If (R1 > 0.01) Then
Exit Do
end if
Loop
L4= L4 - 1
LT10=L4
'Find 20 ms time
Do while (L4 < L3)
L4= L4 + 1
R1= ChD(L4,1)
If (R1 > 0.02) Then
Exit Do
end if
Loop
L4= L4 - 1
LT20=L4
LT1 = LT20-LT10
For i = 0 to LT1 'Lt1 is var for channel length from 10 ms to 20 ms
ChD(LT10+i,"Upper limit") = 27.5-(4.9*i/LT1)
Next
Thanks again. Waiting for your kind help!
Attachments:
neck cal.jpg 150 KB -
Plot line in the middle of a time series
Hi
I am trying to plot the limits for a graph. These limits are specified for 10, 20 and 30 ms (In particular I want to plot the limits for neck calibration tests for H3 dummy calibration). For this I need to draw a line from 10 ms to 30 ms. How do I do this? So far I am generating a channel by using either chnlingen or chngenval or chd. But when I generate values from the middle obviously it makes the values from start of the time series to the point equal to 0.
Another problem im facing is in plotting a vertical line. How can I do this?Hi thanks for the reply.
I have attached the report I have made. I have written a VBA code to fill in all the details and graphs accordingly. Now the test requirements are as given in the table. I need to specify that in the graph. I dont want the encircled straight line. Just the 2 limits from 10 to 30 ms. In fact the more correct and logical wasy of representing the limits would be 3 horizontal lines, 1 at 10 ms from 22.5-27.5g, 1 at 20 ms from 17.6-22.6g and 1 at 30 ms from 12.5-18.5g.
Hope i have put my doubt across clearly. Again with the code you have given, I dont know how to 'tell' diadem to plot that particular graph in that particular X-Y plot in the report/LPD.
For the 2 lines, this is the code i have written.
'Find 10 ms time
L3= ChnLength(1)
L4 = 0
Do while (L4 < L3)
L4= L4 + 1
R1= ChD(L4,1)
If (R1 > 0.01) Then
Exit Do
end if
Loop
L4= L4 - 1
LT10=L4
'Find 20 ms time
Do while (L4 < L3)
L4= L4 + 1
R1= ChD(L4,1)
If (R1 > 0.02) Then
Exit Do
end if
Loop
L4= L4 - 1
LT20=L4
LT1 = LT20-LT10
For i = 0 to LT1 'Lt1 is var for channel length from 10 ms to 20 ms
ChD(LT10+i,"Upper limit") = 27.5-(4.9*i/LT1)
Next
Thanks again. Waiting for your kind help!
Attachments:
neck cal.jpg 150 KB -
Warning, CR Newbie here so this may be a stupid question. I am evaluating the trial version of CR to see if it will be a good fit for an upcoming project. I've seen some related posts in the SCN, but no answers that quite fit.
I'm looking to create a line chart (or a scatter chart) with time-series data. My dataset includes a time stamp field (yyyy-MM-dd hh:mm:ss) and some floating-point temperature values like this:
2014-05-01 08:00:00, 123.4, 115.1, 109.2
2014-05-01 08:00:10, 123.6, 116.0, 109.8
The desired outcome has the date / time along the X-axis with data points spaced proportionally in the X dimension and plotted in the Y-dimension according to the temperature. The interval between the time stamps is not always the same, so numerical scaling is required on both axes. The desired chart would show a temperature scale along the vertical axis, three trend lines for the three series of temperature data and times shown on the X axis label.
I've played with several options in an attempt to make this work. On the data tab, it would seem I would want to select "on change of" and then my time-stamp field. However, with this selection, I can only use summary values and end up with a chart with a single data point for each series. I don't need or want any summary calculations carried out on the data, I just want to plot it so I can look at a trend over time. I can get trend lines if I select "for each record" on the data tab of the wizard, but then my X-axis is meaningless and the horizontal scaling is misleading unless the interval between my samples is constant.
I would welcome any suggestions on how best to accomplish this with Crystal Reports.
Thanks for reading.Jamie,
Thanks for continuing to reply. I am getting close, but still no success.
Here is the procedure I've followed and problem:
Put chart in RF section
Start Chart Expert
Chart Type = Numeric Axes, subtype = Date axis line chart
Data tab
On change of datetime field
Order... ascending, printed for each second
Values avg of my data fields (must select summary when on change of is used)
Right-click on X-axis label, select Group (X) Axis Settings
Scales tab: base unit, major unit and minor unit can only be set to days, months or years
I cannot set the minimum and maximum date with resolution other than day
Right-click Chart, select Chart Options...Axes tab: show group axes set to show time scale
No matter the setting I use, I can't find a way to adjust the resolution of the time scale lower than days.
I tried using a formula to extract only the time portion of my datetime field. I used that as my "on change" data series, hoping maybe CR would automatically recognize I was looking at a fraction of a day if I did that. No good - now it gives me a date scale with the dates showing up as the beginning of the epoch, but I can still only get resolution of integer days.
Thanks for your patience and persistence.
- Max -
Read optimization time-series data
I am using Berkeley DB JE to store fairly high frequency (10hz) time-series data collected from ~80 sensors. The idea is to import a large number of csv files with this data, and allow quick access to time ranges of data to plot with a web front end. I have created a "sample" entity to hold these sampled metrics, indexed by the time stamp. My entity looks like this.
@Entity
public class Sample {
// Unix time; seconds since Unix epoch
@PrimaryKey
private double time;
private Map<String, Double> metricMap = new LinkedHashMap<String, Double>();
as you can see, there is quite a large amount of data for each entity (~70 - 80 doubles), and I'm not sure storing them in this way is best. This is my first question.
I am accessing the db from a web front end. I am not too worried about insertion performance, as this doesn't happen that often, and generally all at one time in bulk. For smaller ranges (~1-2 hr worth of samples) the read performance is decent enough for web calls. For larger ranges, the read operations take quite a while. What would be the best approach for configuring this application?
Also, I want to define granularity of samples. Basically, If the number of samples returned by a query is very large, I want to only return a fraction of the samples. Is there an easy way to count the number of entities that will be iterated over with a cursor without actually iterating over them?
Here are my current configuration params.
environmentConfig.setAllowCreateVoid(true);
environmentConfig.setTransactionalVoid(true);
environmentConfig.setTxnNoSyncVoid(true);
environmentConfig.setCacheModeVoid(CacheMode.EVICT_LN);
environmentConfig.setCacheSizeVoid(1000000000);
databaseConfig.setAllowCreateVoid(true);
databaseConfig.setTransactionalVoid(true);
databaseConfig.setCacheModeVoid(CacheMode.EVICT_LN);Hi Ben, sorry for the slow response.
as you can see, there is quite a large amount of data for each entity (~70 - 80 doubles), and I'm not sure storing them in this way is best. This is my first question.That doesn't sound like a large record, so I don't see a problem. If the map keys are repeated in each record, that's wasted space that you might want to store differently.
For larger ranges, the read operations take quite a while. What would be the best approach for configuring this application?What isolation level do you require? Do you need the keys and the data? If the amount you're reading is a significant portion of the index, have you looked at using DiskOrderedCursor?
Also, I want to define granularity of samples. Basically, If the number of samples returned by a query is very large, I want to only return a fraction of the samples. Is there an easy way to count the number of entities that will be iterated over with a cursor without actually iterating over them?Not currently. Using the DPL, reading with a key-only cursor is the best available option. If you want to drop down to the base API, you can use Cursor.skipNext and skipPrev, which are further optimized.
environmentConfig.setAllowCreateVoid(true);Please use the method names without the Void suffix -- those are just for bean editors.
--mark -
I've created a time series graph on numbers on my iMac but I need to add moving averages. Is there a function an if so where is it and if not is there a way to get around it
Badunit,
Here is an example plot, data sorted from most recent data at top of the table...
You can see the moving average (of 20) is plotted from right to left.
The Moving Average calculation is now wrong, and should have been calculated and presented from oldest to most recent.
Here is the same data, with table sorted from oldest data at the top of the table.
The moving average is also plotted from right to left, and shows the correct Moving Average for the most recent data.
That is, it is calculated from oldest to most recent, with the last Moving Average data point plotted on "todays" date.
What I want to see is my table displayed from most recent at the top (the top table), and moving average calculated and displayed as per the bottom graph.
Edit: So, think about this some more,
I need an option to tell Numbers to do the Moving Average calculation from the bottom of the table up, not from the top of the table down. -
Choose Plot Columns as Series or Plot Rows as Series from the pop-up menu in the bottom ba
I am trying to construct a 2D graph in Numbers 3.5 (2109) that shows at two time points the voting intentions by political party. The instruction given by Help is below, but I cannot find the bottom bar or the pop-up box.
Switch rows and columns as data series
When you add a chart, Numbers defines default data series for it. In most cases, if a table is square or if it’s wider than it is tall, the table rows are the default series. Otherwise, the columns are the default series. You can change whether rows or columns are the data series.
Select the chart.
Choose Plot Columns as Series or Plot Rows as Series from the pop-up menu in the bottom bar.
Bar showing options to plot rows or columns as series
Click Done.Hi Phil,
Click once on the chart (graph) to select it. Then click on Edit Data References. The pop-up appears bottom left of the Numbers window.
Regards,
Ian. -
Can Numbers handle time series?
I have a time series and i want to display the data in a diagram. The intervals of the points in time vary. I found no option to display the values in a digram so that values that are close in time are displayed close to each other and greater gaps are displayed further apart. Unfortunately all values are displayed in a constant interval.
Is there a solution, other than creating a table with all possible dates and inserting values only in rows where data is available?
MartinIn the old Numbers you can use an x-y scatter plot with dates for the x axis. Numbers 3.0 seems to accept the dates but displays them wrong on the scatter chart, as large numbers rather than dates.
Please do give Apple feedback on this, in your menu Numbers>Provide Numbers Feedback.
SG -
Balance for open periods in a time series enabled cube
Hi,
We have a request to calculate balance for open periods in a time series enabled cube, I don’t there is any inbuilt function for this.
Any ideas on how to calculate this without adding new members/formulae in the time dimension. Currently we compute this in the report
EX:
BOY(May) = Jun+Jul + … + Dec
Thanks,You will have to add a member somewhere. Suppose you add it in scenario, then you could use sumrange for the current member range offsetting the current monthe by 1 and use null for the end month wich gives you the last month in the time dim.
-
Order Series key figure is considered as Time Series
Hi Gurus,
I'm adding a new Key FIgure (Order type) into a copied version of SNP Planning Area.
I have assigned category and therefore category group and, applied similar settings like other KFs (Planning Area, Planning Bokk...). The thing is when going into Data View, it's not behaving as an Order Type and saves its data as a Time Series. Thus no "detailed information" appears when I right-click in the bucket.
Do you have any idea where my settings are wrong?
PS: I'm using SCM 7.0 module version
Many thanks & regards,
DavidHi David,
You defined the keyfigure as order keyfigure.So when enter value in this keyigure system tries to create order as per keyfigure function which is assigned to this keyfigure.please note that not all the keyfigure functions creates the order.
If your keyfigure function is anyone of the following then system creates the stock transaport order:
4001
4015
4002
4007
4006
4013
4018
4019
4020
If your keyfigure function is anyone of the following then system creates planned orders:
2001
9020
2007
If your keyfigure function is anyone of the following then system creates forecast:
1002
1003
1004
Hope this information will helps you.
Regards,
Sunitha -
TODATE time series function in OBIEE 11g
Hi,
I have a problem with time series function. I have month level in time dimension hierarchy.
I have used below expression to get month to date results in my reports.
column
expression----> TODATE(fact.measure, hierarchy.Month level);
when i am using this column in my reports it is showing null values. The below error i am getting in view log files
----------------> Converted to null because it's grain is below query's grain
Note: Here i have measures, year,qtr,month,day,shift,hour in single physical table in physical layer.
Is it a problem to have measures and time columns in a single physical table?
Please let me know if you have any solution.
Thanks,
AvinashYes, it shud be a prob. Try using seperate tables for fact n timedim
-
Regarding Time Series Graph in OBIEE 11g
Hi,
I need to create a time-series graph in OBIEE 11g. However, the value for time on the x-axis of the graph automatically comes for days.
Is there any way to change it to hours or minutes?
Thanks,
Naman MisraYes, it shud be a prob. Try using seperate tables for fact n timedim
Maybe you are looking for
-
Which final cut is best for macbook pro with snow leopard?
which final cut is best for macbook pro with snow leopard?
-
Purchase requisition & Purchase order Workflow
Hi, We have activated workflow for Purchase requistion & Purchase order. Workflow is working fine but the client requirement is to have mail to be triggered to the person who creates purchase requisition or purchase order through workflow to go ahead
-
AP Authentication feature in Cisco 1242AG/1310G
Dear All, can you tell me please what I can define in the menu Security--> AP Authentication in the AIRONET 1242AG and 1310G APs ? Is this feature for LWAPP only [authentication of AP against LWAPP Controller] ? Thanks.
-
SINCE I UPDATED TO YOSEMITE 10.10.1
These are my laptop specs: MACBook Pro Retina 13 (Late 2013), 2.4 GHz Intel Corei5 8 GB 1600 MHz DDR3. Since I updated to OS Yosemite 10.10.1 Safari turned out to be slow in downloading data (my fellows' PC's are faster over the same network) and for
-
Can't convert MOV to AVI - turns black
hi all, i've converted thousands of files to AVI from MOV's....suddenly, when i convert them, they turn black i ususally convert from Uncompressed MOV to Uncompressed (using NONE codec) AVI and no problems. but now, the file just turns black help/???