-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adding new heatmap! * call it a heatmap not GL Signed-off-by: vsoch <vsoch@users.noreply.github.com> Co-authored-by: vsoch <vsoch@users.noreply.github.com>
- Loading branch information
Showing
5 changed files
with
98 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
--- | ||
layout: page | ||
title: US-RSE Heatmap | ||
subtitle: The US Research Software Engineer Association HeatMap | ||
use-site-title: true | ||
permalink: /heatmap/ | ||
--- | ||
|
||
<style> | ||
a { | ||
color: #08f; | ||
} | ||
|
||
#info { | ||
font-family: Helvetica, Arial, sans-serif; | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
margin: 12px; | ||
} | ||
|
||
#map { | ||
position: absolute; | ||
top: 20px; | ||
width: 100%; | ||
min-height:900px; | ||
bottom:0px; | ||
} | ||
body { margin: 0; padding: 0;} | ||
|
||
.container { | ||
width:100% !important; | ||
height:100% !important; | ||
bottom:0px !important; | ||
} | ||
.marker { | ||
background-color: #99266e; | ||
opacity: 0.5; | ||
background-size: cover; | ||
border-radius: 50%; | ||
cursor: pointer; | ||
} | ||
.mapboxgl-popup { | ||
max-width: 200px; | ||
} | ||
|
||
.mapboxgl-popup-content { | ||
text-align: center; | ||
font-family: 'Open Sans', sans-serif; | ||
} | ||
</style> | ||
<div id="map"></div> | ||
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.53.1/mapbox-gl.js'></script> | ||
<script src='https://unpkg.com/deck.gl@7.3.3/dist.min.js'></script> | ||
<script> | ||
const data = [{% for loc in site.data.locations %}[{{ loc.lng }}, {{ loc.lat }}, Math.sqrt({{ loc.count }})*15]{% if forloop.last %}{% else %},{% endif %}{% endfor %}] | ||
|
||
new deck.DeckGL({ | ||
container: "map", | ||
mapboxApiAccessToken: '{{ site.mapbox }}', | ||
mapStyle: 'mapbox://styles/mapbox/dark-v9', | ||
longitude: -55, | ||
latitude: 40, | ||
zoom: 2, | ||
maxZoom: 16, | ||
layers: [ | ||
new deck.HeatmapLayer({ | ||
data, | ||
id: 'heatmap', | ||
opacity: 1, | ||
pickable: true, | ||
getPosition: d => [d[0], d[1]], | ||
getWeight:d => d[2], | ||
radiusPixels:10, | ||
intensity:1, | ||
threshold:0.03 | ||
}) | ||
] | ||
}); | ||
</script> | ||
|
||
</body> | ||
</html> |