4

The English Wikipedia includes an article for nearly every U.S. Census Place. Has anyone published a crosswalk from FIPS codes of these places to Wikipedia urls?

Is this something that would be possible with wikidata?

2
  • 2
    SELECT * WHERE { ?article schema:isPartOf <https://en.wikipedia.org/> ; schema:about/wdt:P774 ?fips }? For FIPS 6-4, replace wdt:P774 with wdt:P882. Commented Jun 7, 2018 at 19:34
  • 2
    best question/info i've seen in quite awhile
    – albert
    Commented Jun 7, 2018 at 22:13

1 Answer 1

3

Is this something that would be possible with Wikidata?

Yes, this is possible:

Try the following query:

 SELECT ?fips_code ?wikipedia_article WHERE {
  ?wikidata_item wdt:P774 ?fips_code .
  ?wikipedia_article schema:about ?wikidata_item .
  ?wikipedia_article schema:isPartOf <https://en.wikipedia.org/> .
} ORDER BY ?fips_code

If you need FIPS 6-4 codes instead of FIPS 55-3 ones, replace wdt:P774 with wdt:P882.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.