Skip to main content

demo

Project description

VizKG

VizKG is a Python library for Visualizing SPARQL Query Results over Knowledge Graphs.

Supported visualizations so far:

  • Table
  • ImageGrid
  • Map
  • Tree
  • Timeline
  • Dimensions
  • Graph
  • WordCloud
  • Tree Map
  • SunBurst Chart
  • Line Chart
  • Bar Chart
  • Area Chart
  • StackedArea Chart
  • Histogram
  • Density Plot
  • Box Plot
  • Violin Plot
  • Bubble Chart
  • Scatter Chart
  • HeatMap

Installation

Use the package manager pip to install VizKG.

pip install myKGlib

Usage

import myKGlib.vizkg as VizKG

sparql_query = """
    #images of cat
    #defaultView:ImageGrid
    SELECT ?item ?itemLabel ?pic
    WHERE
    {
    ?item wdt:P31 wd:Q146 .
    ?item wdt:P18 ?pic
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
    }
    """
#to query another endpoint, change the URL for the service and the query
sparql_service_url = "https://query.wikidata.org/sparql"
chart = VizKG(sparql_query=sparql_query, sparql_service_url=sparql_service_url, chart='imageGrid')
chart.plot()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

myKGlib-0.0.0.9.tar.gz (16.5 kB view hashes)

Uploaded Source

Built Distribution

myKGlib-0.0.0.9-py3-none-any.whl (29.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page