SVG javascript chart scraping - charts

When i access a yahoo finance for intraday data they show a interactive chart, but i only can find the data for the row my mouse was over the last time it was in the chart, it automatically updates the html... and then if go to the << left on the chart, the server request more data for the hide part from the chart...
example:
http://finance.yahoo.com/echarts?s=JPM
so my question is, in what file i can find all this data? i mean, they don't send it everytime my mouse go over the chart, so it must be stored somewhere...
the values of open,close,low,high,volume,%chg
or more right to the point,
how do i scrape data from this kind of charts?, i mean i give the url to one crawler and then it download all the from this chart, including move the chart to the << left until they stop to send more data
any ideias?
edit:
i heard about this selenium+python
anyone have any ideias? i still stuck =//

1) this chart is produced by javascript. Try to disable javascript and refresh page -> no chart
2) the chart is SVG
3) to be able to download SVG, you need a javascript capable library, like Phantom.js
4) you have to fetch what's in tag svg viewBox
Maybe a good start is beginning by something easy, like the tiger: http://raphaeljs.com/tiger.html

In this particular case, you can get stock data from NASDAQ in Excel spreadsheet format to work with. http://www.nasdaq.com/symbol/jpm/historical
They also allow you to set the time period of data you would like to access, as well.

Related

How to show an excel button that allows the users to download the results in tableau

I want to show an excel button that allows the users to download the results.
I want the users to download the table data shown in the workbook. The user should be able to download the filtered data.
For example if he selects regions as 'America', then in the excel sheet he must get only the data having 'America' as the region.
Please help me in achieving this!
The short answer is that you can't.
Unfortunately, there's not Excel download button like download PDF for the moment.
The long answer is about two workarounds that you can follow:
if you're using Tableau Server you can simply add .csv to your view's URL to make it downloadable in CSV. For example http://tableauservercompany/#/myview will become http://tableauservercompany/#/myview.csv. You can also apply filters as described in this tutorial.
another workaround is to include in your workbook a worksheet (not a dashboard) with the table you want to let users download to Excel. In this way users can go to Download and select Excel file.
Once your dashboard is complete, just drag the download component (lower left corner in Object section), and set it for cross-tab (default is PDF).
This feature will be available if your dashboard is published on Tableau Server/Online and it will download the current data depending of what users see when they click on the download button.

Confluence Plugin: How to create space and pages programmatically from imported CSV?

I want to add a button to the system.header/left, which I already did. And when I click that button, I want a file picker popup to choose my CSV.
From the CSV content, I want to create space and pages.
I've browsed through the documents and tutorials, but I can't find anything alike.
Could you point a direction or steps for me? At least, point me to something relevant?.
Here's a short overview:
Your button will trigger a JavaScript.
That javaScript will open a dialog window containing the form elements allowing the file upload
The target of that form will be either a servlet or rest-endpoint
inside your plugin. Let's assume it's a servlet.
The servlet will
take the submitted file, split it using the defined separator and
create the page structure using the confluence API calls.
And forward to the start page of your new Space.
I'd suggest that you start with the servlet.
Provide a couple of lines of test data, to check if your code creates the page structure as expected.
Once this works, add the file handling part (from a dedicated html) and pass the data to your existing function.
Now, you have the backend and the frontend, so rendering the dialog when your button is clicked, is pretty straight forward.
Make sure to display the button only if the current user has the right to create a space.
Stuff that might help you:
confluence servlet module: https://developer.atlassian.com/server/confluence/servlet-module/
reading a CSV in java: https://www.baeldung.com/java-csv-file-array
Uploading a file in Java: https://www.baeldung.com/upload-file-servlet
How to create a new Space using Java API: https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-create-a-Confluence-Space-with-Java-API/qaq-p/491588
Confluence API: SpaceManager: https://docs.atlassian.com/atlassian-confluence/6.6.0/index.html?com/atlassian/confluence/spaces/SpaceManager.html
Confluence API: PageManager: https://docs.atlassian.com/atlassian-confluence/6.6.0/index.html?com/atlassian/confluence/pages/PageManager.html
Hope this helps.

Automation of clicks on webpage using Matlab

So I'm looking for a way to systematically access data from a website. This data is updated every 15 minutes or so, and is generated through a datamart system that makes custom reports following several input parameters: the desired date interval, the specific dataset.
All these parameters require me to click on some specific buttons; I was wondering if it would be possible to automate these click inputs using Matlab (or something else if need be), to retrieve the data and treat it automatically.
Thanks in advance!
I suggest you take a look at http://www.autohotkey.com/. This is a great tool which allows for the automatic clicking on any window (including a browser page) under Windows. It even will let you "search" your screen for pixel images and then click on those images. This would allow you to make a very small bmp file of the link you would like to click on, and then your script can search your page and click directly on the link.
As far as getting data into matlab I'm not exactly sure of the best way to do this, but you might consider saving the html of the page, and then parsing that from matlab.

Creating a tutorial on a form or report

I want to create a tutorial inside a form showing how to use my database. I created it in PowerPoint and saved it as a PDF. I was wondering if it was possible to attach this PDF in my form. I also saved these slides as images on my computer, tried to attached them to a form and it exceeded 22 inches in lenght. is there any way around this any suggestions perhaps?
You could use javascript and other tools to show the pdf as a slideshow, I recommend that you use this tool its free and you can integrate your slides in a very easy way with javascript.
http://ajaxslideshow.com/show-pdf-slideshow-javascript.html

Adding a hit counter to Desktop Intelligence/Xi 3/Business Objects webpage?

for my company I am making a report in Xi3/Desktop Intelligence that pulls data via free hand SQL and makes a html file displaying the data, updating every 20mins. We want to incorporate a hit counter that will show us the number of times this report is being viewed.
I found a couple basic templates online. I tried copying and pasting them into a cell, but the output HTML page just displayed the full HTML (unrendered by my browser). I am decent at writing my own HTML, but I just do not understand how to stick my own HTML code in a dynamically updating report in Xi3.
Moreover, I doubt (for legality reasons) my company will be okay with me using a free hit counter template I find online, especially considering they all seem to reference a third party website to do the actual "counting." Any ideas of the best way to implement/learn how to create a visitor counter?
Thanks.
You can include HTML in a DeskI report. In the cell that contains the HTML, click Format Cell; on the "Number" tab, there is a checkbox for "Read as HTML". Make sure that's checked off. Note that you won't see the rendered HTML within DeskI, but it will display when viewed in Infoview.