Mediakar

Scraping: Import tables from websites

If you need to import a table from a website a don’t have enough time and patience to copy and paste table contents, there’re two simple solutions.

Use Google Docs

Open or create a new spreadsheet in Google Docs and type in the following function:

=importHTML (“URL”;”table”;1) where 1 = first table on the page.

That means, you might also need to type “2”, etc in case there’re several tables on the page.

Use Chrome extension Table Capture

Google Chrome extension Table Capture performs the same task without any formulas.Just install the extension and it will appear in your browser’s address bar.

Each time you open a page with a table you want to scrape, just click on the extension icon. It will show you tables found and will offer either to copy the data to clipboard or dorictly to a new file in Google Docs. That’s it.

If you are a data journalist interested in scraping, I highly recommend you to have a look at a book by Paul Bradshaw: “Scraping for Journalists”.

More about data journalism: 

Tutorial: Getting started with Google Fusion Tables

School of Data Journalism 2013 in Perugia

Leave a Reply

Your email address will not be published. Required fields are marked *