DSPL Tutorial XML File
Stay organized with collections
Save and categorize content based on your preferences.
The following is the DSPL XML file for the dataset described in the Tutorial.
<?xml version="1.0" encoding="UTF-8"?>
<dspl xmlns="http://schemas.google.com/dspl/2010"
xmlns:geo="http://www.google.com/publicdata/dataset/google/geo"
xmlns:geo_usa="http://www.google.com/publicdata/dataset/google/geo/us"
xmlns:time="http://www.google.com/publicdata/dataset/google/time"
xmlns:quantity="http://www.google.com/publicdata/dataset/google/quantity"
xmlns:entity="http://www.google.com/publicdata/dataset/google/entity">
<import namespace="http://www.google.com/publicdata/dataset/google/time"/>
<import namespace="http://www.google.com/publicdata/dataset/google/quantity"/>
<import namespace="http://www.google.com/publicdata/dataset/google/entity"/>
<import namespace="http://www.google.com/publicdata/dataset/google/geo"/>
<info>
<name>
<value>My statistics</value>
</name>
<description>
<value>Some very interesting statistics about countries</value>
</description>
<url>
<value>http://www.stats-bureau.com/mystats/info.html</value>
</url>
</info>
<provider>
<name>
<value>Bureau of Statistics</value>
</name>
<url>
<value>http://www.stats-bureau.com</value>
</url>
</provider>
<topics>
<topic id="geography">
<info>
<name><value>Geography</value></name>
</info>
</topic>
<topic id="social_indicators">
<info>
<name><value>Social indicators</value></name>
</info>
<topic id="population_indicators">
<info>
<name><value>Population indicators</value></name>
</info>
</topic>
<topic id="poverty_and_income">
<info>
<name><value>Poverty & income</value></name>
</info>
</topic>
<topic id="health">
<info>
<name><value>Health</value></name>
</info>
</topic>
</topic>
</topics>
<concepts>
<!-- As noted in the tutorial, this concept should extend quantity:amount.-->
<concept id="population">
<info>
<name>
<value>Population</value>
</name>
<description>
<value>Size of the resident population.</value>
</description>
</info>
<topic ref="population_indicators"/>
<type ref="integer"/>
</concept>
<!-- This country concept is defined for educational purposes only. A country
concept exists in the Google geo dataset. See:
http://code.google.com/apis/publicdata/docs/canonical/geo.html -->
<concept id="country" extends="geo:location">
<info>
<name>
<value>Country</value>
</name>
<description>
<value>My list of countries</value>
</description>
</info>
<type ref="string"/>
<property id="name">
<info>
<name><value xml:lang="en">Country name</value></name>
<description>
<value xml:lang="en">The official name of the country</value>
</description>
</info>
<type ref="string"/>
</property>
<table ref="countries_table"/>
</concept>
<!-- This US state concept is defined for educational purposes only. A US state
concept exists in the Google geo US dataset. See:
http://code.google.com/apis/publicdata/docs/canonical/geo.us.html -->
<concept id="state" extends="geo:location">
<info>
<name>
<value>State</value>
</name>
<description>
<value>US states</value>
</description>
</info>
<type ref="string"/>
<property concept="country" isParent="true"/>
<table ref="states_table"/>
</concept>
<concept id="gender" extends="entity:entity">
<info>
<name>
<value>Gender</value>
</name>
<description>
<value>Gender, Male or Female</value>
</description>
<pluralName><value>Genders</value></pluralName>
<totalName><value>Both genders</value></totalName>
</info>
<type ref="string"/>
<table ref="genders_table"/>
</concept>
<concept id="unemployment_rate" extends="quantity:rate">
<info>
<name>
<value>unemployment rate</value>
</name>
<description>
<value>The percent of the labor force that is unemployed, not seasonally
adjusted.</value>
</description>
<url><value>http://www.bls.gov/cps/cps_htgm.htm</value></url>
</info>
<topic ref="social_indicators"/>
<type ref="float"/>
<attribute id="is_percentage">
<type ref="boolean"/>
<value>true</value>
</attribute>
</concept>
</concepts>
<slices>
<slice id="countries_slice">
<dimension concept="country"/>
<dimension concept="time:year"/>
<metric concept="population"/>
<table ref="countries_slice_table"/>
</slice>
<slice id="states_slice">
<dimension concept="state"/>
<dimension concept="time:year"/>
<metric concept="population"/>
<metric concept="unemployment_rate"/>
<table ref="states_slice_table"/>
</slice>
<slice id="countries_gender_slice">
<dimension concept="country"/>
<dimension concept="gender"/>
<dimension concept="time:year"/>
<metric concept="population"/>
<table ref="countries_gender_slice_table"/>
</slice>
</slices>
<tables>
<table id="countries_table">
<column id="country" type="string"/>
<column id="name" type="string"/>
<column id="latitude" type="float"/>
<column id="longitude" type="float"/>
<data>
<file format="csv" encoding="utf-8">countries.csv</file>
</data>
</table>
<table id="countries_slice_table">
<column id="country" type="string"/>
<column id="year" type="date" format="yyyy"/>
<column id="population" type="integer"/>
<data>
<file format="csv" encoding="utf-8">country_slice.csv</file>
</data>
</table>
<table id="states_table">
<column id="state" type="string"/>
<column id="name" type="string"/>
<column id="country" type="string">
<value>US</value>
</column>
<column id="latitude" type="float"/>
<column id="longitude" type="float"/>
<data>
<file format="csv" encoding="utf-8">states.csv</file>
</data>
</table>
<table id="states_slice_table">
<column id="state" type="string"/>
<column id="year" type="date" format="yyyy"/>
<column id="population" type="integer"/>
<column id="unemployment_rate" type="float"/>
<data>
<file format="csv" encoding="utf-8">state_slice.csv</file>
</data>
</table>
<table id="genders_table">
<column id="gender" type="string"/>
<column id="name" type="string"/>
<data>
<file format="csv" encoding="utf-8">genders.csv</file>
</data>
</table>
<table id="countries_gender_slice_table">
<column id="country" type="string"/>
<column id="gender" type="string"/>
<column id="year" type="date" format="yyyy"/>
<column id="population" type="integer"/>
<data>
<file format="csv" encoding="utf-8">gender_country_slice.csv</file>
</data>
</table>
</tables>
</dspl>
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-26 UTC."],[[["\u003cp\u003eThis DSPL (Dataset Publishing Language) XML file defines a dataset containing statistics about countries, including population, unemployment rates, and potentially other social indicators.\u003c/p\u003e\n"],["\u003cp\u003eIt structures the data using concepts like "country," "state," "gender," "population," and "unemployment rate," and links them to specific data tables.\u003c/p\u003e\n"],["\u003cp\u003eData is organized into slices, such as "countries_slice," "states_slice," and "countries_gender_slice," allowing for views based on different dimensions and metrics.\u003c/p\u003e\n"],["\u003cp\u003eThe dataset includes information about countries and US states, including their names, geographic coordinates, and population data, potentially for analysis and visualization purposes.\u003c/p\u003e\n"],["\u003cp\u003eExternal datasets, like Google's geo and time datasets, are referenced for providing additional context and standardization.\u003c/p\u003e\n"]]],["This DSPL XML file defines a dataset of statistics about countries and US states. It imports namespaces for time, quantity, entity, and geography. Key data includes population, unemployment rate, and gender, organized by country, state, and year. The data is categorized under topics like geography, social indicators, population, poverty, income, and health. Concepts like \"country,\" \"state,\" and \"gender\" are defined, linked to tables that will contain data, referenced through the XML. The data is formatted as CSV files.\n"],null,["# DSPL Tutorial XML File\n\nThe following is the DSPL XML file for the dataset described in the [Tutorial](/public-data/docs/tutorial). \n\n```python\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cdspl xmlns=\"http://schemas.google.com/dspl/2010\"\n xmlns:geo=\"http://www.google.com/publicdata/dataset/google/geo\"\n xmlns:geo_usa=\"http://www.google.com/publicdata/dataset/google/geo/us\"\n xmlns:time=\"http://www.google.com/publicdata/dataset/google/time\"\n xmlns:quantity=\"http://www.google.com/publicdata/dataset/google/quantity\"\n xmlns:entity=\"http://www.google.com/publicdata/dataset/google/entity\"\u003e\n\n \u003cimport namespace=\"http://www.google.com/publicdata/dataset/google/time\"/\u003e\n \u003cimport namespace=\"http://www.google.com/publicdata/dataset/google/quantity\"/\u003e\n \u003cimport namespace=\"http://www.google.com/publicdata/dataset/google/entity\"/\u003e\n \u003cimport namespace=\"http://www.google.com/publicdata/dataset/google/geo\"/\u003e\n \n \u003cinfo\u003e\n \u003cname\u003e\n \u003cvalue\u003eMy statistics\u003c/value\u003e\n \u003c/name\u003e\n \u003cdescription\u003e\n \u003cvalue\u003eSome very interesting statistics about countries\u003c/value\u003e\n \u003c/description\u003e\n \u003curl\u003e\n \u003cvalue\u003ehttp://www.stats-bureau.com/mystats/info.html\u003c/value\u003e\n \u003c/url\u003e\n \u003c/info\u003e\n\n \u003cprovider\u003e\n \u003cname\u003e\n \u003cvalue\u003eBureau of Statistics\u003c/value\u003e\n \u003c/name\u003e\n \u003curl\u003e\n \u003cvalue\u003ehttp://www.stats-bureau.com\u003c/value\u003e\n \u003c/url\u003e\n \u003c/provider\u003e\n\n \u003ctopics\u003e\n \u003ctopic id=\"geography\"\u003e\n \u003cinfo\u003e\n \u003cname\u003e\u003cvalue\u003eGeography\u003c/value\u003e\u003c/name\u003e\n \u003c/info\u003e\n \u003c/topic\u003e\n \u003ctopic id=\"social_indicators\"\u003e\n \u003cinfo\u003e\n \u003cname\u003e\u003cvalue\u003eSocial indicators\u003c/value\u003e\u003c/name\u003e\n \u003c/info\u003e\n \u003ctopic id=\"population_indicators\"\u003e\n \u003cinfo\u003e\n \u003cname\u003e\u003cvalue\u003ePopulation indicators\u003c/value\u003e\u003c/name\u003e\n \u003c/info\u003e\n \u003c/topic\u003e\n \u003ctopic id=\"poverty_and_income\"\u003e\n \u003cinfo\u003e\n \u003cname\u003e\u003cvalue\u003ePoverty & income\u003c/value\u003e\u003c/name\u003e\n \u003c/info\u003e\n \u003c/topic\u003e\n \u003ctopic id=\"health\"\u003e\n \u003cinfo\u003e\n \u003cname\u003e\u003cvalue\u003eHealth\u003c/value\u003e\u003c/name\u003e\n \u003c/info\u003e\n \u003c/topic\u003e\n \u003c/topic\u003e\n \u003c/topics\u003e\n\n \u003cconcepts\u003e\n \u003c!-- As noted in the tutorial, this concept should extend quantity:amount.--\u003e\n \u003cconcept id=\"population\"\u003e\n \u003cinfo\u003e\n \u003cname\u003e\n \u003cvalue\u003ePopulation\u003c/value\u003e\n \u003c/name\u003e\n \u003cdescription\u003e\n \u003cvalue\u003eSize of the resident population.\u003c/value\u003e\n \u003c/description\u003e\n \u003c/info\u003e\n \u003ctopic ref=\"population_indicators\"/\u003e\n \u003ctype ref=\"integer\"/\u003e\n \u003c/concept\u003e\n\n \u003c!-- This country concept is defined for educational purposes only. A country\n concept exists in the Google geo dataset. See:\n\n http://code.google.com/apis/publicdata/docs/canonical/geo.html --\u003e \n \u003cconcept id=\"country\" extends=\"geo:location\"\u003e\n \u003cinfo\u003e\n \u003cname\u003e\n \u003cvalue\u003eCountry\u003c/value\u003e\n \u003c/name\u003e\n \u003cdescription\u003e\n \u003cvalue\u003eMy list of countries\u003c/value\u003e\n \u003c/description\u003e\n \u003c/info\u003e\n \u003ctype ref=\"string\"/\u003e\n \u003cproperty id=\"name\"\u003e\n \u003cinfo\u003e\n \u003cname\u003e\u003cvalue xml:lang=\"en\"\u003eCountry name\u003c/value\u003e\u003c/name\u003e\n \u003cdescription\u003e\n \u003cvalue xml:lang=\"en\"\u003eThe official name of the country\u003c/value\u003e\n \u003c/description\u003e\n \u003c/info\u003e\n \u003ctype ref=\"string\"/\u003e\n \u003c/property\u003e\n \u003ctable ref=\"countries_table\"/\u003e\n \u003c/concept\u003e\n\n \u003c!-- This US state concept is defined for educational purposes only. A US state\n concept exists in the Google geo US dataset. See:\n\n http://code.google.com/apis/publicdata/docs/canonical/geo.us.html --\u003e \n \u003cconcept id=\"state\" extends=\"geo:location\"\u003e\n \u003cinfo\u003e\n \u003cname\u003e\n \u003cvalue\u003eState\u003c/value\u003e\n \u003c/name\u003e\n \u003cdescription\u003e\n \u003cvalue\u003eUS states\u003c/value\u003e\n \u003c/description\u003e\n \u003c/info\u003e\n \u003ctype ref=\"string\"/\u003e\n \u003cproperty concept=\"country\" isParent=\"true\"/\u003e\n \u003ctable ref=\"states_table\"/\u003e\n \u003c/concept\u003e\n\n \u003cconcept id=\"gender\" extends=\"entity:entity\"\u003e\n \u003cinfo\u003e\n \u003cname\u003e\n \u003cvalue\u003eGender\u003c/value\u003e\n \u003c/name\u003e\n \u003cdescription\u003e\n \u003cvalue\u003eGender, Male or Female\u003c/value\u003e\n \u003c/description\u003e\n \u003cpluralName\u003e\u003cvalue\u003eGenders\u003c/value\u003e\u003c/pluralName\u003e\n \u003ctotalName\u003e\u003cvalue\u003eBoth genders\u003c/value\u003e\u003c/totalName\u003e\n \u003c/info\u003e\n \u003ctype ref=\"string\"/\u003e\n \u003ctable ref=\"genders_table\"/\u003e\n \u003c/concept\u003e\n\n \u003cconcept id=\"unemployment_rate\" extends=\"quantity:rate\"\u003e\n \u003cinfo\u003e\n \u003cname\u003e\n \u003cvalue\u003eunemployment rate\u003c/value\u003e\n \u003c/name\u003e\n \u003cdescription\u003e\n \u003cvalue\u003eThe percent of the labor force that is unemployed, not seasonally\n adjusted.\u003c/value\u003e\n \u003c/description\u003e\n \u003curl\u003e\u003cvalue\u003ehttp://www.bls.gov/cps/cps_htgm.htm\u003c/value\u003e\u003c/url\u003e\n \u003c/info\u003e\n \u003ctopic ref=\"social_indicators\"/\u003e\n \u003ctype ref=\"float\"/\u003e\n \u003cattribute id=\"is_percentage\"\u003e\n \u003ctype ref=\"boolean\"/\u003e\n \u003cvalue\u003etrue\u003c/value\u003e\n \u003c/attribute\u003e\n \u003c/concept\u003e\n\n \u003c/concepts\u003e\n\n \u003cslices\u003e\n \u003cslice id=\"countries_slice\"\u003e\n \u003cdimension concept=\"country\"/\u003e\n \u003cdimension concept=\"time:year\"/\u003e\n \u003cmetric concept=\"population\"/\u003e\n \u003ctable ref=\"countries_slice_table\"/\u003e\n \u003c/slice\u003e\n\n \u003cslice id=\"states_slice\"\u003e\n \u003cdimension concept=\"state\"/\u003e\n \u003cdimension concept=\"time:year\"/\u003e\n \u003cmetric concept=\"population\"/\u003e\n \u003cmetric concept=\"unemployment_rate\"/\u003e\n \u003ctable ref=\"states_slice_table\"/\u003e\n \u003c/slice\u003e\n\n \u003cslice id=\"countries_gender_slice\"\u003e\n \u003cdimension concept=\"country\"/\u003e\n \u003cdimension concept=\"gender\"/\u003e\n \u003cdimension concept=\"time:year\"/\u003e\n \u003cmetric concept=\"population\"/\u003e\n \u003ctable ref=\"countries_gender_slice_table\"/\u003e\n \u003c/slice\u003e\n\n \u003c/slices\u003e\n\n \u003ctables\u003e\n \u003ctable id=\"countries_table\"\u003e\n \u003ccolumn id=\"country\" type=\"string\"/\u003e\n \u003ccolumn id=\"name\" type=\"string\"/\u003e\n \u003ccolumn id=\"latitude\" type=\"float\"/\u003e\n \u003ccolumn id=\"longitude\" type=\"float\"/\u003e\n \u003cdata\u003e\n \u003cfile format=\"csv\" encoding=\"utf-8\"\u003ecountries.csv\u003c/file\u003e\n \u003c/data\u003e\n \u003c/table\u003e\n\n \u003ctable id=\"countries_slice_table\"\u003e\n \u003ccolumn id=\"country\" type=\"string\"/\u003e\n \u003ccolumn id=\"year\" type=\"date\" format=\"yyyy\"/\u003e\n \u003ccolumn id=\"population\" type=\"integer\"/\u003e\n \u003cdata\u003e\n \u003cfile format=\"csv\" encoding=\"utf-8\"\u003ecountry_slice.csv\u003c/file\u003e\n \u003c/data\u003e\n \u003c/table\u003e\n\n \u003ctable id=\"states_table\"\u003e\n \u003ccolumn id=\"state\" type=\"string\"/\u003e\n \u003ccolumn id=\"name\" type=\"string\"/\u003e\n \u003ccolumn id=\"country\" type=\"string\"\u003e\n \u003cvalue\u003eUS\u003c/value\u003e\n \u003c/column\u003e\n \u003ccolumn id=\"latitude\" type=\"float\"/\u003e\n \u003ccolumn id=\"longitude\" type=\"float\"/\u003e\n \u003cdata\u003e\n \u003cfile format=\"csv\" encoding=\"utf-8\"\u003estates.csv\u003c/file\u003e\n \u003c/data\u003e\n \u003c/table\u003e\n\n \u003ctable id=\"states_slice_table\"\u003e\n \u003ccolumn id=\"state\" type=\"string\"/\u003e\n \u003ccolumn id=\"year\" type=\"date\" format=\"yyyy\"/\u003e\n \u003ccolumn id=\"population\" type=\"integer\"/\u003e\n \u003ccolumn id=\"unemployment_rate\" type=\"float\"/\u003e\n \u003cdata\u003e\n \u003cfile format=\"csv\" encoding=\"utf-8\"\u003estate_slice.csv\u003c/file\u003e\n \u003c/data\u003e\n \u003c/table\u003e\n\n \u003ctable id=\"genders_table\"\u003e\n \u003ccolumn id=\"gender\" type=\"string\"/\u003e\n \u003ccolumn id=\"name\" type=\"string\"/\u003e\n \u003cdata\u003e\n \u003cfile format=\"csv\" encoding=\"utf-8\"\u003egenders.csv\u003c/file\u003e\n \u003c/data\u003e\n \u003c/table\u003e\n\n \u003ctable id=\"countries_gender_slice_table\"\u003e\n \u003ccolumn id=\"country\" type=\"string\"/\u003e\n \u003ccolumn id=\"gender\" type=\"string\"/\u003e\n \u003ccolumn id=\"year\" type=\"date\" format=\"yyyy\"/\u003e\n \u003ccolumn id=\"population\" type=\"integer\"/\u003e\n \u003cdata\u003e\n \u003cfile format=\"csv\" encoding=\"utf-8\"\u003egender_country_slice.csv\u003c/file\u003e\n \u003c/data\u003e\n \u003c/table\u003e\n \u003c/tables\u003e\n\n\u003c/dspl\u003e\n```"]]