Reputation: 611
I am able to perform queries like finding capital or currency of countries but having problem in fetching table data. I want to extract data from the tables from this page. It's corresponding dbpedia page is this.
Now if you look at the dbpedia page, there is no relation for tabular data which I could query. What am I missing here?
Edit: There is a project, which I guess, is under development at present. Is there any other way apart from scraping
Upvotes: 4
Views: 437
Reputation: 732
This answer probably isn't going to help you right away but this is how I think it should work.
Instead of "querying a table", think of it this way:
You are looking for all Indian states (each an entity on DBPedia), their GDP's and possibly other attributes.
The GDP is (or should be ) an attribute of the state entity - the "List" page is simply a convenient aggregation and shouldn't serve as the master copy.
Something like:
select ?state ?gdp WHERE {
?state dbo:country dbr:India .
?state ?hasGDP ?gdp
}
ORDER by ?gdp
Sadly, the state pages on DBPedia don't currently have the ?hasDGP
property (on similar lines as they have the dbo:populationTotal
property).
Because of these missing links, you are probably back to using scraping as an alternative.
Upvotes: 2