malteos commited on
Commit
17fd582
1 Parent(s): a37170e

responsive + full screen

Browse files
Files changed (3) hide show
  1. README.md +10 -1
  2. index.html +12 -10
  3. style.css +47 -11
README.md CHANGED
@@ -12,7 +12,16 @@ license: mit
12
 
13
  EMNLP 2022 papers on a map. Paper embeddings via [SciNCL](https://github.com/malteos/scincl). 2D reduction via [UMAP](https://github.com/lmcinnes/umap). Created by [@XYOU](https://twitter.com/xyou).
14
 
15
- See also:
 
16
  - [Neighborhood Contrastive Learning for Scientific Document Representations with Citation Embeddings (PDF on Arxiv)](http://arxiv.org/abs/2202.06671)
17
  - https://github.com/malteos/scincl
18
  - https://huggingface.co/malteos/scincl
 
 
 
 
 
 
 
 
 
12
 
13
  EMNLP 2022 papers on a map. Paper embeddings via [SciNCL](https://github.com/malteos/scincl). 2D reduction via [UMAP](https://github.com/lmcinnes/umap). Created by [@XYOU](https://twitter.com/xyou).
14
 
15
+ ## See also
16
+
17
  - [Neighborhood Contrastive Learning for Scientific Document Representations with Citation Embeddings (PDF on Arxiv)](http://arxiv.org/abs/2202.06671)
18
  - https://github.com/malteos/scincl
19
  - https://huggingface.co/malteos/scincl
20
+
21
+
22
+ ## Run locally
23
+
24
+ ```bash
25
+ # via local web server at http://localhost
26
+ python -m http.server 80
27
+ ```
index.html CHANGED
@@ -26,10 +26,13 @@ document.addEventListener('DOMContentLoaded', function() {
26
  var _data = [];
27
 
28
  var map = new L.Map('map', {
29
- zoom: 6,
30
- center: new L.latLng([5, 5]) // data[0].loc
 
31
  }); //set center from first location
32
-
 
 
33
  // map.addLayer(new L.TileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png')); //base layer
34
 
35
  var markersLayer = new L.LayerGroup(); //layer contain searched elements
@@ -38,7 +41,7 @@ document.addEventListener('DOMContentLoaded', function() {
38
 
39
  var controlSearch = new L.Control.Search({
40
  position:'topleft',
41
- collapsed: true,
42
  layer: markersLayer,
43
  initial: false,
44
  zoom: 12,
@@ -57,8 +60,6 @@ document.addEventListener('DOMContentLoaded', function() {
57
  "#c4d647", "#e0eeb8", "#11dec1", "#289812", "#566ca0", "#ffdbe1", "#2f1179",
58
  ];
59
 
60
- // 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"];
61
-
62
  var legendHtml = '<b>Legend:</b> '
63
  var moreFrom = 10;
64
 
@@ -87,7 +88,6 @@ document.addEventListener('DOMContentLoaded', function() {
87
  label = data[i].label
88
  url = 'https://2022.emnlp.org/#unavailable'
89
 
90
- // trackLabel = track.replace(' ', '-').replace(':', '')
91
 
92
  // circleMarker, Marker
93
  marker = new L.circleMarker(new L.latLng(loc), {title: title, radius: 5, className: 'label-' + label} );//se property searched
@@ -96,7 +96,6 @@ document.addEventListener('DOMContentLoaded', function() {
96
  marker.bindTooltip(title)
97
  marker.setStyle({color: colors[label]});
98
 
99
-
100
  markersLayer.addLayer(marker);
101
  }
102
 
@@ -114,14 +113,17 @@ document.addEventListener('DOMContentLoaded', function() {
114
  <h1>EMNLP 2022 Papers</h1>
115
  All EMNLP 2022 papers on a map.
116
  Embeddings are generated with <a href="https://github.com/malteos/scincl" target="_blank">SciNCL (EMNLP paper)</a> and <a href="https://github.com/lmcinnes/umap" target="_blank">UMAP</a>. Created by <a href="https://twitter.com/xyou" target="_blank">@XYOU</a>.
 
 
117
  </div>
118
 
119
  <div id="loading">
120
  <h2>Loading ...</h2>
121
  </div>
122
 
123
- <div id="legendContainer"></div>
124
- <div id="map">
 
125
  </div>
126
 
127
  <script src="./papers.js"></script>
 
26
  var _data = [];
27
 
28
  var map = new L.Map('map', {
29
+ zoom: 7,
30
+ zoomControl: false,
31
+ center: new L.latLng([4, 7]) // data[0].loc
32
  }); //set center from first location
33
+ L.control.zoom({
34
+ position: 'topright'
35
+ }).addTo(map);
36
  // map.addLayer(new L.TileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png')); //base layer
37
 
38
  var markersLayer = new L.LayerGroup(); //layer contain searched elements
 
41
 
42
  var controlSearch = new L.Control.Search({
43
  position:'topleft',
44
+ collapsed: false,
45
  layer: markersLayer,
46
  initial: false,
47
  zoom: 12,
 
60
  "#c4d647", "#e0eeb8", "#11dec1", "#289812", "#566ca0", "#ffdbe1", "#2f1179",
61
  ];
62
 
 
 
63
  var legendHtml = '<b>Legend:</b> '
64
  var moreFrom = 10;
65
 
 
88
  label = data[i].label
89
  url = 'https://2022.emnlp.org/#unavailable'
90
 
 
91
 
92
  // circleMarker, Marker
93
  marker = new L.circleMarker(new L.latLng(loc), {title: title, radius: 5, className: 'label-' + label} );//se property searched
 
96
  marker.bindTooltip(title)
97
  marker.setStyle({color: colors[label]});
98
 
 
99
  markersLayer.addLayer(marker);
100
  }
101
 
 
113
  <h1>EMNLP 2022 Papers</h1>
114
  All EMNLP 2022 papers on a map.
115
  Embeddings are generated with <a href="https://github.com/malteos/scincl" target="_blank">SciNCL (EMNLP paper)</a> and <a href="https://github.com/lmcinnes/umap" target="_blank">UMAP</a>. Created by <a href="https://twitter.com/xyou" target="_blank">@XYOU</a>.
116
+
117
+ <div id="legendContainer"></div>
118
  </div>
119
 
120
  <div id="loading">
121
  <h2>Loading ...</h2>
122
  </div>
123
 
124
+
125
+ <div id="mapContainer">
126
+ <div id="map"></div>
127
  </div>
128
 
129
  <script src="./papers.js"></script>
style.css CHANGED
@@ -1,3 +1,10 @@
 
 
 
 
 
 
 
1
  body {
2
  color:#373737;
3
  font-family:Arial;
@@ -24,19 +31,20 @@ h3 a,
24
  h3 a:hover {
25
  text-decoration:none;
26
  }
27
- #desc {
28
- /* float: left; */
29
- margin-bottom: 1em;
30
- position: relative;
31
- white-space:nowrap;
32
- font-size:1em;
33
- }
34
  #map {
35
  border-radius:.125em;
36
  border:2px solid #696969;
37
  margin: 4px auto;
38
  /* float:left; */
39
- min-height: 600px;
 
 
 
 
 
 
 
40
  }
41
  ul {
42
  font-size:.85em;
@@ -49,13 +57,15 @@ li {
49
  #header {
50
  /* width:9em; */
51
  /* height:9em; */
52
- margin: 4px;
53
  padding:1em;
54
  /* float:left; */
55
  background:#fbf5bf;
56
- border:1px solid #c6bb58;
57
- box-shadow: 2px 2px 6px #999;
58
  color:#666;
 
 
59
  }
60
  #copy {
61
  position:fixed;
@@ -117,3 +127,29 @@ li {
117
  .legend-more {
118
  display: none;
119
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html, body {
2
+ height: 100%;
3
+ margin: 0;
4
+ padding: 0;
5
+ }
6
+
7
+
8
  body {
9
  color:#373737;
10
  font-family:Arial;
 
31
  h3 a:hover {
32
  text-decoration:none;
33
  }
34
+
 
 
 
 
 
 
35
  #map {
36
  border-radius:.125em;
37
  border:2px solid #696969;
38
  margin: 4px auto;
39
  /* float:left; */
40
+ /* height: 100%; */
41
+ height: calc(100% - 250px - 10px);
42
+
43
+ position: absolute;
44
+ top: 250px;
45
+ right: 0;
46
+ bottom: 0;
47
+ left: 0;
48
  }
49
  ul {
50
  font-size:.85em;
 
57
  #header {
58
  /* width:9em; */
59
  /* height:9em; */
60
+ /* margin: 4px; */
61
  padding:1em;
62
  /* float:left; */
63
  background:#fbf5bf;
64
+ /* border:1px solid #c6bb58; */
65
+ /* box-shadow: 2px 2px 6px #999; */
66
  color:#666;
67
+ height: 250px;
68
+ overflow: auto;
69
  }
70
  #copy {
71
  position:fixed;
 
127
  .legend-more {
128
  display: none;
129
  }
130
+
131
+ .leaflet-container {
132
+ background: rgb(41, 41, 41);
133
+ outline: 0;
134
+ }
135
+
136
+
137
+ @media only screen and (min-width: 500px) {
138
+ #map {
139
+ height: calc(100% - 220px - 10px);
140
+ top: 220px;
141
+ }
142
+ #header {
143
+ height: 220px;
144
+ }
145
+ }
146
+
147
+ @media only screen and (min-width: 768px) {
148
+ #map {
149
+ height: calc(100% - 150px - 10px);
150
+ top: 150px;
151
+ }
152
+ #header {
153
+ height: 150px;
154
+ }
155
+ }