What is the most direct and efficient way to scrape the raw data graphed in a Google ngram search, such as here? (I want to analyze, edit, plot, and label it in Mathematica.) The obvious Import
methods do not scrape the raw data.
1 Answer
$\begingroup$
$\endgroup$
2
In chrome, after you run the ngram query, you can go to the "Developer tools", find the source file starting with graph?content="
, search for the string var data
(search is under the triple dots on the upper right corner), and find the time series var data = ...
-
1$\begingroup$ Oh... so close... (thanks!)... but... I do a mouseover and see the end of var
var data
but somehow cannot copy it, or find the raw file URL toImport
. Again, I'm so close... can you push me across the finish line here? (Sorry... I'm not a web developer.) $\endgroup$ Commented May 7, 2020 at 5:05 -
1$\begingroup$ Ah... GOT IT! (Scroll to the proper line then copy the full line.) This is SO helpful. Thanks. ($\checkmark$) $\endgroup$ Commented May 7, 2020 at 5:15