6
$\begingroup$

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.

$\endgroup$

1 Answer 1

4
$\begingroup$

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 = ...

$\endgroup$
2
  • 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 to Import. 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.