block by curran 0009dd8e1a08d082aa62ddef32f5ce05

DBPedia Ontology

Pre-processed cleaned data for the DBPedia ontology, a hierarchy of categories for Wikipedia articles.

Clean files:

Queries for the DBPedia ontoloty class hierarchy and their instance counts. The idea behind this is to generate a data visualization from this hierarchy.

The following queries were executed here: https://dbpedia.org/sparql

Sparql query 1:

  PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
  PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

  SELECT ?class ?subclass WHERE {
    ?subclass rdfs:subClassOf ?class.
  }

Sparql query 2 to include counts:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?class ?subclass (COUNT(?instance) AS ?instanceCount) WHERE {
  ?subclass rdfs:subClassOf ?class.
  OPTIONAL {
    ?instance rdf:type ?subclass.
  }
}
GROUP BY ?class ?subclass

Sparql query 3 to include labels:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?class ?classLabel ?subclass ?subclassLabel (COUNT(?instance) AS ?instanceCount) WHERE {
  ?subclass rdfs:subClassOf ?class.
  OPTIONAL {
    ?instance rdf:type ?subclass.
  }
  OPTIONAL {
    ?class rdfs:label ?classLabel.
    FILTER (lang(?classLabel) = "" || lang(?classLabel) = "en")
  }
  OPTIONAL {
    ?subclass rdfs:label ?subclassLabel.
    FILTER (lang(?subclassLabel) = "" || lang(?subclassLabel) = "en")
  }
}
GROUP BY ?class ?classLabel ?subclass ?subclassLabel

Transitive counts, filtered:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?class ?classLabel ?subclass ?subclassLabel (COUNT(?instance) AS ?instanceCount) WHERE {
  ?subclass rdfs:subClassOf ?class.
  OPTIONAL {
    ?instance rdf:type/rdfs:subClassOf* ?subclass.
  }
  OPTIONAL {
    ?class rdfs:label ?classLabel.
    FILTER (lang(?classLabel) = "" || lang(?classLabel) = "en")
  }
  OPTIONAL {
    ?subclass rdfs:label ?subclassLabel.
    FILTER (lang(?subclassLabel) = "" || lang(?subclassLabel) = "en")
  }
}
GROUP BY ?class ?classLabel ?subclass ?subclassLabel
HAVING (COUNT(?instance) >= 100)

labels.csv

package.json

process.js

scrape-dbpedia-org-ontology-Disease.csv

sparqlResultsOptimizedQuery.json

scrape-dbpedia-org-ontology----------------.csv

scrape-dbpedia-org-ontology------.csv

scrape-dbpedia-org-ontology-Activity.csv

scrape-dbpedia-org-ontology-Actor.csv

scrape-dbpedia-org-ontology-AdministrativeRegion.csv

scrape-dbpedia-org-ontology-Agent.csv

scrape-dbpedia-org-ontology-AmusementParkAttraction.csv

scrape-dbpedia-org-ontology-AnatomicalStructure.csv

scrape-dbpedia-org-ontology-Animal.csv

scrape-dbpedia-org-ontology-ArchitecturalStructure.csv

scrape-dbpedia-org-ontology-Artist.csv

scrape-dbpedia-org-ontology-Athlete.csv

scrape-dbpedia-org-ontology-Biomolecule.csv

scrape-dbpedia-org-ontology-BodyOfWater.csv

scrape-dbpedia-org-ontology-Boxer.csv

scrape-dbpedia-org-ontology-BritishRoyalty.csv

scrape-dbpedia-org-ontology-Broadcaster.csv

scrape-dbpedia-org-ontology-Building.csv

scrape-dbpedia-org-ontology-CareerStation.csv

scrape-dbpedia-org-ontology-Case.csv

scrape-dbpedia-org-ontology-CelestialBody.csv

scrape-dbpedia-org-ontology-ChemicalSubstance.csv

scrape-dbpedia-org-ontology-ChristianBishop.csv

scrape-dbpedia-org-ontology-Cleric.csv

scrape-dbpedia-org-ontology-ClericalAdministrativeRegion.csv

scrape-dbpedia-org-ontology-Coach.csv

scrape-dbpedia-org-ontology-Comic.csv

scrape-dbpedia-org-ontology-ComicsCharacter.csv

scrape-dbpedia-org-ontology-Company.csv

scrape-dbpedia-org-ontology-Database.csv

scrape-dbpedia-org-ontology-Device.csv

scrape-dbpedia-org-ontology-Document.csv

scrape-dbpedia-org-ontology-Drug.csv

scrape-dbpedia-org-ontology-EducationalInstitution.csv

scrape-dbpedia-org-ontology-Engine.csv

scrape-dbpedia-org-ontology-Eukaryote.csv

scrape-dbpedia-org-ontology-Event.csv

scrape-dbpedia-org-ontology-FictionalCharacter.csv

scrape-dbpedia-org-ontology-FloweringPlant.csv

scrape-dbpedia-org-ontology-Food.csv

scrape-dbpedia-org-ontology-FootballLeagueSeason.csv

scrape-dbpedia-org-ontology-Gene.csv

scrape-dbpedia-org-ontology-GeneLocation.csv

scrape-dbpedia-org-ontology-Genre.csv

scrape-dbpedia-org-ontology-GovernmentalAdministrativeRegion.csv

scrape-dbpedia-org-ontology-GridironFootballPlayer.csv

scrape-dbpedia-org-ontology-Group.csv

scrape-dbpedia-org-ontology-Identifier.csv

scrape-dbpedia-org-ontology-Infrastructure.csv

scrape-dbpedia-org-ontology-Instrumentalist.csv

scrape-dbpedia-org-ontology-Language.csv

scrape-dbpedia-org-ontology-LegalCase.csv

scrape-dbpedia-org-ontology-Mammal.csv

scrape-dbpedia-org-ontology-MeanOfTransportation.csv

scrape-dbpedia-org-ontology-MotorcycleRider.csv

scrape-dbpedia-org-ontology-MotorsportRacer.csv

scrape-dbpedia-org-ontology-Municipality.csv

scrape-dbpedia-org-ontology-MusicalArtist.csv

scrape-dbpedia-org-ontology-MusicalWork.csv

scrape-dbpedia-org-ontology-Name.csv

scrape-dbpedia-org-ontology-NaturalEvent.csv

scrape-dbpedia-org-ontology-NaturalPlace.csv

scrape-dbpedia-org-ontology-Olympics.csv

scrape-dbpedia-org-ontology-Organisation.csv

scrape-dbpedia-org-ontology-OrganisationMember.csv

scrape-dbpedia-org-ontology-PeriodicalLiterature.csv

scrape-dbpedia-org-ontology-Person.csv

scrape-dbpedia-org-ontology-PersonFunction.csv

scrape-dbpedia-org-ontology-Place.csv

scrape-dbpedia-org-ontology-Plant.csv

scrape-dbpedia-org-ontology-Politician.csv

scrape-dbpedia-org-ontology-PopulatedPlace.csv

scrape-dbpedia-org-ontology-Presenter.csv

scrape-dbpedia-org-ontology-Project.csv

scrape-dbpedia-org-ontology-PublicTransitSystem.csv

scrape-dbpedia-org-ontology-Race.csv

scrape-dbpedia-org-ontology-RaceTrack.csv

scrape-dbpedia-org-ontology-RacingDriver.csv

scrape-dbpedia-org-ontology-Region.csv

scrape-dbpedia-org-ontology-Religious.csv

scrape-dbpedia-org-ontology-RouteOfTransportation.csv

scrape-dbpedia-org-ontology-Royalty.csv

scrape-dbpedia-org-ontology-Satellite.csv

scrape-dbpedia-org-ontology-Scientist.csv

scrape-dbpedia-org-ontology-Settlement.csv

scrape-dbpedia-org-ontology-SnookerPlayer.csv

scrape-dbpedia-org-ontology-SocietalEvent.csv

scrape-dbpedia-org-ontology-Software.csv

scrape-dbpedia-org-ontology-Song.csv

scrape-dbpedia-org-ontology-Species.csv

scrape-dbpedia-org-ontology-SportCompetitionResult.csv

scrape-dbpedia-org-ontology-SportFacility.csv

scrape-dbpedia-org-ontology-SportsClub.csv

scrape-dbpedia-org-ontology-SportsEvent.csv

scrape-dbpedia-org-ontology-SportsLeague.csv

scrape-dbpedia-org-ontology-SportsManager.csv

scrape-dbpedia-org-ontology-SportsSeason.csv

scrape-dbpedia-org-ontology-SportsTeam.csv

scrape-dbpedia-org-ontology-SportsTeamSeason.csv

scrape-dbpedia-org-ontology-Station.csv

scrape-dbpedia-org-ontology-Stream.csv

scrape-dbpedia-org-ontology-TimePeriod.csv

scrape-dbpedia-org-ontology-TopicalConcept.csv

scrape-dbpedia-org-ontology-Tournament.csv

scrape-dbpedia-org-ontology-Tower.csv

scrape-dbpedia-org-ontology-UnitOfWork.csv

scrape-dbpedia-org-ontology-Venue.csv

scrape-dbpedia-org-ontology-VolleyballPlayer.csv

scrape-dbpedia-org-ontology-WinterSportPlayer.csv

scrape-dbpedia-org-ontology-Work.csv

scrape-dbpedia-org-ontology-Wrestler.csv

scrape-dbpedia-org-ontology-Writer.csv

scrape-dbpedia-org-ontology-WrittenWork.csv

scrape-leaf-classes.csv

scrape-www-w3-org-2002-07-owl-Thing.csv

scrape.js

sparqlQueryOptimizedQuery.sparql

sparqlQueryThingSubclasses.sparql