A Vocabulary of Government Service – Part I

Previously we described the inheritance hierarchy of Classes in Schema.org and visualized this hierarchy as an expandable/collapsible tree using d3.

Now we build upon that work to develop a vocabulary of Classes and their Properties for describing government service.

Seeding the Vocabulary

The starting point for seeding our vocabulary is Schema.org’s Class GovernmentService, used to describe a service that is provided by a government organization or by an organization that is funded by government.

Figure 1 illustrates the pathway to Class GovernmentService within Schema.org’s Inheritance Hierarchy.

Figure 1. Pathway to GovernmentService through Schema.org.

Class GovernmentService has one Property – serviceOperator that is expected to be of Type Organizationanother Class in Schema.org. GovernmentService is the Domain of serviceOperator and Organization is its Range.

Schema.org’s website represents the above in the form of a Table:

Properties from GovernmentService
Property Range Description
serviceOperator Organization The operating organization, if different from the provider. This enables the representation of services that are provided by an organization, but operated by another organization like a subcontractor.

Table 1. Properties of Class GovernmentService.

We may also represent the information in Table 1 as a Graph, where the Nodes are Classes and Properties, and where the Links are relations connecting them:

Source Node Target Node Link
GovernmentService serviceOperator hasProperty
serviceOperator Organization hasRange

Table 2. Graph of vocabulary for describing service that is provided by a government organization.

Extending the Vocabulary – Cycle 1

This start on a vocabulary for describing government service may be extended in a systematic fashion – first, by incorporating any SuperClass (and its Properties) that contains GovernmentService as a Subclass.

In this manner, our vocabulary extends to include Class Service, Intangible, and Thingas well as their respective Properties. (Note that these Classes are the points highlighted along the pathway in Figure 1).

Again, Schema.org’s website represents each of these SuperClasses in the form of a Table:

Properties from Service
Property Range Description
availableChannel ServiceChannel A means of accessing the service (e.g. a phone bank, a web site, a location, etc.)
produces Thing The tangible thing generated by the service, e.g. a passport, permit, etc.
provider Person  or
Organization
The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.
serviceArea AdministrativeArea The geographic area where the service is provided.
serviceAudience Audience The audience eligible for this service.
serviceType Text The type of service being offered, e.g. veterans’ benefits, emergency relief, etc.

Table 3.1. Properties of Class GovernmentService that are inherited from Class Service.

and

Properties from Thing
Property Range Description
additionalType URL An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax – the ‘typeof’ attribute – for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.
alternateName Text An alias for the item.
description Text A short description of the item.
image URL  or
ImageObject
An image of the item. This can be a URL or a fully described ImageObject.
name Text The name of the item.
potentialAction Action Indicates a potential Action, which describes an idealized action in which this thing would play an ‘object’ role.
sameAs URL URL of a reference Web page that unambiguously indicates the item’s identity. E.g. the URL of the item’s Wikipedia page, Freebase page, or official website.
url URL URL of the item.

Table 3.2. Properties of Class GovernmentService that are inherited from Class Thing.

Class Intangible has no Properties of its own – all of its Properties are inherited from Class Thing.

At the end of Cycle 1 of extending the vocabulary, our Graph is looking much more respectable (compared to Table 1):

At the end of Cycle 1 of extending the vocabulary, our Graph has become much richer (compared to Table 1):

Source Node Target Node Relation
Thing Intangible hasSubclass
Intangible Service hasSubclass
Service GovernmentService hasSubclass
Thing additionalType hasProperty
Thing alternateName hasProperty
Thing description hasProperty
Thing image hasProperty
Thing name hasProperty
Thing potentialAction hasProperty
Thing sameAs hasProperty
Thing url hasProperty
Service availableChannel hasProperty
Service produces hasProperty
Service provider hasProperty
Service serviceArea hasProperty
Service serviceAudience hasProperty
Service serviceType hasProperty
GovernmentService serviceOperator hasProperty
additionalType URL hasRange
alternateName Text hasRange
availableChannel ServiceChannel hasRange
description Text hasRange
image ImageObject hasRange
image URL hasRange
name Text hasRange
potentialAction Action hasRange
produces Thing hasRange
provider Organization hasRange
provider Person hasRange
sameAs URL hasRange
serviceArea AdministrativeArea hasRange
serviceAudience Audience hasRange
serviceOperator Organization hasRange
serviceType Text hasRange
url URL hasRange

Table 4. Graph of vocabulary for describing service that is provided by a government organization (Cycle 1).

We may serialize the Graph in Table 4 using various semantic technologies, including RDF/XML, RDFa, and Turtle.

Pruning

Note in Table 4 that Property image may be of type URL or ImageObject; here we’re going to use only “cool” URLs – both for the sake of having a persistent identifier for an image that may be modified from time to time and to avoid introducing the clutter of a complex entity like ImageObject – which is incidental to the semantics of a government service – into our vocabulary.

Also note in Table 4 that Property provider may be of type Organization or Person; here we’re going to restrict ourselves to providers of government service that are organizations and not individuals. We will bring Class Person (e.g. as an employee of an organization) into our vocabulary in a subsequent Cycle.

Visualizing

In a fairly traditional manner, our vocabulary for GovernmentService may be visualized as a basic Class Diagram using the Unified Modeling Language (UML):

Figure 2. Visualization of Vocabulary for GovernmentService (Cycle 1) using a UML Class Diagram.

In a more innovative fashion, we may also visualize our vocabulary GovernmentService as a Force-Directed Graph (with Thing, Intangible, Service and GovernmentService fixed in position in the corners of the graph:

Figure 3. Visualization of Graph of GovernmentService (Cycle 1), where o = Property, D = Domain, and R = Range.

See also this interactive version of Figure 3.

Note in Table 4 that several Properties are of type Text or URL – Schema.org treats Text, URL and a few other entities (Boolean, Date, DateTime, Number, Time) as a Datatype (as opposed to a Thing). We may streamline the visualization of our vocabulary by terminating any node corresponding to one of these Properties with a colored-symbol specific to its Datatype:

Figure 4. Legend for terminating a Property node whose Range is Datatype.

Here’s our streamlined visualization of our vocabulary for GovernmentService:

Figure 5. Visualization of Graph of GovernmentService (Cycle 1) using D3, where o = Property, D = Domain, and R = Range, terminating Property nodes with Range = Datatype.

See also this interactive version of Figure 5.

Coming Up:

A Vocabulary of Government Service – Part II

Part III: The Architecture of Service: the Service Organization and Service Channel

Part IV: The Service Audience and Administrative Area

Part V: The Service Action

Government Service – Schema.org

Overview

A vocabulary for describing Government Service was included in Schema.org  version 1.0d (November 2013). Also see Vocabulary for describing Civic Services – draft, Civic Services – draft 01, Civic Services – draft 02, and Civic Services – RDFS – draft.

Government Service is a more specific type of Service.

In fact, the vocabulary for Government Service adds only one property to the vocabulary for Service:

serviceOperator – typeof Organization

The serviceOperator property enables the representation of a service that is provided by an organization, but operated by another organization, like a subcontractor.

Also note that Schema.org includes GovernmentOrganization, which is a more specific type of Organization, having no additional properties.

Thing > Intangible > Service > GovernmentService

A service provided by a government organization, e.g. food stamps, veterans benefits, etc.
Property Expected Type Description
Properties from GovernmentService
serviceOperator Organization The operating organization, if different from the provider. This enables the representation of services that are provided by an organization, but operated by another organization like a subcontractor.
Properties from Service
availableChannel ServiceChannel A means of accessing the service (e.g. a phone bank, a web site, a location, etc.)
produces Thing The tangible thing generated by the service, e.g. a passport, permit, etc.
provider Person
or Organization
The organization or agency that is providing the service.
serviceArea AdministrativeArea The geographic area where the service is provided.
serviceAudience Audience The audience eligible for this service.
serviceType Text The type of service being offered, e.g. veterans’ benefits, emergency relief, etc.
Properties from Thing
additionalType URL An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax – the ‘typeof’ attribute – for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.
alternateName Text An alias for the item.
description Text A short description of the item.
image URL URL of an image of the item.
name Text The name of the item.
potentialAction Action Indicates a potential Action, which describes an idealized action in which this thing would play an ‘object’ role.
sameAs URL URL of a reference Web page that unambiguously indicates the item’s identity. E.g. the URL of the item’s Wikipedia page, Freebase page, or official website.
url URL URL of the item.

Example 1

Without markup

<div>NYC Food Service Establishment Permit, issued by Department of Health and Mental Hygiene.
(issued through NYC Food Service Establishment Permit Service; valid in New York for 1 year).</div>

Microdata

<div itemscope itemtype="http://schema.org/GovernmentPermit">
 <span itemprop="name">NYC Food Service Establishment Permit</span>
 <div itemprop="issuedBy" itemscope itemtype="http://schema.org/GovernmentOrganization">
 <span itemprop="name">Department of Health and Mental Hygiene"</span>
 </div>
 <div itemprop="issuedThrough" itemscope itemtype="http://schema.org/GovernmentService">
 <span itemprop="name">NYC Food Service Establishment Permit Service</span>
 </div>
 <div itemprop="validIn" itemscope itemtype="http://schema.org/AdministrativeArea">
 <span itemprop="name">New York</span>
 </div>
 <time itemprop="validFor" content="P1Y">1 year</time>
</div>

RDFa

<div vocab="http://schema.org/" typeof="GovernmentPermit">
 <span property="name">NYC Food Service Establishment Permit</span>
 <div property="issuedBy" typeof="GovernmentOrganization">
 <span property="name">Department of Health and Mental Hygiene"</span>
 </div>
 <div property="issuedThrough" typeof="GovernmentService">
 <span property="name">NYC Food Service Establishment Permit Service</span>
 </div>
 <div property="validIn" typeof="AdministrativeArea">
 <span property="name">New York</span>
 </div>
 <time property="validFor" content="P1Y">1 year</time>
</div>

JSON-LD

<script type="application/ld+json">
{
 "@context": "http://schema.org",
 "@type": "GovernmentPermit",
 "issuedBy": {
 "@type": "GovernmentOrganization",
 "name": "Department of Health and Mental Hygiene\""
 },
 "issuedThrough": {
 "@type": "GovernmentService",
 "name": "NYC Food Service Establishment Permit Service"
 },
 "name": "NYC Food Service Establishment Permit",
 "validFor": "",
 "validIn": {
 "@type": "AdministrativeArea",
 "name": "New York"
 }
}
</script>

Example 2

Without Markup

This example shows a JSON-LD description of services that do not necessarily have a direct
human-oriented HTML description. It describes a GovernmentService named "Veterans Affairs Emergency Mental Health" its operator, service area and service details, such as its Veterans Crisis Line (including phone contact line
hours of operation, language and other details).

JSON-LD

<script type='application/ld+json'>
{
 "@context": "schema.org",
 "@type": "GovernmentService",
 "name": "Veterans Affairs Emergency Mental Health",
 "serviceType": "Psychiatric Emergency Services",
 "operator": {
 "@type": "GovernmentOrganization",
 "name": "US Department of Veterans Affairs"
 },
 "serviceArea": {
 "@type": "AdministrativeArea",
 "name": "Massachusetts"
 },
 "serviceAudience": {
 "@type": "CivicAudience",
 "name": "Veterans"
 },
 "availableChannel": {
 "@type": "ServiceChannel",
 "name": "Urgent Care Clinic",
 "availableLanguage": {
 "@type": "Language",
 "name": "Spanish"
 },
 "serviceLocation": {
 "@type": "Hospital",
 "name": "VA Boston -- West Roxbury",
 "address": {
 "@type": "PostalAddress",
 "streetAddress": "1400 VFW Parkway",
 "addressLocality": "West Roxbury",
 "addressRegion": "MA",
 "postalCode": "02132"
 }
 }
 }
}
</script>

Related additions in Schema.org version 1.0d

ContactPoint – e. g. now provides a mechanism for describing contact points for services which support users with hearing impairments.

Organization – a small but useful improvement, adding department and subOrganization properties that relate organizations to each other. This can be used when describing common situations,  when details such as opening hours or contact information vary by department.