I'm looking for a way to filter tables often found in Wikipedia articles, so I can compare only the rows (and columns) I'm interested in.

Is there either

  1. a built-in feature in the Wikipedia engine that I'm not aware of
  2. or a browser plugin that supports this

The features I can think of are:

  • Filter by column value
  • Hide columns
  • Multilevel sorting
  • Ahhh... the off-topic minefield. See point 3 in the first table. I'm asking for something specific to Wikipedia. In fact a Greasemonkey script would do, but haven't been able to find one
    – pufferfish
    Aug 7 '14 at 11:08

If you place this formula in a cell within Google Sheet, it will scrape the tabular data from this Wikipedia article link: http://en.wikipedia.org/wiki/Demographics_of_India

=IMPORTHTML("http://en.wikipedia.org/wiki/Demographics_of_India", "table", 4)

Once you have the data within Google Sheet, you can filter by column value (select column header, choose Filter from Data menu) & hide column (select column, choose Hide column from context menu)

Google Sheets screen shot


The Wikipedia Table filter Greasemonkey script does what you want:

Script Summary: Filters wikipedia tables by removing all rows that have an undesired value, or by deleting certain rows and columns.

You may need to add the https version of the wikiedia URL to the script's included pages filter list to get it to work.


Tables? Do you mean the infoboxes? You should probably use Wikidata http://wikidata.org/w/api.php and extract the information from there (it will be cleaner), then present it how you prefer.

Otherwise, you can sprinkle display: none everywhere on appropriate IDs and classes for the tables in question, but it's going to be an endless chase of unstructured information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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