Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementar como fonte de dados a Wikidata #15

Open
augusto-herrmann opened this issue Jul 24, 2020 · 1 comment
Open

Implementar como fonte de dados a Wikidata #15

augusto-herrmann opened this issue Jul 24, 2020 · 1 comment

Comments

@augusto-herrmann
Copy link
Owner

augusto-herrmann commented Jul 24, 2020

A Wikidata também tem informações estruturadas sobre os municípios do Brasil. Esta query SPARQL traz a lista de cidades:

SELECT DISTINCT ?city ?cityLabel ?url WHERE {
  ?city wdt:P31 wd:Q3184121 ;
        wdt:P856 ?url .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} LIMIT 20

wikidata-cidades

@augusto-herrmann
Copy link
Owner Author

Ao consultar o endpoint SPARQL, para receber o resultado em CSV, basta acrescentar o cabeçalho Accept: text/csv na requisição. Exemplo com curl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant