Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [d3]

D3.js is a small, open-source JavaScript visualization library for manipulating HTML and SVG documents based on data

1
vote
1answer
32 views

Building choropleth map using D3.js? [on hold]

I want to build a Choropleth map, from a specific region (in my case Portugal) with D3.JS and while searching for tutorials and support, I have found this website. Following the procedure, I have ...
2
votes
1answer
54 views

Drawing a GeoJSON with D3js on OpenLayers 4

The goal is to interact with the DOM based on users input using JavaScript. I have now considered using D3js (v5) to draw the points. Without the base vector layers (loaded as a geojson) and ...
-1
votes
0answers
41 views

Toggling choropleths and tooltips with Leaflet.js

I've a map showcasing two choropleths, as well as three separate polygons (two of which are related thematically). My objective is to create a functioning toggling tool to 1) select one choropleth at ...
0
votes
0answers
128 views

D3.js 5 integration with OpenLayers 5: Add Vector Layer in map

I'm beginner in GIS. I am using OpenLayers 5 and D3.js 5 I was looking at this example: http://bl.ocks.org/mbertrand/5218300 But this seems to be in old version, I updated some methods to fixed ...
1
vote
0answers
226 views

Show tooltip on the D3 map

I've created a basic map using D3 with countries GeoJSON. Here is the demo. Now when the user clicks on any coordinate on the map, I am showing a weather info within a tooltip with weather icon as a ...
0
votes
1answer
237 views

Choropleth map from voronoi map from a set of coordinates (d3+leaflet)

I have a csv file with a set of coordinates with the following structure: id,name,latitude,longitude (24 values). Those 24 points represent coordinates in a city. I would like to get a voronoi map ...
0
votes
0answers
40 views

D3 Cartogram.js ZA Tutorial issue, cannot read property of undefined

I do not have a good understanding of D3, or really javascript - I am very new to all of this. I've been wokring on a project to replicate this, which I have been essentially borrowing directly from ...
1
vote
0answers
99 views

Making a choropleth in D3 by intersecting a MultiPolygon and a Point GeoJSON

I am trying to generate a choropleth map showing crimes per neighborhoods: I have a layer showing the neighborhood boundaries of the city of San Francisco, and point data showing incidences of crime ...
0
votes
1answer
118 views

Difficulty rendering a multipolygon from a GeoJSON using JQuery

I'm pulling polygon data (neighborhood boundaries in San Francisco) from an API on https://data.sfgov.org/Geographic-Locations-and-Boundaries/SF-Find-Neighborhoods/pty2-tcw4/data. While I made sure on ...
2
votes
2answers
110 views

Natural earth tiles are not detailed enough

I am new to GIS, but I have been using the following set of tiles in some of my D3 applications: .tiles.mapbox.com/v3/mapbox.natural-earth-2/ The issue with these tiles is that they are not too '...
0
votes
1answer
158 views

Project UTM Coordinates to three.js Coordinates With D3

I've been working on an application where I am building a 3d terrain, using three.js. The part I have working so far is building the 3d terrain mesh from standard 30m elevation data, and then draping ...
2
votes
1answer
259 views

D3 Map + TopoJSON (mapshaper) showing empty

Just started learn D3.js and TopoJSON. I had shapefile files and converted using mapshaper to TopoJSON, but when I tried on my local server my map showing empty page without any errors. I don't have ...
0
votes
0answers
110 views

Odd beahviour of d3.js voronoi calculation

I am trying to plot a voronoj diagram over a map (with the aid of OpenLayers) and I actually succeded in my intent. I am however experiencing an odd (at least for my little knowledge) behavior when ...
1
vote
0answers
132 views

How to make bar charts with values in a pop up windows in a web map using QGIS?

I'm an amateur of QGIS. I've set up a map with a bar chart overlay. However, there are some charts overlaying each other. So I would like to create a map which when people click / however an area on ...
1
vote
0answers
187 views

Leaflet+D3 how to show multiple layers as plane with markers on it

I'm trying to draw map which looks similar to 3 Dimensional. It has 3 layers bottom most is base layer which is OSM map layer. 2 and 3 is svg layer. as shown in below diagram, I'm able to tilt/rotate ...
2
votes
1answer
143 views

D3 Projection outputs Map wrong

I made a map with qgis. Unfortunately when I want to render the map with d3 map renderer, it shows weird structures. The map is in "1:116'622'714" scale. Could this be a problem? The website should ...
1
vote
0answers
286 views

d3.js rectangle feature plotted as arc in Mollweide projection [closed]

I am trying to plot a rectangle using d3.js under the Mollweide projection. However, when I run the following script the rectangle appears as an arc or curved rectangle. I find the bahaviour somewhat ...
1
vote
1answer
268 views

d3 map rendering sideways

I have a simple d3 map displaying data from Canada in topojson format, but the entire map is rendering sideways. I have been playing with the rotation parameters but I can't seem to get it just right....
3
votes
1answer
247 views

How to Merge polygons while zooming out using leaflet?

I have created a map using leaflet, with polygons. Each polygon has its proper color(style) based on the number of inhabitants. please see the following example: Map I want to merge polygons as I ...
2
votes
1answer
133 views

Tangram YAML, use external function?

I would like to use some functions from D3 in my Tangram scene.yaml, but I'm not finding anything about it in the documentation. I've tried referencing D3 in the YAML, like so: layers: give: ...
2
votes
0answers
148 views

Choropleth map in html

I am making a choropleth map of population estimate by counties in United States. I am almost done but the problem is a few counties have population count in seven figures and they are the ones that ...
3
votes
1answer
406 views

Esri Cedar.js (based on D3.js)

Does anyone have experience with Esri's js charting library called cedar.js? It is apparently based on D3. I may be using it for work, but wondering if there are any pitfalls I should know about vs ...
1
vote
0answers
130 views

GeoJSON or TopoJSON outline of Milky Way [closed]

I'm looking for a GeoJSON or TopoJSON file with the Milky Way outline on the Sky sphere, for an astronomical almanac web application I'm building with the D3js JavaScript library. I have searched in ...
2
votes
0answers
3k views

“Map container not found”error with dc.js charts

I am trying to show marker cluster on dc.js charts ,I have around 30,346 data in json file i an stuck with one error map container not found <script> var map = L.map( 'map', { center: [20....
3
votes
1answer
542 views

GeoJSON maps created with D3 appear flipped/inverted

I am learning how to convert ESRI shapefiles to GeoJSON and then work with it in D3. I am following Mike Bostock's tutorial on Medium (https://medium.com/@mbostock/command-line-cartography-part-1-...
1
vote
0answers
214 views

Reading topojson file in d3.js problem

The topojson file with my code shows only one propriety with one path,my topojson file looks like the sample . what I am doing wrong ? I dont know if the problem with the topojson or the code as this ...
1
vote
1answer
2k views

How to set the icon for a Leaflet marker based on a variable

I'm just beginning to learn coding in d3 and leaflet, i have some code that i'm experimenting with and facing some problems with setting the icon. I wanted to change the leaflet icon depends on the ...
3
votes
1answer
596 views

Converting EPSG to D3.js

Given an EPSG projection (say, this Alabama one: http://spatialreference.org/ref/epsg/26729/) How can you take the given WGS84 projection bounds in such a way that you can use them in a D3.js ...
6
votes
2answers
442 views

Remove outlying territories/islands from Europe map

Using a shapefile from Natural earth, I am trying create a map of Europe with d3-geo’s new command-line interface. The following: shp2json -n ne_50m_admin_0_countries/ne_50m_admin_0_countries.shp \ | ...
3
votes
1answer
391 views

Drawing GeoJson polygon in arbitrary coordinate system

I have a GeoJson polygon I am trying to draw in a 3d scene using d3 and three.js I have done this before when the polygon was represented in lat, lng coordinates, but in my case the coordinate system ...
0
votes
1answer
235 views

How to split Indian states and provinces from world states and provinces shapefile?

I am following Mike Bostock's D3 Lets make a map to create GeoJSON for states and provinces of a country. I got a shapefile for states and provinces from Natural Earth. I am trying to extract info for ...
3
votes
1answer
564 views

Which D3 microlibraries are required to load TopoJSON/GeoJSON files and translate into path definitions?

D3 v4 is modular, based on around 30 "microlibraries", intended to allow discrete functions to be broken out and used on their own. I'm trying to assemble a minimal set of D3 microlibraries to do the ...
2
votes
1answer
1k views

DC.js - barChart not filtered on click of geoChoroplethChart

I have a choropleth map of counties, and a bar chart showing population of each county on the map. When I click on the bar chart the map is filtered and redrawn to show the selected bar, but when I ...
-1
votes
1answer
2k views

TopoJSON rendering issues using D3

I have rendered the world map using world-110m topojson. I directly used the code provided by Jakob on D3 mapping tutorial - http://www.digital-geography.com/d3-js-mapping-tutorial-1-set-initial-...
0
votes
0answers
158 views

Using ordnance survey data to make a D3 map?

I would like to display a map of the UK Westminster Parliamentary Constituencies in D3 with a width of 980px. I have downloaded and extracted the ordnance survey ESRI shapefiles from here: https://...
1
vote
2answers
347 views

D3 can't render GeoJson file (Simple structure in Montreal, Canada) created in QGIS

I am attempting to render SVG and attach it to a div with id="map". I can do this successfully with GeoJson which I acquired from this tutorial: http://maptimeboston.github.io/d3-maptime/#/1 Excerpt: ...
1
vote
0answers
184 views

Can we combine SVG Overlay with MarkerCluster v3?

I have searched here and there on how to prevent the overlapping circle (svg) layer created from json file. Poor me, no luck till now. Since I doesn't know how to prevent the overlapping circle I ...
5
votes
1answer
270 views

Attempting to map GeoJson file producing issues

I've been trying to get this to work for some time now. The end goal is to produce a map I can show using d3.js, however d3 is butchering the map and producing an undesirable image. The code is as ...
6
votes
1answer
4k views

D3: center a map feature using correct latitude and longitude, without rotation?

The following is a map of Chicago which I've created in D3.js, and the JS code to render it. I had a very hard time centering Chicago within my viewfinder (the white box). After much trial and error,...
2
votes
0answers
291 views

How to remove projection in terminal from .shp file with valid .prj available

I have .prj, .shp, .sbn, .sbx, .shx, .dbf files where the content of the .prj file is the following: PROJCS["S-JTSK_Krovak_East_North",GEOGCS["GCS_S_JTSK",DATUM["D_S_JTSK",SPHEROID["Bessel_1841",...
3
votes
0answers
557 views

Draw d3 svg circles on openlayers 3 maps

I am new to openlayers and d3. I tried following example http://openlayers.org/en/master/examples/d3.html I see we need to add d3 features on a canvas and project it on an openlayers Vector layer. ...
1
vote
0answers
41 views

D3 problem on placing a circle on area

I am using d3. I normally constructed d3.svg.area().interpolate("basis") then I want to put a circle on outline of the area. But, because of interpolate("basis"). The outline is not at exact place. ...
1
vote
0answers
387 views

Plot a bubble chart in d3.js by giving an local geojson file as an input

This is the content in my geojson file { "type": "FeatureCollection", "features": [{ "type": "Feature", "properties": { "profit": 326, "npa": 174.000000 } }, { "type": ...
1
vote
1answer
2k views

D3 - Loading data from JSON doesn't work

I'm starting to learn D3 and it seems like a powerful framework. I'm trying load the data from json. I can see data but nothing happen after loading data into D3 library. There are no error messages ...
2
votes
0answers
106 views

getting started designing satellite projection raster

How do I get started designing a map with a satellite projection like this:http://bl.ocks.org/joyrexus/6619251. So far using d3 I've created a map of North Africa w/ topojson and tiles from Mapbox but ...
2
votes
1answer
660 views

d3.js Projection for Washington DC area

I'm making a small thematic map of the Washington DC area using d3.js. Everything I've tried "tilts" the square of DC. Is there a d3 projection that will put DC at the right angle? https://github....
0
votes
1answer
132 views

Finding contiguous geographical units

On a map with territorial units, I wish to be able to compare a property of one territorial unit with those surrounding it. How can I find the contiguous territorial units of a specific one ?
2
votes
1answer
189 views

Map with style (color, border) depending on property value

Using Leaflet combined with D3, I'm trying to apply a style (e.g. colorize or draw a border) to units that share a same property value. Further explanations Context: townships in France are grouped ...
1
vote
0answers
573 views

OpenLayers 2 and D3.js:Set the right size of the SVG overlay

I am following an example of D3.js used in conjunction with OpenLayers 2 to display GeoJSON on a map. http://bl.ocks.org/mbertrand/raw/5218300/quakes.html In this example, the author set the bounds ...
3
votes
1answer
963 views

D3 javascript and GeoJSON: lines in Stockholm map very strange

All the code and shapefiles that I'm using are available in this GitHub repo. I'm trying to draw a map of Stockholm with D3. The shapefile looks ok in QGIS: However, drawing the GeoJSON produces ...