Skip to contents

The goal of {sequins} is to provide a way to plot graphs depicting {glitter} queries. Learn more about {glitter} and how to use it to collect data from SPARQL endpoints here.

Installation

You can install the development version of sequins from GitHub with:

# install.packages("devtools")
devtools::install_github("lvaudor/sequins")

Example

This is a basic example of how to use the function sequins::graph_query() to show a glitter query as a graph:

## 
## Attachement du package : 'sequins'

## L'objet suivant est masqué depuis 'package:glitter':
## 
##     get_label
query=spq_init() %>%
  spq_add("?mayor wdt:P31 ?species") %>%
  spq_set(species = c('wd:Q144','wd:Q146', 'wd:Q780')) %>%
  spq_add("?mayor p:P39 ?node") %>%
  spq_add("?node ps:P39 wd:Q30185") %>%
  spq_add("?node pq:P642 ?place") 

graph_query(query, layout="tree", label=TRUE)