-
Notifications
You must be signed in to change notification settings - Fork 81
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
added author-award table for venues (closes #713) #848
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -240,6 +240,14 @@ | |
ORDER BY DESC(?count) | ||
` | ||
|
||
authorAwardsSparql = ` | ||
SELECT DISTINCT ?author ?authorLabel ?award ?awardLabel WHERE { | ||
?item wdt:P1433 wd:{{ q }} ; | ||
wdt:P50 ?author . | ||
?author wdt:P166 ?award . | ||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | ||
} | ||
` | ||
|
||
$(document).ready(function() { | ||
sparqlToDataTable(recentlyPublishedWorksSparql, "#recently-published-works"); | ||
|
@@ -252,6 +260,7 @@ | |
sparqlToDataTable(genderDistributionSparql, "#gender-distribution"); | ||
sparqlToDataTable(authorshipsGenderDistributionSparql, | ||
"#authorships-gender-distribution"); | ||
sparqlToDataTable(authorAwardsSparql, "#author-awards"); | ||
}); | ||
</script> | ||
|
||
|
@@ -352,5 +361,9 @@ <h3>Authorships</h3> | |
<table class="table table-hover" id="authorships-gender-distribution"></table> | ||
|
||
|
||
<h2 id="AuthorAwards">Author Awards</h2> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am wondering whether there should be a space in "AuthorAwards"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's just the id of the header, right? The text itself has a space. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. On the other hand, I do not know if it is a good idea to have spaces in the ids (as I have been doing in the past). Do you know if one can run into problems with that? Maybe it is better with a dash? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah okay. I never used spaces in ids. So I guess it's better to remove spaces. It doesn't really matter if it's author-awards or AuthorAwards or authorAwards but I would try to stick to one naming convention. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the lookup. Maybe we should convert the spaces to a dash and lowercase when the word is not the first, e.g., "Author-awards". I hope that does not collide with the table-id. |
||
|
||
<table class="table table-hover" id="author-awards"></table> | ||
|
||
{% endblock %} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I extended this with some more languages. Maybe the service labeling should be parametrized.