I'm trying to get stock quotes from Yahoo Finance or Google Finance.
I know Google sheet's IMPORTXML function can basically do this, but into a spreadsheet. I want to get the price of the stock and then have a program decide to buy / sell / anything else.
So I'm trying to find the JavaScript source code for the IMPORTXML function. I think it's JavaScript but I haven't actually found it so I don't actually know. Also if you know of another way to accomplish this I'm open to it!
Related
I am trying to use the google sheets API and I'm following along with a YouTube video. Why does the data show up so orderly on his computer and so unformatted on mine? How can I change it?
I looked into the settings and I Googled it, but I probably don't know the right terms to get the results I'm looking for.
I'm using the IMPORTXML function on google sheets to import the latest visa numbers from the Canadian government however I can import everything on the web page apart from the data/numbers which I think could be down to JavaScript.
I simply just need to find a way to pull that data into the spreadsheet but I'm not experienced with JS.
Here's the website and here's my query:
=IMPORTXML("https://www.cic.gc.ca/english/work/iec/selections.asp?country=au&cat=wh",
"//div[#class='col-md-8']")
Here is an example sheet.
Unfortunately Google Sheet's formula IMPORTXML is only able to read the static HTML source of the page so it will not be able to read any dynamically inserted element (as you guessed the visa number is dynamically inserted with a Javascript script).
If you inspect in your browser the page source of this site, you will see that the numbers like Candidates in the pool are not there and therefore, IMPORTXML will not be able to reach them.
In order to get them you will need to look for another web scraping technique (with libraries like scrappy and so on).
I hope this has helped you. Let me know if you need anything else or if you did not understood something. :)
I am working on creating a website that will recall data from a spreadsheet (looking at using Google Spreadsheets or SQLite) in a similar form as to the stock exchange except I would like the "stock" and "prices" to be pulled from the spreadsheet which can be live updated.
I have asked on Reddit, searched through the google help guides, but couldn't find the right resource. I was told that running it through GitHub would be an option. Any help would be appreciated.
For a reference of what I would like to do, I would like to make a site similar to this one: https://www.marketwatch.com/investing/stock/live/charts
Only hopefully much cleaner and only with the chart + filtering allowed. Then the person using the site would be able to select the "company" to see that "company's" "stock" and "history" that is all managed via a database that I manage.
I can do all of this in Excel but I would like to make a secure sharing platform online.
Thank you for your time and help. If there is an order in which to learn these things or do these things, please let me know.
Have a great day.
enter image description here
When using directions in Google Maps
I would like to display a list of multiple paths using the api, like the red box in the attached photo, but I do not seem to have a good guide to look for the api document.
I want to know how to implement it.
I would appreciate your help.
This is a pretty complicated endeavor to simply have someone walk you through without having built your own code. That said the I would recomend reading through the google resource manual. And here is a walkthrough once you understand some basics of google maps javascript control.
tutorial
There are free resources to figure it out. Though there are even better paid resources. Just check out Udemy for a 10$ course (you have to sign in and search a coupon, but you can get access to any great course for $10)
Give it a shot and get back to us when you have tried some stuff specifically.
My knowledge of Google Sheets is somewhat limited. I have recently been keeping track of daily stock quotes (using the GoogleFinance function) and I was wondering how to utilize Google Sheets script editor to make a more automated and real time graph.
For example, I have columns with the stock price and volume that are updated every so often. I wanted to be able to take the values in these cells as they update and plot them in real time (as a line graph). I know Google script editor on Google Sheets has the ability to trigger at a certain time, so I would like the graphs to start populating at 9AM (when the markets begin to open) and stop populating at 4PM. I figure that updating the graph every 5 or 10 minutes would best enable me to capture the changes.
I wanted to do this to look at the relationships between various metrics (like the fluctuations in price and volume over time). I do not know if Google Sheets is too limited to do something like this, but if you know of a way to do so, please do suggest it.
Thank you!
Well, I think you need to use Apps Script here to achieve this Automation. I found here a tutorial that show how to create an automatically updating spreadsheet. But, sadly to say it did not mention here on how to create graph. But it will give you an idea on how to create automatic updating spreadsheets. You can also check this Google Analytics Report Automation and this thread if it can help you in your case.