Skip to content

Instantly share code, notes, and snippets.

city potential vorhanden
Bonn 168 146
Köln 176 138
Stadt Moers 199 115
Düsseldorf 216 98
Wuppertal 271 43
Gelsenkirchen 273 41
Duisburg 278 36
Aachen 278 36
Dortmund 279 35
{"help": "https://ckan.govdata.de/api/3/action/help_show?name=package_search", "success": true, "result": {"count": 35624, "sort": "score desc, metadata_modified desc", "facets": {"res_format": {"XML": 68, "http://publications.europa.eu/resource/authority/file-type/KML": 462, "https://www.iana.org/assignments/media-types/text/xml": 1997, "https://www.iana.org/assignments/media-types/text/csv": 2047, "XPlanGML": 1328, "download": 1466, "shape": 64, "http://publications.europa.eu/resource/authority/file-type/WMS_SRVC": 72, "http://publications.europa.eu/resource/authority/file-type/KMZ": 63, "XSD": 102, "gezippte csv-dateien": 60, "http://publications.europa.eu/resource/authority/file-type/XML": 1002, "WFS": 153, "XLS": 164, "http://publications.europa.eu/resource/authority/file-type/XLSX": 2103, "https://daten.berlin.de/schema/dist-format/wfs": 404, "application/x-shapefile": 177, "http://publications.europa.eu/resource/authority/file-type/HTML": 4189, "http://publications.europa.eu/resource/authority/file-typ
d3.json('data.geojson').then(function(bb) {
let width = 200, height = 200;
let projection = d3.geoEqualEarth();
projection.fitSize([width, height], bb);
let geoGenerator = d3.geoPath()
.projection(projection);
let svg = d3.select("body").append('svg')
.style("width", width).style("height", height);
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>A simple tooltip in d3.js - https://mappingwithd3.com/resources/d3/tooltip/</title>
</head>
<body>
<script src="//d3js.org/d3.v5.min.js"></script>
<script src="index.js"></script>
<a href="https://mappingwithd3.com/resources/d3/tooltip/">A simple tooltip tutorial in d3.js</a>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@milafrerichs
milafrerichs / .block
Last active August 16, 2019 13:25
Dynamic Bar Chart
license: mit
d3.select('body').append('tooltip').attr('id', 'tooltip').attr('opacity', 0).attr('style', 'position: absolute;')
d3.select('svg')
.selectAll('circle').data(['a','b','c']).enter()
.append('circle')
.attr('r',5)
.on('mouseover', function(d) {
d3.select('#tooltip').attr('opacity', 1).text(d);
})
.on('mouseout', function() {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Community Area Name Community Area Number Sum of Units 2010 Unit per Capita
Albany Park 14 233 51542 0.004520585153855108
Ashburn 70 85 41081 0.00206908303108493
Auburn Gresham 71 406 48743 0.008329401144779763
Austin 22 30 73595 0.0004076363883415993
Austin 25 604 98514 0.00613110826887549
Avalon Park 45 102 10185 0.010014727540500737
Avondale 21 32 39262 0.000815037440782436
Belmont Cragin 19 261 78743 0.003314580343649594
Bridgeport 60 85 31977 0.002658160552897395