How to get position of inkml data from OneNote API? - microsoft-graph-api

I am able to retrieve a page with inkML data from OneNote API as described here:
https://developer.microsoft.com/en-us/onenote/blogs/onenote-ink-beta-apis/
When the page is retrieved via the api (page data and inkML data).
How do I know the X, Y position (see image) of the inkml data to present it in relation to the textual data from that page?

The way you have drawn the page is correct. The info retrieved from the API is in the format
<inkml:trace xml:id="st0" contextRef="#ctxCoordinatesWithPressure" brushRef="#br0">1423 7569 3456,x,y,F,etc.
Where x and y co-ordinates have their origin from the top left of the page (f is pressure).
Check the following InkMLjs github page for an example implementation dragdrop.html + inkml.js. Just save your retrieved (or generated) InkML data and drop it into the dragdrop.html webpage to display it.

Related

I am unable to see the Full Data(Analysis -> View data) in Tableau

My data contains around 10000 records.
I have published my workbook in the browser. I am able to see the summary and full data in Tableau (2022.1.1) version.
But I am unable to see the content in Full data in View data ( version - 2021.4.8).
Thanks in Advance.
Firstly, "View Data" is just a preview option for your data and it will only show those fields which belong to the viz used in your dashboard

anyone got mapdeck working with OSGB vector tiles?

Trying to stretch my understanding of how mapdeck can plot maps and the new (new to me) Ordnance Survey Vector Tile API that can display 3D buildings
See
https://labs.os.uk/public/os-data-hub-examples/os-vector-tile-api/vts-example-3d-buildings
Has anyone any advice about how to reference the labs.os.uk data as a layer in mapdeck?
I suspect it is not possible to set a transformRequest function when using Mapbox via Mapdeck.
But you can probably do it by downloading the tile json from https://api.os.uk/maps/vector/v1/vts&key=your_os_api_key&srs=3857
Edit by appending &srs=3857 to the "tiles" url.
Save the edited tile json to your server.
Then download a copy of the 3d style json from https://github.com/OrdnanceSurvey/OS-Vector-Tile-API-Stylesheets/blob/master/OS_VTS_3857_3D.json
Edit by appending &key=your_os_api_key to the "sprite" and "glyphs" urls, and edit the "sources" "url" entry to point the tile json on your server.
Save the edited style json to your server.
Hopefully Mapdeck can then be used with style = parameter set to the url of the style json on your server.

Google Spreadsheet getting text with importxml

I've tried this and other versions to no avail? Can anyone help please?
=IMPORTXML("http://performance.morningstar.com/fund/ratings-risk.action?t=MWTRX", "//*[#id='div_ratings_risk']/table/tbody/tr[4]/td[3]/text()")
As explained in the comments to your original question, initially the div Element with the id #div_ratings_risk is initially empty and does not consist of a table.
So Google spreadsheets is not able to parse content that is not there and yet needs to be loaded first.
The content (table) you try to fetch data from into your google spreadsheet is dynamically loaded using jQuery from another URL. You can get that URL using e.g. the chrome developer tools and filter for XHR request.
If you parse the content directly from that HTML it will work. So you would need to change your formula to that URL and adapt your XPath like so:
=IMPORTXML("http://performance.morningstar.com/ratrisk/RatingRisk/fund/rating-risk.action?&t=XNAS:MWTRX&region=usa&culture=en-US&cur=&ops=clear&s=0P00001G5L&ep=true&comparisonRemove=null&benchmarkSecId=&benchmarktype=", "//table/tbody/tr[4]/td[3]/text()")

How can I get list of all data set codes of Quandl API?

I want list of all dataset codes for each company,Ex. for Facebook dataset code is FB,for MICROSOFT it is MSFT.How can I get such list of all available codes for data sets ??
You can get the list of all the available datasets in a database provided you have the database name.
GET https://www.quandl.com/api/v3/datasets?database_code=<database-name>&api_key=<api-key>
Replace the value <database-name> and <api-key> in the above URL. This will return a list of dataset object. Each object will have a dataset_code field having the required value.
Make sure you register on the quandl website for getting the access key. You do not have to pay or give credit card details for registration.
For JSON response you can use the below. Also you can mention the current page and page size as below -
https://www.quandl.com/api/v3/datasets.json?database_code=${databaseCode}&api_key=${apiKey}&current_page=${currentPage}&per_page=${perPage}

Google XPATH importxml can find "show" but not "showcount" or "count" [duplicate]

This question already has answers here:
Scraping data to Google Sheets from a website that uses JavaScript
(2 answers)
Closed last month.
Using this webpage as an example http://forums.macrumors.com/showthread.php?t=1688317
On a google spreadsheet, the following DO NOT work with importxml():
//a[contains(#href,"showpost")]/#href
//a[contains(#href,"showcount")]/#href
//*[#id="postcount18545482"]
The last one (//*[#id="postcount18545482"]) was copied directly from Chrome's element viewer.
The following DO work but exclude any results with the word "showcount", "postcount", or "showpost":
//div[contains(#id,"post_message")]/#id
//a[contains(#href,"show")]/#href
//a[contains(#href,"post")]/#href
Is there something special about the word "count" when working with importxml() or XPATH? How can I get the missing entries?
ImportXML function in Google Docs spreadsheet can not process data that is created in a two-step process. For example, when an authentication token must be retrieved first before making the url request, or when the URL tells the server to dynamically create an xml output after which the user is redirected to the output, even when the URL stays the same. You might want to look into Google Apps Scripts (http://code.google.com/googleapps/appsscript/index.html) to handle this case.
Taken from here
In your particular case the anchor parameters get set in the vbulletin_post_loader.js script called after the page container is loaded.
...
pc_obj=fetch_object("postcount"+this.postid);
openWindow("showpost.php?"+(SESSIONURL?"s="+SESSIONURL:"")
+(pc_obj!=null?"&postcount="+PHP.urlencode(pc_obj.name):"")+"&p="+A)
...
In other words, when importXML() scans the page, the nodes containing 'showpost' or 'postcount' in href are not yet on the page:
Looks like importXML() works with static pages only and not able to handle dynamically loaded content.
Try to find another way of obtaining the number of post in a thread.

Resources