User:Jsamwrites/The story of programming languages

From Wikidata
Jump to navigation Jump to search

Programming lanugages[edit]

Get all programming languages[edit]

SELECT DISTINCT ?langLabel
WHERE {
  ?lang wdt:P31/wdt:P279* wd:Q9143;
            rdfs:label ?langLabel.
  FILTER(LANG(?langLabel)="en")
}
ORDER by ?langLabel

On Wikidata Query

Get all properties used to describe programming language[edit]

SELECT DISTINCT ?property ?propertyLabel
WHERE
{
  ?item wdt:P31/wdt:P279* wd:Q9143;
        ?propertyUrl [].
  ?property ?ref ?propertyUrl .
  ?property a wikibase:Property .
  ?property rdfs:label ?propertyLabel.
  FILTER(LANG(?propertyLabel)="en")
}
ORDER by ?property

On Wikidata Query

Usage (Count) of properties to describe programming languages[edit]

SELECT ?property ?propertyLabel  (count(?item) as ?count)
WHERE
{
  ?item wdt:P31/wdt:P279* wd:Q9143;
        ?propertyUrl [].
  ?property ?ref ?propertyUrl .
  ?property a wikibase:Property .
  ?property rdfs:label ?propertyLabel.
  FILTER(LANG(?propertyLabel)="en")
}
GROUP by ?property ?propertyLabel
ORDER by ?count

Try it! On Wikidata Query

Number of programming languages per year[edit]

SELECT (str(?year) AS ?year) (count(DISTINCT ?lang) as ?count)
WHERE {
  ?lang wdt:P31/wdt:P279* wd:Q9143;
        wdt:P571 ?day.
  BIND( year(?day) as ?year ).
}
GROUP by ?year

On Wikidata Query


Number of programming languages per decade[edit]

SELECT (concat(str((?decade-1)*10),"-",str((?decade)*10)) AS ?decade) (count(DISTINCT ?lang) as ?count)
WHERE {
  ?lang wdt:P31/wdt:P279* wd:Q9143;
        wdt:P571 ?day.
  BIND( CEIL(year(?day)/10) as ?decade ).
}
GROUP by ?decade

On Wikidata Query

Bar graph (as on 24 March 2017)[edit]

Programming paradigms[edit]

Get all programming paradigms[edit]

SELECT DISTINCT ?paradigmLabel
WHERE {
  ?paradigm wdt:P279* wd:Q188267;
            rdfs:label ?paradigmLabel.
  FILTER(LANG(?paradigmLabel)="en")
}
ORDER by ?paradigmLabel

On Wikidata Query

References[edit]