Monday, March 7, 2011

Scraping data from Google Documents.

There are many different methods of retrieving information from online graphs or statistics based sites, some of them are simple as copying and pasting into a excel document or indeed on to any of the free online google document websites.

There is however another way of doing it, which allows a far dynamic approach to retrieving information from these sources.

For instance, open up google documents:

Set yourself up a new spreadsheet:



Find yourself a statistics based website, either have a look around Wikipedia, for example, here's one I did earlier... http://en.wikipedia.org/wiki/World_population#Largest_populations_by_country


Type: =ImportHtml("http://en.wikipedia.org/wiki/World_population", "table", 3) into the Formula area and you should recieve all the data in the spreadsheet window.

From there you can export the data as a csv file or as a text file or you can import the data into a program of the ilk of processing.

I shall discuss that method in my next post.





p.s. In order to scrape data into a google document, the formula is as follows =ImportHtml("URL", "Table", number)

No comments:

Post a Comment