User:Fnielsen
Jump to navigation
Jump to search
Babel user information | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
Users by language |
Finn Årup Nielsen, Denmark
Quote
[edit]"Until Wikidata can give me a list of all movies shot in the 60s in Spain, in which a black female horse is stolen by a left-handed actor playing a Portuguese orphan, directed by a colorblind German who liked sailing, and written by a dog-owning women from Helsinki, we have more work to do." — Tobias1984 18:39, 7 December 2013 (UTC)
See also User:John Vandenberg.
Tools
[edit]- Scholia
- Ordia
- Magnus Manske:
- Reasonator: https://tools.wmflabs.org/reasonator
- Wikidata Query: https://wdq.wmflabs.org/
- Example: [1]
- Autolist: http://tools.wmflabs.org/wikidata-todo/autolist.html
- Example: All scientific articles: [2]
- Example: Danish Folketings Politician with a Twitter account: [3] CLAIM[463:209151] AND CLAIM[553:918]
- Example: Danish political parties with a Twitter account: [4] WDQ (JSON)
- Example (from Magnus): "which genes encode proteins that are involved in cell cycle checkpointing?" [5]
- Query service:
Wikidata query
[edit]Artworks of Martinus Rørby on SMK
[edit]PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX v: <http://www.wikidata.org/prop/statement/>
SELECT ?artwork ?artworkLabel ?kms ?height ?width ?url WHERE {
?artwork wdt:P195 wd:Q671384 . # SMK
?artwork wdt:P170 wd:Q979541 . # Martinus Rørby
SERVICE wikibase:label {
bd:serviceParam wikibase:language "da" .
}
OPTIONAL {?artwork wdt:P217 ?kms }
OPTIONAL {?artwork wdt:P2048 ?height }
OPTIONAL {?artwork wdt:P2049 ?width }
OPTIONAL {?artwork wdt:P973 ?url }
} LIMIT 20
Artworks of dogs at SMK
[edit]PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX v: <http://www.wikidata.org/prop/statement/>
SELECT ?artwork ?artworkLabel ?url WHERE {
?artwork wdt:P195 wd:Q671384 . # SMK
?artwork wdt:P180/wdt:P279* wd:Q144 . # Dog
SERVICE wikibase:label {
bd:serviceParam wikibase:language "da" .
}
OPTIONAL {?artwork wdt:P973 ?url }
}
SMK artworks and "motiv" (depicts) in Python
[edit]Inspired from https://www.pfenninger.org/posts/mapping-the-worlds-nuclear-power-plants/
import numpy as np
import pandas as pd
import sparql
service = sparql.Service("https://query.wikidata.org/sparql", method="GET")
statement = """
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX v: <http://www.wikidata.org/prop/statement/>
SELECT ?artwork ?artworkLabel ?motiv ?motivLabel WHERE {
?artwork wdt:P195 wd:Q671384 .
?artwork wdt:P180 ?motiv .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "da,en" .
}
}
"""
result = service.query(statement)
df = pd.DataFrame(result.fetchall(), columns=result.variables)
# Set up feature matrix
motivs = set([item.value for item in df['motivLabel']])
artworks = set([item.value for item in df['artwork']])
feature_matrix = pd.DataFrame(0, index=artworks, columns=motivs)
artwork_mapper = {}
for n, row in df.iterrows():
artwork = row['artwork'].value
motiv = row['motivLabel'].value
feature_matrix.ix[artwork, motiv] = 1
artwork_mapper[artwork] = row['artworkLabel'].value
# Possible scaling
feature_matrix = feature_matrix.divide(np.sqrt(feature_matrix.sum(axis=1)), axis='index')
# Machine learning decomposition
from sklearn.decomposition import NMF
decomposer = NMF(n_components=2)
decomposer.fit(feature_matrix)
transformed = decomposer.transform(feature_matrix)
Result:
>>> feature_matrix.columns[(-decomposer.components_[0, :]).argsort()[:10]]
Index([u'hund', u'mand', u'kvinde', u'træ', u'bord', u'kurv', u'borddug', u'barn', u'hest', u'Sværd, sværd'], dtype='object')
>>> feature_matrix.columns[(-decomposer.components_[1, :]).argsort()[:10]]
Index([u'himmel', u'sky', u'mand', u'vej', u'Hede, hede', u'Lyng, lyng', u'træ', u'Bjerg, bjerg', u'Vandfald, vandfald', u'Får, får'], dtype='object')
>>> [artwork_mapper[q] for q in feature_matrix.index[(-transformed[:, 0]).argsort()[:10]]]
[u'Dansebakken ved Sorgenfri', u'Johannes D\xf8berens henrettelse', u'B\xf8geskov i maj. Motiv fra Iselingen', u'Frederik II bygger Kronborg', u'Frederik II bygger Kronborg', u'En hyrdinde med en hund', u'Fra et romersk osteria', u'Et selskab af danske kunstnere i Rom', u'Susanne og de to \xe6ldste', u'Bella and Hanna. The Eldest Daughters of M. L. Nathanson']
>>> [artwork_mapper[q] for q in feature_matrix.index[(-transformed[:, 1]).argsort()[:10]]]
[u'En jysk f\xe5rehyrde p\xe5 heden', u'Landskab med vandfald og hytte', u'Maleren i landsbyen', u'Udsigt gennem tre af de nordvestlige buer i Colosseums tredje stokv\xe6rk', u'Udsigt fra Kronborg Vold over flagbatteriet og Sundet til den svenske kyst', u'Bjerglandskab med en flod', u'Hedestudie', u'Landscape with Two Horses', u'Udsigt fra Parthenon p\xe5 Akropolis', u'Birketr\xe6er p\xe5 L\xe6s\xf8 efter regn']
Six degrees of Kevin Bacon
[edit]PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX v: <http://www.wikidata.org/prop/statement/>
PREFIX q: <http://www.wikidata.org/prop/qualifier/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?movie1Label ?actor1Label ?movie2Label ?actor2Label ?movie3Label ?actor3Label ?movie4Label WHERE {
?movie1 wdt:P161 wd:Q20980928 . # Finn Årup Nielsen
?movie1 wdt:P161 ?actor1 .
?movie2 wdt:P161 ?actor1 .
?movie2 wdt:P161 ?actor2 .
?movie3 wdt:P161 ?actor2 .
?movie3 wdt:P161 ?actor3 .
?movie4 wdt:P161 ?actor3 .
?movie4 wdt:P161 wd:Q3454165 . # Kevin Bacon
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en,da" .
}
}
Notes
[edit]Special Qs:
- Q2013: Wikidata
- Q42: Douglas Adams
- Q1: Universet
- Q2: Jorden
- Q3: Liv
- Q4: Død
- Q5: Menneske
- Q8: Lykke
- Q13: Triskaidekafobi
- Q4115189: Wikidata-sandkasse
Subpages
[edit]- User:Fnielsen/sandbox
- User:Fnielsen/SPARQL
- User:Fnielsen/Open science data in wikis with data mining
- User:Fnielsen/Autolists
- User:Fnielsen/Brede Database
- User:Fnielsen/Datasets
- User:Fnielsen/Lexeme issues
- User:Fnielsen/Gender
Vandalism examples in Wikidata
[edit]- [6] French football player Anthony Martial called "rien".
- [7] American basketball player Michael Jordan called an "insect".
Odd and wrong edits
[edit]- [8]. What I meant was probably [9].
- Edit on wrong page [10]. Should have been on [11].
- [12] self-referencing Wikidata item (Q16222597). See also discussion.
- Wrong match with KID on painting. The title became way wrong.
- Wrong sex: [13], [14], [15]
- Insert DOI into PMID field
- Date of death as date of birth
- American Physical Therapy Association (Q750863) A troublesome item because it refers to four different organizations.
- genre set to genre
- "material used" used wrongly
- Wrong property used
Other users edits:
Strange or odd items
[edit]- Structure-from-motion in Spherical Video using the von Mises-Fisher Distribution (Q39004680) Two PMIDs
- farm road (Q12046227) "Wirtschaftsweg" and "agricultural road" seems not to be quite the same.
- Current evaluation and future needs of a mental health data linkage system in a remote region: a Canadian experience (Q30742826) Wrong author ordering from Europe PubMed Central
Pagepiles
[edit]- 11534: Items in Danish collections
Kilder
[edit]Kilder synes ikke at virker endnu. Der er lidt hjælp her: Help:Sources/da
Properties
[edit]Suggestions:
- Fonttype. Suggested at Wikidata:Property_proposal/Creative work#Skrifttype. Now as Property:P2739
- Kulturstyrelsen ID
- P-nummer fra CVR. Suggested as Wikidata:Property proposal/Organization#P-nummer
- Naturfrednings-ID, e.g., "08093.00" for http://www2.blst.dk/nfr/08093.00.pdf and http://www.fredninger.dk/fredning/gammelmosen/ Suggested at Wikidata:Property proposal/Authority control#Registreringsnummer for naturfredning
- Buildings:
- BBR-nummber, fx. 173-95430-3
- Fredede bygninger sagsnummer, fx 4592870. Kan resolves, fx https://www.kulturarv.dk/fbb/sagvis.pub?sag=4586620. Now as Property:P2783.
- Ejendomsnummer, fx 95430. Bruges af kulturstyrelsen og hos ois.dk
- "Bygningsnummer", fx. 4592870. Bruges på kulturarv. Kan resolves, fx. https://www.kulturarv.dk/fbb/bygningvis.pub?bygning=4592870
- Fund og Fortidsminder
- Sted- og lokalitetsnr., fx 010403-7
- Fredningsnr., fx 282913
- URL-del/systemnummer, fx, 93973. Kan resolves, linkeksempel http://www.kulturarv.dk/fundogfortidsminder/Lokalitet/93973/
Bibliographic data
[edit]Examples:
- The Skeptical Environmentalist (Q1755935)
Property
[edit]https://docs.google.com/spreadsheet/ccc?key=0AlPNcNlN2oqvdFQyR2F5YmhrMWpXaUFkWndQWUZyemc#gid=0
Wikidata source metadata
[edit]Authority control |