Google Finance: CHSPI broken

Update, 2023-12-15: investing.com rendering is super unstable – I’ve resorted to using ishares.com directly. The new snippet for CHSPI:

=SUBSTITUTE(importxml("https://www.ishares.com/ch/individual/en/products/264107/ishares-spi-ch-fund","//*[@id='fundheaderTabs']/div/div/div/ul/li[1]/span[2]"), "CHF ", "")

Update, 2023-06-19: investing.com has changed some of its html. The new snippet for CHSPI:

=importxml("https://www.investing.com/etfs/ishares-core-spi","//*[@id='__next']/div[2]/div[2]/div/div[1]/div/div[1]/div[3]/div/div[1]/div[1]")

As we all know, Google Finance and ETF (at least ishares) import* in Google Spreadsheets has been broken since December 2022:

https://issuetracker.google.com/issues/262157479

So if you use =GOOGLEFINANCE("CHSPI","price"), in your spreadsheet, all you’ll get is the following error message:

Error:
When evaluating GOOGLEFINANCE,
the query for the symbol: 'CHSPI' returned no data.

Since we all also know, Google Finance isn’t the fastest in fixing bugs (as evidenced by this bug, but also several others prior to this one), and their feeds (latency,..) are best-effort-at-best.

To fix this in your spreadsheet, head over to investing.com, enter whatever stock/currency/etf/.. you want to import data from, copy the url and use that combined with importxml:

Say you’re looking for SWX:CHSPI:

  1. Go to investing.com, enter CHSPI, click on the search result.
  2. This takes you to https://www.investing.com/etfs/ishares-core-spi, where you’ll copy the url ("website address").
  3. Open your spreadsheet, head to the cell you like most, enter:
    =importxml("https://www.investing.com/etfs/ishares-core-spi","//*[@data-test='instrument-price-last']") to get the latest price.
  4. Silently thank investing.com

* Note that not only importing in spreadsheets (using =googlefinance) is broken – none of the symbols show up on Google Finance itself either.

Google Cloud VM Instance Recommendations

Today, when I logged into my Google Cloud VM Instance Overview, it greeted me with a recommendation! I pay about 5USD/month for that instance, and it’s running hot (according to the graphs). – Therefore I was more than happy to hear that I could basically continue running this at 0 cost.

Clicking on that “Save $5/mo” turned up this:

Seems like Google wants to tell me something…

GCLOUD: The Annoyance

Whenever I need to do something urgent on glcoud, this will greet me for 15 (or 30) minutes:

Provisioning your Google Cloud Shell machine...

COVID-19: Heatmap Schweiz

Since I was playing with Google Maps API heatmaps recently, I thought I’d put together a quick heatmap showing confirmed COVID-19 cases in Switzerland.

COVID-19 cases per 100k inhabitants, in Switzerland, as of 2020-03-19.

Updated 19.03.2020 using https://www.bag.admin.ch/dam/bag/de/dokumente/mt/k-und-i/aktuelle-ausbrueche-pandemien/2019-nCoV/covid-19-lagebericht.pdf.download.pdf/COVID-19_Epidemiologische_Lage_Schweiz.pdf – now based on incidence of cases per 100k inhabitants.

Day to day developments:

2020-03-14:

COVID-19 heatmap Switzerland 2020-03-14

Updated 14.03.2020 using https://www.bag.admin.ch/dam/bag/de/dokumente/mt/k-und-i/aktuelle-ausbrueche-pandemien/2019-nCoV/covid-19-lagebericht.pdf.download.pdf/COVID-19_Epidemiologische_Lage_Schweiz.pdf

2020-03-13:

COVID-19 heatmap Switzerland 2020-03-13

Data source: https://www.bag.admin.ch/bag/de/home/krankheiten/ausbrueche-epidemien-pandemien/aktuelle-ausbrueche-epidemien/novel-cov/situation-schweiz-und-international.html#-1934206868