From b9944ee1a4b07edda741cdfc89abf0715f65a164 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 30 Mar 2019 15:14:44 +0100 Subject: rebuild --- client/map/index.js | 3 ++- client/tables.js | 11 ++++++++-- scraper/client/paper/citationList.component.js | 6 ++++++ scraper/client/paper/paper.verify.js | 18 ++++++++++++++-- site/includes/chart.html | 2 +- site/includes/citations.html | 2 +- site/includes/map.html | 2 +- .../datasets/50_people_one_question/index.html | 4 ++-- site/public/datasets/brainwash/index.html | 15 ++++++++++--- site/public/datasets/celeba/index.html | 4 ++-- site/public/datasets/cofw/index.html | 6 +++--- site/public/datasets/duke_mtmc/index.html | 25 ++++++++++++++++++++-- site/public/datasets/hrt_transgender/index.html | 15 ++++++++++--- site/public/datasets/lfw/index.html | 15 ++++++++++--- site/public/datasets/market_1501/index.html | 4 ++-- site/public/datasets/pipa/index.html | 4 ++-- site/public/datasets/uccs/index.html | 25 ++++++++++++++++++++-- site/public/datasets/viper/index.html | 15 ++++++++++--- 18 files changed, 141 insertions(+), 35 deletions(-) diff --git a/client/map/index.js b/client/map/index.js index 7c205268..4e6db2de 100644 --- a/client/map/index.js +++ b/client/map/index.js @@ -102,7 +102,8 @@ export default function append(el, payload) { const citationAddress = citation.addresses[0] const latlng = [citationAddress.lat, citationAddress.lng].map(n => parseFloat(n)) if (Number.isNaN(latlng[0]) || Number.isNaN(latlng[1])) return - addMarker(map, latlng, citation.title, citationAddress.name, citation.year, citation.pdf) + const addressString = citation.addresses.map(addr => addr.name).join('
') + addMarker(map, latlng, citation.title, addressString, citation.year, citation.pdf) addArc(map, source, latlng, arcStyles[citationAddress.type]) }) diff --git a/client/tables.js b/client/tables.js index 1077289f..9eedbe18 100644 --- a/client/tables.js +++ b/client/tables.js @@ -15,7 +15,9 @@ const citationsColumns = [ { title: 'Institution', field: 'institution', sorter: 'string' }, { title: 'Country', field: 'country', sorter: 'string', width: 140 }, { title: 'Year', field: 'year', sorter: 'number', width: 70 }, - { title: 'PDF', field: 'pdf', formatter: 'link', sorter: 'string', width: 100 }, + { title: 'PDF', field: 'pdf', formatter: 'link', + formatterParams: { target: "_blank", urlField: 'pdf', }, + sorter: 'string', width: 100 }, ] function getColumns(payload) { @@ -36,12 +38,17 @@ function getColumns(payload) { function getCitations(dataset) { // console.log(dataset.citations) + console.log(dataset.citations.map(d => [d.pdf, d.doi])) return dataset.citations.map(citation => ({ title: citation.title, institution: citation.addresses[0].name, country: citation.addresses[0].country, year: citation.year, - pdf: (citation.pdf && citation.pdf.length) ? citation.pdf[0] : "", + pdf: (citation.pdf && citation.pdf.length) + ? citation.pdf[0] + : (citation.doi && citation.doi.length) + ? citation.doi[0] + : "", })) } diff --git a/scraper/client/paper/citationList.component.js b/scraper/client/paper/citationList.component.js index 10e3ba9a..b2b2ab8f 100644 --- a/scraper/client/paper/citationList.component.js +++ b/scraper/client/paper/citationList.component.js @@ -52,6 +52,12 @@ class CitationList extends Component { ? cite.pdf.map((pdf, i) => [pdf]) : "no pdf" } + cite.doi = { + _raw: true, + value: (cite.doi && cite.doi.length) + ? cite.doi.map((pdf, i) => [doi]) + : "" + } cite.s2 = { _raw: true, value: {citation.title}
{citation.id} - {' | PDFs: '} + {citation.pdf.length ? ' | PDF: ' : ''} {citation.pdf.map((pdf,i) => { const domain = pdf.replace('www.','').split('/').slice(2,3)[0] || 'unknown' return ( @@ -209,13 +209,27 @@ class PaperVerify extends Component { ) })} + {citation.doi.length ? ' | DOI: ' : ''} + {citation.doi.map((doi,i) => { + const domain = doi.replace('www.','').split('/').slice(2,3)[0] || 'unknown' + return ( + this.setState({ doi_index: i })} + className={i === this.state.doi_index ? 'selected pdfLink' : 'pdfLink'} + > + {'[' + domain + '] '} + + ) + })} {' | '} - {'[semantic scholar]'} + {'[s2]'}
diff --git a/site/includes/chart.html b/site/includes/chart.html index 913e09b2..d5ca5e47 100644 --- a/site/includes/chart.html +++ b/site/includes/chart.html @@ -3,7 +3,7 @@

This bar chart presents a ranking of the top countries where citations originated. Mouse over individual columns - to see yearly totals. Colors are only assigned to the top 10 overall countries. + to see yearly totals. These charts show only the top 10 countries overall.

diff --git a/site/includes/citations.html b/site/includes/citations.html index a6aed039..b3d207c1 100644 --- a/site/includes/citations.html +++ b/site/includes/citations.html @@ -3,7 +3,7 @@

Citations

Citations were collected from Semantic Scholar, a website which aggregates - and indexes research papers. Metadata was extracted from these papers, including extracting names of institutions automatically from PDFs, and then the addresses were geocoded. Data is not yet manually verified, and reflects anytime the paper was cited. Some papers may only mention the dataset in passing, while others use it as part of their research methodology. + and indexes research papers. The citations were geocoded using names of institutions found in the PDF front matter, or as listed on other resources. These papers have been manually verified to show that researchers downloaded and used the dataset to train and/or test machine learning algorithms.

Add button/link to download CSV diff --git a/site/includes/map.html b/site/includes/map.html index db36d4ee..14fec2f1 100644 --- a/site/includes/map.html +++ b/site/includes/map.html @@ -26,7 +26,7 @@

Academic
Industry
Government
- Data is compiled from Semantic Scholar and not yet manually verified. + Data is compiled from Semantic Scholar and has been manually verified to show usage of {{ metadata.meta.dataset.name_display }}.
diff --git a/site/public/datasets/50_people_one_question/index.html b/site/public/datasets/50_people_one_question/index.html index 73f9be97..bded7fbd 100644 --- a/site/public/datasets/50_people_one_question/index.html +++ b/site/public/datasets/50_people_one_question/index.html @@ -59,7 +59,7 @@
Academic
Industry
Government
- Data is compiled from Semantic Scholar and not yet manually verified. + Data is compiled from Semantic Scholar and has been manually verified to show usage of 50 People One Question Dataset.
@@ -80,7 +80,7 @@

Citations

Citations were collected from Semantic Scholar, a website which aggregates - and indexes research papers. Metadata was extracted from these papers, including extracting names of institutions automatically from PDFs, and then the addresses were geocoded. Data is not yet manually verified, and reflects anytime the paper was cited. Some papers may only mention the dataset in passing, while others use it as part of their research methodology. + and indexes research papers. The citations were geocoded using names of institutions found in the PDF front matter, or as listed on other resources. These papers have been manually verified to show that researchers downloaded and used the dataset to train and/or test machine learning algorithms.

Add button/link to download CSV diff --git a/site/public/datasets/brainwash/index.html b/site/public/datasets/brainwash/index.html index 64dcdda7..c0479a17 100644 --- a/site/public/datasets/brainwash/index.html +++ b/site/public/datasets/brainwash/index.html @@ -37,7 +37,7 @@

This bar chart presents a ranking of the top countries where citations originated. Mouse over individual columns - to see yearly totals. Colors are only assigned to the top 10 overall countries. + to see yearly totals. These charts show only the top 10 countries overall.

@@ -45,6 +45,15 @@
+

+ These pie charts show overall totals based on country and institution type. +

+ +
+ +
+
+

Information Supply Chain