Stock split information from Alphavantage API - alpha-vantage

I'm trying to build a simple portfolio tracker application using Alphavantage API. In order to achieve this, I need to know what stock splits have occurred so I can adjust how many shares the user owns. Does Alphavantage give me a way to see data on stock splits (when the split occurred, and the ratio - 2 way , 4 way, etc?).

Related

Group by field and bin for CloudWatch Logs Insights line chart

I want to create a line chart with two lines in AWS CloudWatch Logs Insights. One line representing mobile users and the other desktop users, showing a success rate for each group of users.
This this is the code I am working with:
| fields
properties.device as device,
properties.success as success
| stats avg(success) by device, bin(1hour)
The results of this query look promising. As you can see, the results include the device type, a timestamp, and the floating-point number to be plotted on the line chart:
# device bin(1hour) avg(success)
1 desktop 2023-02-01T10:00:00.000 0.6129
2 mobile 2023-02-01T10:00:00.000 0.7453
3 desktop 2023-02-01T09:00:00.000 0.5578
4 mobile 2023-02-01T09:00:00.000 0.6082
However, the Visualization tab shows me this error:
The data is not suitable for a line chart.
Try a bar chart, or group your result by bin function.
I think Logs Insights is getting confused by my overlapping timestamps. It does not know that I intend one time series of mobile data and another of desktop data. To group by a field and bin by time, I seem to be doing the standard thing using a single by operation with two arguments. But it's not good enough to create a line chart.
Is there a better way to structure my query to convince CloudWatch of what I am trying to do?

Is it possible to schedule refresh different parts of a dataset?

I have a report on PowerBI that has many pages/tabs and each one also has alot of data being displayed. As I didn't design this, I'm going through the report to eliminate as much as I can and possibly splitting the report as alot of the data only requries refreshing once a week.
This is where my query comes in, I have information on one page that requires a refresh every two hours over a 12 hour duration, one field of data that requires a daily refresh and two more fields only require refreshing when required.
Is it possible to segment scheduled refreshes throughout a single part of the report, or does scheduled refresh only allow the entire report to be refreshed? (I.E. Sales status is hourly, Outbound status is daily, and sales summary is weekly)
I'd rather avoid having to split reports, as it is very handy to have them on one page; rather than having to open two and view them on multiple monitors.
I am just starting out on PowerBI reports, having been shown enough to get what I need done; but plan to delve further in, this being my first port of call if it is possible.
Thanks for any reponses in advance.
Brian.
No. It's Not Possible.
PowerBI Internal working like Tabular Model.
In Import mode we can not do incremental refresh also.
So other option is you can create Reporting layer and define denormilized with calucaluated columns Reporting tables.( Sales ,summary )
and use Direct query or Refresh and Do ETL for This table.
So you can schedule ETL for specific Tables i.e.Sales or summary.

Google Analytics API: tiny differences in results between GA API and Google Analytics UI

I'm querying GA Report API v4 to get some metrics for AdWords Keywords.
As dimension I use:
ga:keyword
As metrics I use:
ga:adClicks,
ga:adCost,
ga:CPC,
ga:sessions,
ga:bounceRate,
ga:pageviewsPerSession,
ga:goalConversionRateAll,
ga:transactions,
ga:transactionRevenue
When I compare results pulled from API with results that I'm getting by Google Analytics UI, I found out that certain metrics in some Keywords has tiny differences.
Also when I tried GA API v3 I had same result.
What is the reason?
Why some returned metrics for Keywords are fully identical to results in UI, but certain not?
I tried various date ranges: 1 day, week, month but in all cases I got some tiny differences in some metrics of certain Keywords.
Here is screenshot with example of differences in metrics how it looks like:
In red color means the difference, green color - means that values are identical
Problem: The reason for the discrepancy is that you are calling two different reports.
Report 1) UI Report.
As you have seen, this report is made up of two parts the first being Clicks, Cost, and CPC which are from the Google AdWords API, and the other metrics (sessions, bounce, etc.) which is from Google Analytics.
Because you are going into AdWords > Keywords, you are actually setting a filter to select only AdWords traffic.
Report 2) Custom Report.
This report is pulling the keywords dimension without any filters. This means that the report will also have data for organic keywords, and any UTM_term parameters set.
Because sessions from organic keywords have no AdWords data, the first three columns will be the same, however the Google Analytics specific columns will show variation in the metrics.
Solution:
To get your reports the same, you need to add a filter to your API request, such as ga:adwordsCustomerID or ga:source=google & ga:medium=cpc.

PowerApps datasource to overcome 500 visible or searchable items limit

For PowerApps, what data source, other than SharePoint lists are accessible via Powershell?
There are actually two issues that I am dealing with. The first is dynamic updating and the second is the 500 item limit that SharePoint lists are subject to.
I need to dynamically update my data source, which I am currently doing with PowerShell. My data source is not static and updating records by hand is time-consuming and error prone. The driving force behind my question is that the SharePoint list view threshold is 5,000 records however you are limited to 500 visible and searchable records when using SharePoint lists in the Gallery View and my data source contains greater than 500 but less than 1000 records. If you have any items beyond the 500th record that should match the filter criteria, they will not be found. So SharePoint lists are not optional for me until that limitation is remediated
Reference: https://powerapps.microsoft.com/en-us/tutorials/function-filter-lookup/
To your first question, Powershell can be used for almost anything on the Microsoft stack. You could use SQL server, Dynamics 365, SP, Azure, and in the future there will be an SDK for the Common Data Service. There are a lot of connectors, and Powershell can work with a good majority of them.
Take note that working with these data structures through Powershell is independent from Powerapps. Powerapps just takes the data that the data connector gives it, and if you have something updating the data in the background (Powershell, cron job, etc.), In order to get a dynamic list of items, you can use a Timer control and a Refresh function on your data source to update the list every ~5-20 seconds.
To your second question about SharePoint, there is an article that came out around the time you asked this regarding working with large lists. I wouldn't say it completely solves your question, but this article seems to state using the "Filter" function on basic column types would possibly work for you:
...if you’d like to filter the set of items that you are showing in the gallery control, you will make use of a “Filter” expression, rather than the “Search” expression, which is the default that existing apps used. With our changes, SharePoint connector now supports “equals” type of queries on columns that support filtering (Single line of text, choice, numbers, dates and people), so make sure that the columns and the expressions you use are supported and watch for the same warning to avoid reverting back to the top 500 items.
It also notes that if you want to pull from a list larger than the 5k threshold, you would need to use indexes, I have not fully tested this yet but it seems that this could potentially solve your problem.

Rendering ActivePivot in a web page

I would like to retrieve data from activePivot's cube by sending MDX with Rest request.
I tried to do it and I retrieved a json object then I parsed this json object to retrieve just specific information (look to the picture).
I had a look on this question : Can I connect ActivePivot to the tableau software?, but it is not complete.
Now I would like to render information whatever the request is, in a dynamic table in a web page. How can I do it?
You are trying to perform what we call the rendering of a Pivot Table from a CellSet. The CellSet (and optionally the corresponding Cube discovery information) are sufficient to perform this task and you could write it yourself by basically just iterating on the axes and the cells on the CellSet. There is no open-source library that will help you do so to my knowledge (the REST Api you are using is recent).
Since you are using ActivePivot you might be aware of ActivePivot Live 4 which is the UI front end for ActivePivot, which consumes the same API you are consuming and contains a TabularView component that performs what you are trying to do, with a lot of added features that could be interesting for you, named:
Lazy rendering (it can render very large CellSets quickly with a low memory footprint)
Support for real-time updates on the CellSet via a WebSocket query
Highly configurable table (you can customize the style of every element, programmatically or via a UI)
Columns can be reordered/pinned/resized
Capability to have a complex rendering of a column or a group of columns (sparklines, hierarchy trees for instance)
Components available as a library, so you can include them in your Angular application if you prefer
This product contains a lot more features that you can for instance see in these two videos (everytime you see a table with data this is the TabularView): https://www.youtube.com/watch?v=-B07d4meYbQ and https://www.youtube.com/watch?v=QMTVAtdpuRs .
So if you are using ActivePivot Live, you can display any MDX as a table in a div with the id table with the following code:
const servers = ActivePivotLive.api.queries.serversPool;
const server = servers.addActivePivotServer({url: 'http://localhost:9090'});
conat tabularView = ActivePivotLive.api.widgets.createTabularView()
.withMdx(yourMdx)
.within('table');
Then later you can change the mdx with
tabularView.getQuery().setMdx(newMdx)
So that you can wrap this inside an Angular directive for instance.
Otherwise you will have to implement it yourself but can of course ask for help here if you have particular issues or bugs you encounter while trying to implement it.