The Bubble Graph Ontology (BGO) is a Semantic Web Application for exploring data partitions in a data-driven document.
BGO is NOT related to the meaning of the data, it’s about the presentation layer.
For a live example of web resource that uses BGO, have a look to https://budget.g0v.it/
The namespace for BGO vocabulary is http://linkeddata.center/lodmap-bgo/v1# and the suggested prefix for the BGO namespace is bgo .
BGO contains three core concepts:
Legenda:
All accounts in a Domain can be presented in a paged document (TableView) or as a whole in a big picture (Overview).
The overview admits a named list of partitions . A Partition is a collection of disjoined AccountSets organized with some criteria. A partition always contains (implicitly or explicitly) a DefaultAccountSet that identifies all accounts in the domain that are not explicitly defined in the partition. An Partition exposes a partitionId that must be unique in the ontology.
Overview also links some user interface concepts:
Accounts information can be displayed in a Tooltip or in a AccountView. The AccountView exposes some perspectives that highlight specific aspects on an Account like metadata, historical trends, breakdowns, and social impacts.
Besides these, BGO defines some other general concepts useful to a reasoner display numbers:
See above for more information about number management.
Semantic relationships are crucial to the definition of concepts. However, next to these structured characterizations, concepts have to be further defined using human-readable (“informal”) documentation. Any BGO concept (Things) can be annotated using a set of properties derived from well-known vocabularies like Dublin Core, Foaf and RDFS:
A BGO reasoner can use these properties to build user interface components, providing defaults if needed and taking into account the following conventions:
Besides classes and properties, BGO defines the some extensions to the default xsd:String datatype:
#b2182b
)It also defines some subclasses for describing grouping functions in partitions: amount sum (default), accounts count, trend average; and some individuals for sort ordering (ascending/descending) and sort criteria (abs/natural)
BGO is expressed in a owl file serialized as RDF xml. You can edit the file by hand or using Protégé
An html rendering of the vocabulary is provided by the lode parser
For some examples of BGO ontologies, have a look at the example directory.
BGO ontology is used by LODMAP2D application and by some public and private projects.
In BGO all quantities are a-dimensionals, so the unit of measure is something that must be managed by the ontology reasoner.
BGO defines two concepts (NumberFormatter and Totalizer) to provide the information needed by a reasoner to display a number in a pleasant format.
NumberFormatter exposes following functional properties:
In following pseudo-code:
function numberFormatter (store, formatter, x, forceFormat=null ) {
IF x is a number
# here some reasonable defaults for missing properties
scaleFactor = store.getAny(formatter,bgo:scaleFactor) || 1
precision = store.getAny(formatter,bgo:precision) || 2
maxValue = store.getAny(formatter,bgo:maxValue) || Infinity
minValue = store.getAny(formatter,bgo:minValue) || -Infinity
# apply some transformations to x
x = x * scaleFactor;
x = round ( x, precision);
IF x < minValue
format= store.getAny(formatter,bgo:lessThanMinFormat) || "< $minValue"
ELSEIF x > maxValue
format= store.getAny(formatter,bgo:moreThanMaxFormat) || "> $maxValue"
ELSE
format= forceFormat || store.getAny(formatter,bgo:format) || "%s"
ENDIF
ELSE
format = store.getAny(formatter,bgo:nanFormat) || ""
ENDIF
return sprintf( format, x )
}
A Totalizer is a bidimensional vector of numbers that is normally used to represent a subtotal and an optional ratio respect to a grand total; This meaning is not mandatory, it can be used to ddescribe how to display two number related in some way. It extends the NumberFormatter with following functional properties:
In following pseudo-code:
The pseudo code depends from the numberFormatter functions previously defined:
function totalizer (store, formatter, x, ratio) {
ratioFormatter = store.getAny(formatter,bgo:ratioFormatter)
IF NOT ratio is a number OR NOT ratioFormatter
result = numberFormatter(store, formatter, x)
ELSE
filteredFormat = store.getAny(formatter,bgo:filteredFormat) || "%s"
xString = numberFormatter( store, formatter, x, filteredFormat )
ratioString = numberFormatter( store, ratioFormatter, ratio)
IF store.getAny(formatter,bgo:ratioBefore)
result = ratioString+xString
ELSE
result = xString+ratioString
ENDIF
ENDIF
return result
}
IN BGO a Domain class describes the totality of the accounts in the ontology. The SubDomain class allows to limit the number of accounts. A SubDomain must expose an unique domainId in the ontology.
The BGO ontology is available under the Creative Commons Attribution 4.0 Unported license; see http://creativecommons.org/licenses/by/4.0/. In a nutshell, you are free to copy, distribute and transmit the work; to remix/adapt the work (e.g. to import the ontology and create specializations of its elements), as long as you attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
Proper Attribution: include the statement “This work is based on the Bubble Graph Ontology (BGO), developed by Enrico Fagnoni for LinkedData.Center” and add a link to http://linkeddata.center/