State

From Data-gov Wiki

Jump to: navigation, search
Infobox (Dataset Feature) edit with form
  • name: State

  • description: This is a feature that indicates the corresponding dataset mentions a US state or territory.
  • modified: 2010-4-10


Contents

List of related datasets

Datasets mentioning State Title Other features
Current Population Survey (CPS) Annual Social and Economic Supplement (ASEC) State
Dataset 10001 State
Agency
Dataset 10002 State
Dataset 10007 State
Fips code
Dataset 10009 State
Population
County
Zipcode
Dataset 10010 State
Population
County
Zipcode
Dataset 10011 State
Dataset 10026 State
Dataset 10028 State
Dataset 10035 State
Poverty
Poverty 125
Dataset 10041 State
Dataset 10049 State
Dataset 10050 State
Dataset 1322 Treasury Recovery Act Data State
Dataset 1330 Railroad Retirement Act Annuitants and Active Railroad Employees by Congressional District State
Congressional district
Dataset 1356 Tax Year 2007 County Income Data State
Fips code
Dataset 1425 Census of Agriculture Race, Ethnicity and Gender Profile Data State
Dataset 1491 FEMA Disaster Declarations Summary State
Dataset 1537 FY07 Veterans Compensation and Pension by County State
Dataset 1538 FY08 Veterans Compensation and Pension by County State
Dataset 1580 Public Company Bankruptcy Cases Opened and Monitored for Fiscal Year 2009 State
Dataset 1590 OMHA Appeals Listed By State State
Dataset 1623 OMH Claims Listed by State State
Region
Dataset 326 Geographic Profile of Employment and Unemployment Year
State
Gender
Age
Dataset 353 State Library Agency Survey: Fiscal Year 2006 State
Population

How to use

Example1. connect two datasets by name

notes: in this example, the two dataset refers state with lower case and upper case respectively. A fn:lower-case function was called to support the join.

datasets mentioned

sparql endpoint:

http://data-gov.tw.rpi.edu/joseki/sparql/tdb-datagov

sample query (execute)

PREFIX d1356: <http://data-gov.tw.rpi.edu/vocab/p/1356/>
PREFIX d1623: <http://data-gov.tw.rpi.edu/vocab/p/1623/>
prefix fn: <http://www.w3.org/2005/xpath-functions#>
SELECT ?state2 ?agi ?claims07
WHERE {
graph <http://data-gov.tw.rpi.edu/vocab/Dataset_1356>
{                 
   ?s d1356:county_name ?state1 .
   ?s d1356:county_code 0 .
   ?s d1356:agi ?agi .
}
graph <http://data-gov.tw.rpi.edu/vocab/Dataset_1623>
{             ?s2 d1623:state ?state2 .
         ?s2 d1623:fiscal_year_07 ?claims07 .
}
filter(fn:lower-case(?state1)=fn:lower-case(?state2))
}
order by ?state2

Example2. get dbpedia URI for state

notes: in this example, we try to associate state from the given dataset to dbpedia URI

a user selected dataset

the state mapping dataset

sparql endpoint:

http://data-gov.tw.rpi.edu/joseki/sparql/tdb-datagov

sample query (execute)

PREFIX dgp1356: <http://data-gov.tw.rpi.edu/vocab/p/1356/>
PREFIX dgp10011: <http://data-gov.tw.rpi.edu/vocab/p/10011/>
prefix fn: <http://www.w3.org/2005/xpath-functions#>
prefix owl:   <http://www.w3.org/2002/07/owl#> 
prefix skos:  <http://www.w3.org/2004/02/skos/core#> 
prefix dgtwc: <http://data-gov.tw.rpi.edu/2009/data-gov-twc.rdf#> 
prefix foaf:  <http://xmlns.com/foaf/0.1/> 

SELECT ?state_abbrev ?state_name ?uri_dgtwc ?uri_dbpedia ?state1 ?state2 
WHERE {
graph <http://data-gov.tw.rpi.edu/vocab/Dataset_1356>
{                 
   ?s dgp1356:county_name ?state1 .
   ?s dgp1356:county_code 0 .
}
graph <http://data-gov.tw.rpi.edu/vocab/Dataset_10011>
{        ?uri_dgtwc skos:altLabel ?state2 .
         ?uri_dgtwc owl:sameAs ?uri_dbpedia .
         ?uri_dgtwc dgtwc:abbreviation ?state_abbrev .
         ?uri_dgtwc foaf:name ?state_name .
          filter( regex(str(?uri_dbpedia),"dbpedia") )

}
filter(fn:lower-case(str(?state1))=fn:lower-case(str(?state2)))
}
order by ?state2

References

Facts about StateRDF feed
Dcterms:descriptionThis is a feature that indicates the corresponding dataset mentions a US state or territory.
Dcterms:modified2010-4-10
Foaf:nameState
Skos:altLabelState  +, state  +, and STATE  +
Personal tools
internal pages