malteos commited on
Commit
d714cc7
1 Parent(s): c6ccf7b

Upload 2 files

Browse files
Files changed (2) hide show
  1. index.html +128 -0
  2. papers.js +0 -0
index.html ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <title>EMNLP 2022 papers on a map</title>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.0/dist/leaflet.css" />
7
+ <link rel="stylesheet" href="https://opengeo.tech/maps/leaflet-search/src/leaflet-search.css" />
8
+ <link rel="stylesheet" href="./style.css" />
9
+
10
+ <meta charset="utf-8" />
11
+ <meta name="viewport" content="width=device-width" />
12
+
13
+
14
+ <script>
15
+ function showFullLegend() {
16
+ [].forEach.call(document.querySelectorAll('.legend-more'), function (el) {
17
+ el.style.display = 'inline';
18
+ });
19
+ }
20
+
21
+ document.addEventListener('DOMContentLoaded', function() {
22
+ // your code here
23
+ document.getElementById('loading').style.display = 'none';
24
+
25
+ //sample data values for populate map
26
+ var _data = [];
27
+
28
+ var map = new L.Map('map', {zoom: 9, center: new L.latLng(data[0].loc) }); //set center from first location
29
+
30
+ // map.addLayer(new L.TileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png')); //base layer
31
+
32
+ var markersLayer = new L.LayerGroup(); //layer contain searched elements
33
+
34
+ map.addLayer(markersLayer);
35
+
36
+ var controlSearch = new L.Control.Search({
37
+ position:'topleft',
38
+ collapsed: true,
39
+ layer: markersLayer,
40
+ initial: false,
41
+ zoom: 12,
42
+ marker: false,
43
+ });
44
+
45
+ map.addControl( controlSearch );
46
+
47
+ ////////////populate map with markers from sample data
48
+ var colors = [
49
+ "#63b598", "#ce7d78", "#ea9e70", "#a48a9e", "#c6e1e8", "#648177", "#0d5ac1",
50
+ "#f205e6", "#1c0365", "#14a9ad", "#4ca2f9", "#a4e43f", "#d298e2", "#6119d0",
51
+ "#d2737d", "#c0a43c", "#f2510e", "#651be6", "#79806e", "#61da5e", "#cd2f00",
52
+ "#9348af", "#01ac53", "#c5a4fb", "#996635", "#b11573", "#4bb473", "#75d89e",
53
+ "#2f3f94", "#2f7b99", "#da967d", "#34891f", "#b0d87b", "#ca4751", "#7e50a8",
54
+ "#c4d647", "#e0eeb8", "#11dec1", "#289812", "#566ca0", "#ffdbe1", "#2f1179",
55
+ ];
56
+
57
+ // var labels = ["Commonsense Reasoning", "Computational Social Science and Cultural Analytics", "Dialogue and Interactive Systems", "Discourse and Pragmatics", "Efficient Methods for NLP", "Ethic Concerns:Computational Social Science and Cultural Analytics", "Ethic Concerns:Dialogue and Interactive Systems", "Ethic Concerns:Discourse and Pragmatics", "Ethic Concerns:Efficient Methods for NLP", "Ethic Concerns:Ethics", "Ethic Concerns:Language Modeling and Analysis of Language Models", "Ethic Concerns:Linguistic Theories, Cognitive Modeling and Psycholinguistics", "Ethic Concerns:Multilinguality", "Ethic Concerns:NLP Applications", "Ethic Concerns:Resources and Evaluation", "Ethic Concerns:Sentiment Analysis, Stylistic Analysis, and Argument Mining", "Ethic Concerns:Speech, Vision, Robotics, Multimodal Grounding", "Ethic Concerns:Summarization", "Ethic Concerns:Theme Track", "Ethic Concerns:Unsupervised and Weakly-Supervised Methods in NLP", "Ethics", "Information Extraction", "Information Retrieval and Text Mining", "Interpretability, Interactivity and Analysis of Models for NLP", "Language Modeling and Analysis of Language Models", "Linguistic Theories, Cognitive Modeling and Psycholinguistics", "Machine Learning for NLP", "Machine Translation", "Multilinguality", "NLP Applications", "Natural Language Generation", "Phonology, Morphology and Word Segmentation", "Question Answering", "Resources and Evaluation", "Semantics: Lexical, Sentence level, Textual Inference and Other areas", "Sentiment Analysis, Stylistic Analysis, and Argument Mining", "Speech, Vision, Robotics, Multimodal Grounding", "Summarization", "Syntax, Parsing and their Applications", "Theme Track", "Unsupervised and Weakly-Supervised Methods in NLP"];
58
+
59
+ var legendHtml = '<b>Legend:</b> '
60
+ var moreFrom = 10;
61
+
62
+ for (let i = 0; i < labels.length; i++) {
63
+ if (i >= moreFrom) {
64
+ cls = 'legend-more';
65
+ } else {
66
+ cls = '';
67
+ }
68
+
69
+ legendHtml += '<span class="legend-item ' + cls +'"><span class="legend-icon" style="background: ' + colors[i]+ '"></span>' + labels[i] + '</span> ';
70
+
71
+ if (i == moreFrom) {
72
+ legendHtml += '<a href="javascript:showFullLegend();">...</a>';
73
+ }
74
+ }
75
+ document.getElementById('legendContainer').innerHTML = legendHtml;
76
+
77
+
78
+ for(i in data) {
79
+ var title = data[i].title, //value searched
80
+ loc = data[i].loc, //position found
81
+ abstract = data[i].abstract,
82
+ track = data[i].track,
83
+ authors = data[i].authors,
84
+ label = data[i].label
85
+ url = 'https://2022.emnlp.org/#unavailable'
86
+
87
+ // trackLabel = track.replace(' ', '-').replace(':', '')
88
+
89
+ // circleMarker, Marker
90
+ marker = new L.circleMarker(new L.latLng(loc), {title: title, radius: 5, className: 'label-' + label} );//se property searched
91
+ marker.bindPopup('<b><a href="'+ url + '">' + title + '</a></b> [' + track + '] <i>' + authors + ':<br />' + abstract );
92
+ //marker.setStyle({fillColor: colors[label]});
93
+ marker.bindTooltip(title)
94
+ marker.setStyle({color: colors[label]});
95
+
96
+
97
+ markersLayer.addLayer(marker);
98
+ }
99
+
100
+ }, false);
101
+
102
+
103
+ </script>
104
+
105
+ </head>
106
+ <body>
107
+
108
+
109
+
110
+ <div id="header">
111
+ <h1>EMNLP 2022 Papers</h1>
112
+ All EMNLP 2022 papers on a map.
113
+ Embeddings are generated with <a href="https://github.com/malteos/scincl">SciNCL (EMNLP paper)</a> and <a href="https://github.com/lmcinnes/umap">UMAP</a>. Created by <a href="https://twitter.com/xyou">@XYOU</a>.
114
+ </div>
115
+
116
+ <div id="loading">
117
+ <h2>Loading ...</h2>
118
+ </div>
119
+
120
+ <div id="legendContainer"></div>
121
+ <div id="map"></div>
122
+
123
+ <script src="./papers.js"></script>
124
+ <script src="https://unpkg.com/leaflet@1.3.0/dist/leaflet.js"></script>
125
+ <script src="https://opengeo.tech/maps/leaflet-search/src/leaflet-search.js"></script>
126
+
127
+ </body>
128
+ </html>
papers.js ADDED
The diff for this file is too large to render. See raw diff