Wikipédia:GLAM/CEPID NeuroMat/Pesquisa
Página inicial | Projetos de difusão | Eventos | Pesquisa | Participantes |
Esta página concentra dados sobre as publicações do Centro de Pesquisa, Inovação e Difusão em Neuromatemática que estão disponíveis no Wikidata.
Publicações |
Produção científica e citações internas em publicações do NeuroMat
editarO código abaixo gera um grafo com datas e sobrenomes dos autores em publicações do NeuroMat.
#defaultView:Graph
SELECT DISTINCT ?Artigo (?Nome_do_artigo AS ?ArtigoLabel) ?rgb ?Artigo_citado ?Num_citações
WITH { # Get articles only once. While here, take the max_order of the authors (P50 and P2093)
SELECT ?Artigo (max(?ordem_p50) AS ?ordem_max_p50) (max(?ordem_p2093) AS ?ordem_max_p2093) WHERE {
?Artigo wdt:P361 wd:Q18477654.
OPTIONAL {?Artigo p:P50 ?autor_p50. ?autor_p50 pq:P1545 ?ordem_p50}
OPTIONAL {?Artigo p:P2093 ?autor_p2093. ?autor_p2093 pq:P1545 ?ordem_p2093}
} GROUP BY ?Artigo
} AS %artigos
WITH { # From the max_order gotten earlier, select the maximun between them
SELECT ?Artigo ?O_max WHERE {
INCLUDE %artigos.
BIND(IF(BOUND(?ordem_max_p50),
IF(BOUND(?ordem_max_p2093),
IF(?ordem_max_p50 <= ?ordem_max_p2093, STR(?ordem_max_p2093), STR(?ordem_max_p50)),
STR(?ordem_max_p50)),
STR(?ordem_max_p2093)) AS ?O_max)
}
} AS %ordem
WITH { # Now, with the articles in hand, get the first author (assuming here that there is at least one filled)
# and get, if exists, the name of the second author.
SELECT ?Artigo ?autor1Label ?autor2Label ?O_max WHERE {
INCLUDE %ordem.
{?Artigo p:P50 ?autor_. ?autor_ ps:P50 ?autor1. ?autor_ pq:P1545 "1".}
UNION
{?Artigo p:P2093 ?autor_. ?autor_ ps:P2093 ?autor1. ?autor_ pq:P1545 "1".}
OPTIONAL{{?Artigo p:P50 ?autor__. ?autor__ ps:P50 ?autor2. ?autor__ pq:P1545 "2".}
UNION
{?Artigo p:P2093 ?autor__. ?autor__ ps:P2093 ?autor2. ?autor__ pq:P1545 "2".}}
SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],pt-br,pt,en,es,fr,de,ja".
?autor1 rdfs:label ?autor1Label.
?autor2 rdfs:label ?autor2Label.}
}
} AS %autores
WITH { # Get the last name of the authors
SELECT ?Artigo ?Autor1_nome ?Autor2_nome ?O_max WHERE {
INCLUDE %autores.
BIND(REPLACE(STR(?autor1Label),REPLACE(str(?autor1Label),'[^ ]*$',''),'') AS ?Autor1_nome)
BIND(REPLACE(STR(?autor2Label),REPLACE(str(?autor2Label),'[^ ]*$',''),'') AS ?Autor2_nome)
}
} AS %nome_autores
WITH {
SELECT ?Artigo (COUNT(?Artigo_citando) AS ?Num_citações) WHERE {
INCLUDE %autores.
OPTIONAL{?Artigo_citando wdt:P2860 ?Artigo. ?Artigo_citando wdt:P361 wd:Q18477654.}
} GROUP BY ?Artigo
} AS %num_citacoes
WHERE{
INCLUDE %nome_autores.
INCLUDE %num_citacoes.
# Get the date, if it is filled
OPTIONAL {?Artigo wdt:P577 ?data_aux. BIND(YEAR(?data_aux) AS ?data_)}
BIND(IF(BOUND(?data_),STR(?data_),"?") AS ?data)
# Now, if theres one or two authors, put their names and the date,
# if there is more, put put the first author followed by a 'et al'
BIND(IF(?O_max="1",
CONCAT(?Autor1_nome, ", ", ?data),
IF(?O_max="2",
CONCAT(?Autor1_nome, ", ", ?Autor2_nome, ", ", ?data),
CONCAT(?Autor1_nome, " et al, ", ?data))) AS ?Nome_do_artigo)
# If the articles cite each other, get this info.
OPTIONAL{?Artigo wdt:P2860 ?Artigo_citado. ?Artigo_citado wdt:P361 wd:Q18477654.}
OPTIONAL{?Artigo_citando wdt:P2860 ?Artigo. ?Artigo_citando wdt:P361 wd:Q18477654.}
# Put some colors in the graph
BIND(IF(?Num_citações>30,
"31005e",
IF(?Num_citações>20,
"1a009c",
IF(?Num_citações>15,
"0587e3",
IF(?Num_citações>10,
"05e3af",
IF(?Num_citações>5,
"7fe305",
IF(?Num_citações>1,
"e3dc05",
IF(?Num_citações=1,
"e37b05",
"e30505"))))))) AS ?rgb)
}
Coautores em publicações do NeuroMat
editarO código abaixo gera um grafo, em que cada autor é um nó do grafo e a coautoria em um ou mais artigos gera uma aresta no grafo, a cor de cada nó é definida de acordo com o sexo/gênero (P21) declarado no Wikidata.
#defaultView:Graph
SELECT DISTINCT ?Autor1 ?Autor1Label ?rgb ?Autor2 ?Autor2Label
WITH {
SELECT ?Obra WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?Obra wdt:P361 wd:Q18477654.
}
} AS %artigos
WITH {
SELECT ?Autor1 ?Obra WHERE {
INCLUDE %artigos.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?Obra wdt:P50 ?Autor1.
}
} AS %autor1
WITH {
SELECT ?Autor1 ?Autor2 ?Obra WHERE {
INCLUDE %artigos.
INCLUDE %autor1.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?Obra wdt:P50 ?Autor2.
FILTER(?Autor1 != ?Autor2)
}
GROUP BY ?Autor1 ?Autor2 ?Obra
} AS %autor2
WHERE {
INCLUDE %autor2.
OPTIONAL { ?Autor1 wdt:P21 ?Gênero . }
BIND( IF(?Gênero = wd:Q6581097, "3182BD", "E6550D") AS ?rgb)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Número de artigos do NeuroMat por autor
editarO código abaixo gera um histograma do número de artigos do NeuroMat por autor.
#defaultView:BarChart
SELECT ?Nome_do_autor ?Nome_do_autorLabel (COUNT(distinct(?item)) AS ?Número_de_artigos) WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?item wdt:P361 wd:Q18477654.
OPTIONAL { ?item wdt:P50 ?Nome_do_autor. }
} group by ?Nome_do_autor ?Nome_do_autorLabel
Distribuição de autores em publicações do NeuroMat por gênero
editarO código abaixo gera um gráfico de barras com a distribuição de autores em publicações do NeuroMat por gênero.
#defaultView:BarChart
SELECT (SAMPLE(?Gênero) AS ?Gênero) (COUNT(DISTINCT(?Autores)) AS ?Número_de_autores) (SAMPLE(?Nome_autores) AS ?Autores) WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?Obra wdt:P361 wd:Q18477654.
?Obra wdt:P50 ?Autores.
?Autores wdt:P21 ?Gênero_aux.
?Gênero_aux rdfs:label ?Gênero. FILTER(LANG(?Gênero)="pt-br")
?Autores rdfs:label ?Nome_autores. FILTER(LANG(?Nome_autores)="pt-br")
} GROUP BY ?Nome_autores
ORDER BY ?Gênero ?Nome_autores
Número de publicações do NeuroMat por gênero dos autores
editarO código abaixo gera um gráfico de barras com número de publicações do NeuroMat por gênero dos autores.
#defaultView:BarChart
SELECT ?Gênero ?GêneroLabel (COUNT(distinct(?item)) AS ?Número_de_artigos) WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?item wdt:P361 wd:Q18477654.
OPTIONAL { ?item wdt:P50 ?Nome_do_autor. }
OPTIONAL { ?Nome_do_autor wdt:P21 ?Gênero. }
} group by ?Gênero ?GêneroLabel
Perfis de entidades relacionadas ao NeuroMat no Scholia
editarO código abaixo gera uma tabela com a relação de perfis de entidades relacionadas ao NeuroMat no Scholia.
SELECT DISTINCT ?Wikidata_ID ?Nome ?Tipo ?Perfil_no_Scholia WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
{
BIND(wd:Q18477654 AS ?Wikidata_ID)
wd:Q18477654 rdfs:label ?Nome_revista.
FILTER(LANG(?Nome_revista)="pt-br")
BIND(STR(?Nome_revista) AS ?Nome)
BIND("Instituição" AS ?Tipo)
BIND(SUBSTR(STR(?Wikidata_ID),32) AS ?qid)
BIND(IRI(CONCAT("https://tools.wmflabs.org/scholia/venue/", ?qid)) AS ?Perfil_no_Scholia)
}
UNION
{
?Artigos wdt:P361 wd:Q18477654.
?Artigos rdfs:label ?Nome_artigo.
FILTER(LANG(?Nome_artigo)="pt-br")
BIND(SUBSTR(STR(?Artigos),32) AS ?qid)
BIND(IRI(CONCAT("https://tools.wmflabs.org/scholia/work/", ?qid)) AS ?Perfil_no_Scholia)
BIND("Artigo" AS ?Tipo)
BIND(STR(?Nome_artigo) AS ?Nome)
BIND(?Artigos AS ?Wikidata_ID)
}
UNION
{
?Artigos2 wdt:P361 wd:Q18477654.
?Artigos2 wdt:P50 ?Autores_aux.
?Autores_aux rdfs:label ?Autores.
FILTER(LANG(?Autores)="pt-br")
BIND(SUBSTR(STR(?Autores_aux),32) AS ?qid)
BIND(IRI(CONCAT("https://tools.wmflabs.org/scholia/author/", ?qid)) AS ?Perfil_no_Scholia)
BIND("Autor(a)" AS ?Tipo)
BIND(STR(?Autores) AS ?Nome)
BIND(?Autores_aux AS ?Wikidata_ID)
}
}