HighStock setup - api

I am working with HighStock to create a chart for stocks of various companies. In the API, it does not tell me how to retrieve the data about a stock, it is simply retrieving it in a JSON file. I am wondering if a stock parameter (Example: 'AAPL' or 'GOOG') can be passed in to retrieve this information.
HighStock Website
HighStock Examples

The Highcharts/Highstock charts by default have turboThreshold that is used to save on expensive data checking and indexing in long series. So if you have a chart that is larger than the 1000 data points you have to do some server side processing to be able to display the chart. This example explains and illustrates that principle. Notice how when the zoom level changes the charts interval of data points changes. At first the interval is monthly as you zoom in it changes to semi-monthly, weekly, daily, hourly, and then when fully zoomed in minute.
This sample shows what is being done on the server to handle the current zoom level.
Highstock charts do not have any parameter(s) to retrieve information from any stock API. You have to code that functionality yourself. What I would suggest is using server side code to get the information from the API. Then format that data into a series with points and send it to the Highstock chart. keep in mind if you have a lot of data point to display you will have to do some sort of processing before sending it to the chart. If you send a series to a chart that has too many data points, the chart will simply not show the series.
So, make an effort at trying to produce the code needed to accomplish all of this. If you have any specific question during the process, hit us up.

Related

Is there a way to access raw data stored in Youtrack?

In Youtrack reports, you can view the issues by two fields using creation date as y-axis and any other field as x-axis. But when you do that like in this graph you view number of issues that are currently in the state stated in x-axis. For example, if the x-axis is the state, then you will see the current states of the issues that are created in the date intervals of the y-axis. But I also want to see the number of issues in each state in a chronological way. I want to see the states (or some other field) of the issues in May 21, 2021 (not their current states but their states in May 21).
I know that Youtrack keeps the state changes and their dates and many other data like that because in different reports, I can see that the Youtrack uses past data but usually there is no way to download the data of those reports.
I want to access all those raw data. My plan is to create some reports that are not available in Youtrack Reports, using R or Python. Is there a way to access those raw data, or a guideline to access them?
The way to access raw data in YouTrack is through the REST API. For example, you can get the issue's activity data to retrieve the history of changes applied to the issue. This way you can identify how things have changed chronologically.
I can see that the Youtrack uses past data but usually there is no way to download the data of those reports.
Report's data can be accessed via API as well. The report's API endpoint is api/reports, however, it's not documented as it may be subject to change. In this case, we can't guarantee backward compatibility. If you are fine with it, you can still use it. To see the exact request, check the network requests in the browser when loading a report.

Transferring data from website to google docs

So I want to transfer information from a returned order from our website and I want to click a button and transfer some of that orders information (date it was received, order #, part#, quantity of # being returned.).
What's the fastest way to do this?
As of right now we are doing google docs spreadsheet to keep track of what is being returned and I am writing down every return manually.
Can we create a script or program that runs everytime this task is performed? It doesn’t seem like a big task but how do I do that?
You can check this API https://developers.google.com/sheets/ This allows for manipulation of data in the Google Excel sheets.

Get data from google sheet programatically if the sheet is modified

I am using below link to access data from google sheet:
https://sheets.googleapis.com/v4/spreadsheets//values/?key="API_Key"
Now I don't want data every time unless it is modified. Every time I will make API call and if the data is modified then I want those specific data rather than having complete data from the sheet. Or if getting specific data is not feasible then complete data will also work for me.
Any help is appreciated!
you'll still need to get the list of revisions before you get the latest one. Its discussed more in Manage Revisions of the Drive documentation. Once you've called the revisions:list, just pick the Revision you want from the list (conditional loop)

Pulling Burndown Charts From Visual Studio Online API

I'm trying to pull burndown charts for sprints from VSO to display alongside other project data. I'd assume that there is no way to pull an actual image or URL to the burndown, although that would be ideal. If this is not possible, is there some way to pull values that I could use to re-create a chart? I've been digging through the API for a few days with no luck so far.
So basically, I need to pull SOMETHING from VSO that will allow me to display the burndown for the current sprint of a project, in some way.
This is a pretty late answer, but it is possible as of now to get the image of burndown chart directly from Azure DevOps using Chartimages - Get Iteration Chart Image API:
GET https://dev.azure.com/{organization}/{project}/{team}/_apis/work/iterations/{iterationId}/chartimages/{name}?width={width}&height={height}&showDetails={showDetails}&title={title}&api-version=5.1-preview.1
For burndown chart, {name} = Burndown.
Reference:
https://learn.microsoft.com/en-us/rest/api/azure/devops/work/chartimages/get%20iteration%20chart%20image?view=azure-devops-rest-5.1
The data for the burn down is calculated by using a standard query with an 'as of' Param.
The as of param is only available in the API and returns the results as it would have on that date. If you count the work within the scope that you want for each day you will have the data.
I would recommend caching the results.

How do I use the version one api to get project and sprint burndown charts?

I am trying to use the Version One api to get the project and sprint burndown charts.
I am reading this page but I am just getting confused.
Has anybody done something similar and have any tips for how to hit the api to get what I want?
The VersionOne api does not serve images or chart specific data. You can use the query language and the rest endpoint to produce the data that is needed for a burndown. You would need to be able to read/parse the data and produce a graph yourself.
With that being said, a burndown graph compares how much closed estimate versus how much open estimate and graphs that over time. So you need to know three pieces of data: open estimate, closed estimate, and time. You'll also want to limit it to a certain project (and it'd children).
This should get you close to the data you need for a project burndown:
http://<host>/VersionOne/rest-1.v1/Data/Timebox?where=Schedule.ScheduledScopes='Scope:1055'&sel=Name,BeginDate,EndDate,Workitems:Story[AssetState!='Closed'].Estimate.#Sum,Workitems:Story[AssetState='Closed'].Estimate.#Sum&sort=+EndDate
Be sure to change Scope:1055 to the project oid that you're interested in.
This is how I got there. First I was thinking "well you need to sum up a bunch of story estimates" so I thought I'd do a historical query of stories:
http://<host>/VersionOne.Web/rest-1.v1/Hist/Story?where=Scope.ParentMeAndUp='Scope:1055'
But quickly found that you cannot aggregate on your root. What that means is if I want to sum up estimate, I need to use something else like Project (scope) to get at the data:
http://<host>/VersionOne.Web/rest-1.v1/Hist/Scope/1055?sel=Workitems:Story[AssetState!='Closed'].Estimate.#Sum,Workitems:Story[AssetState='Closed'].Estimate.#Sum,ChangeDate
The problem with this query is is gives you what the closed versus open estimate looked like at weird intervals; namely whenever the project changed. So it wouldn't make a very nice looking graph.
But as you know VersionOne has a concept of Iterations and Schedules that are associated to a project, and stories are associated to iterations. So I used that as a root to query for and aggregate story estimates, and limit the data to projects that use that schedule.
The data that is produced is more regular (grouped by iteration) and contains correctly aggregated estimate data.
So what is left? You'll have to aggregate the aggregation of estimate data to get a total estimate number for your project. Then you'll need to produce a graph (maybe bar or line) where each data point is at the end of an iteration. You'll keep a running total of closed estimate and add that to the iteration's total to produce the data point.
You need to do multiple queries to produce a burndown. First find the date range for the burndown:
/Data/Timebox?sel=BeginDate,EndDate&where=Name='X'
Now for every day the date range, sum up the ToDo hours as of that point in history:
/Hist/Timebox?asof=2013-08-09T23:59:59&where=Name='X'&sel=Workitems[Team.Name='Y';AssetState!='Dead'].ToDo.#Sum
The API and documentation are excellent. If you are interested in seeing the code for some custom reports, check out https://github.com/timothypratley/vone/blob/master/src/vone/models/queries.clj (the code is in Clojure). There is a burndown, cumulative flow, and more :)
There is now a "recipe" to query for burndown data that works with the query.v1 API endpoint.