Hello everyone,
When I’m given the job of scraping data from the web, the first thing that comes to mind is CTRL C CTRL V or I need to do some programming. For some analysis, I spent hours extracting NIRF rankings, but today I’m glad to share with you a simple way to do the same.
Extracting Data from the Web
In Google Sheets, I'll be using the IMPORTHTML formula to extract table data from the web.
IMPORTHTML (URL, query, index)
- URL: The URL of the website from which data needs to be imported
- Query: Specifies the structure of the data, either list or table.
- Index: The index starts from 1. It is used to identify which table data to extract.
For more information: IMPORTHTML
Demonstration of extracting data from the NIRF website.
Navigate to google sheets and type the command: =IMPORTHTML(“nirfindia.org/2021/CollegeRanking.html","table",1)
- “nirfindia.org/2021/CollegeRanking.html": This is the URL of the NIRF website
- "table": They stored The data we want in the form of a table.
- 1: We want to access the first table from the website
You’ve now successfully extracted the data from the web. Link for my spreadsheet: docs.google.com/spreadsheets/d/1w_ht096-qjg..
Stay tuned for more interesting articles. Thank you so much.