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

learn more… | top users | synonyms

1
vote
0answers
11 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
14 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
26 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
49 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 ...
1
vote
0answers
29 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 ...
1
vote
0answers
25 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? ...
0
votes
1answer
20 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
26 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 ...
0
votes
0answers
115 views

OpenLayer 2 and D3.js:Set the rigtht 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 ...
0
votes
0answers
75 views

Presenting specified country only based on latitude and longitude data passing by d3 user?

I am using d3/topojson and I'd like to color (or present) only two countries where two users are located.(The location of a user is represented by latitude and longitude.) I am modifying code from ...
3
votes
1answer
166 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 ...
5
votes
4answers
679 views

Methods to Convert .SVG File to GeoJSON

Question How do I convert an SVG file to GeoJSON format? Desired Outcome: I want to make a choropleth map using something like D3.js, or any of the other libraries out there. Challenge: I have an ...
1
vote
0answers
63 views

Matching d3.js geo projection with pyproj Proj4

I am having trouble figuring out the correct notation for Proj4 projections with pyproj. I got the following projection in d3.js and I want to match it with pyproj on my backend to send a background ...
1
vote
1answer
116 views

ogr2ogr problem mapping shapefile to geojson ETRS89 / Poland CS92

I'm trying to convert official boundaries of administrative regions of Poland from official governmental site (codgik.gov.pl). I want to use those data because they are official ones, and set contains ...
1
vote
1answer
92 views

Good projections for Middle East and North Africa in D3?

I'm a data visualizer who's mostly worked with US data, and I'm familiar with AlbersUSA project. However, I'm going to be doing a series of graphics on the Middle East. Any suggestions or interesting ...
1
vote
1answer
369 views

Multiple GeoJSON Layers

I have a leaflet map of the US and I would like to toggle between zip codes and county shapes. There seems to be no tutorials on how to achieve this in the documentation or an other forums I have ...
1
vote
0answers
89 views

Rectangular bounding box curved in D3.js

I am trying to project polygons to a map with a static background image using D3.js. The polygons looked slightly off in relation to the background so I drew the bounding box of the image, and sure ...
1
vote
1answer
419 views

GeoJson and D3.js multipolygon

I have this geometric shape file, so no map of a city. I store the two Shapefiles in a GIS database as a geometric form. Now, I want to visualize the geojson data. I created the GeoJson data ...
3
votes
0answers
235 views

Align vector and raster layers with D3

I have a geocoded raster image that I want to use as the background to a vector map with D3.js. The screenshot shows the layers in QGIS (grey is raster). Here's the markup for the map: <div ...
0
votes
0answers
60 views

CartoDB example for Airport routes?

I am a developer and I wanted to make a website where I can draw route from on Airport location to another airport location. But the route should be using D3.js or carto db. I am new in this ...
3
votes
0answers
67 views

Finding centroids for icosahedral gnomonic projection?

I've been trying to create an icosahedral gnomonic projection, like this example by Jason Davies or this one (the Fisher projection). The method that I initially used was using the centroid of each ...
0
votes
2answers
140 views

Responsive d3 choropleth showing commuter flows between counties?

I would like to create a responsive choropleth using d3. When one clicks on a county, the choropleth updates to reflect commuter flows between that county and all others. Example input data looks like ...
5
votes
0answers
195 views

Any Examples of D3.brush() used with Leaflet?

I have a leaflet map that I have placed an SVG "on top of" using the leaflet overlay pane. I want to add a D3 brush to the overlay pane that will then update a separate chart. I've looked around for ...
1
vote
0answers
84 views

JSON Layer does not show when .setview Changes

I've set a Mapbox map with a geoJSON layer overlaying it. The problem is that with the default set values, the json layer shows up just fine. However, If I change the .setView too much, the json layer ...
2
votes
1answer
227 views

How to nest GeoJSON features based on their geometry in javascript?

I have a GeoJson object with polygon features. Some of them have same geometry. They look like this: squareData = { "type": "FeatureCollection", "crs": { "type": "name", "properties": { "name": ...
0
votes
1answer
129 views

GRIB data interpolation

I've been wrangling around in GFS grid based data (GRIB - mostly 0.5 degree resolution). I'm interested in plotting these by converting to geojson with ogr2ogr (which is quite easy). However, is there ...
1
vote
1answer
140 views

Add multiple strokes to Leaflet geojson feature path

Wondering if it's possible to add multiple strokes to a polygon or line feature (the same thing could apply to multiple fills for polygons too). The leaflet documentation on the L.Path style options ...
1
vote
1answer
493 views

Firefox and D3: Zoom + Pan bug

I have a simple code here some map with zoom+pan effect. It work fine on Opera, Chrome even IE. But Firefox do not show it.- If you open "Inspector" panel, you'll see has same values (translation, ...
3
votes
0answers
29 views

Creating a distance overlay that is computed by the distance of points/lines and recalculated on zooming

I created a fictional map and visualized it with d3. Now I would like to show a scale/rule so that the user can see which distance (kilometers,meters) he is currently using. I was thinking about ...
3
votes
1answer
289 views

D3 missing zoom Choropleth + Raster

Following this example and Choropleth from Mike's site I am trying to get: image + vector + choropleth = my map As you can see I lost the zoom capability on the vector layer. I have been trying ...
2
votes
1answer
185 views

Showing link for every city at different zoom levels using Leaflet?

I have a Leaflet map that I am using to render a map of the U.S. The map will have specific zoom levels. For example, when the map first loads it will show major U.S. cities. Then if you zoom in it ...
4
votes
1answer
315 views

d3 + Leaflet apply class value from geojson data

I have a geojson file that I'l able to draw just fine with D3 + Leaflet. I'm having trouble applying a class to the svg objects with a value from the geojson file. Each feature in the geojson file has ...
0
votes
2answers
320 views

Converting area of a polygon from steradians to square kilometers using D3.js?

How can I find the area of a polygon in square km using D3.js? I'm not even really sure whether to use d3.geo.path.area or d3.geo.area. Here is my code (JSFiddle): var d = { "type":"Feature", ...
2
votes
1answer
2k views

D3.js cannot render my geoJSON file

I've been trying to draw maps using the d3.js library in a manner similar to that below. <script> //Width and height var w = 500; var h = 300; //Define path ...
1
vote
1answer
225 views

Draw line overlays and center map

(Apologies if this is a trivial question; I'm completely new to the GIS world.) I have a dataset with start and end points of lines. Columns in the table are unique_line_id, line_start_point_lat, ...
3
votes
1answer
127 views

Troubleshooting with Tiger for d3 — is this the wrong projection? Why's it look like this?

UPDATE: Solved, sort of … I downloaded the file afresh and tried feeding it through ogr2ogr and topojson again … and wouldn't you know … after a while it worked. I think I was possibly not setting an ...
8
votes
1answer
456 views

demers cartogram

How do you make a demers cartogram from a shapefile/topojson/geojson? I have tried scapetoad and indiemapper and i can not duplicate what you find on the links below. ...
0
votes
0answers
73 views

Topojson Rendering Problem

This block has a topojson file that's being rendered such that each polygon fills the world: http://bl.ocks.org/emeeks/6bc43691f631a4097d05 It includes the geojson file that it was derived from, ...
3
votes
1answer
184 views

CartoD3 chart not displaying - CartoDB

I have tornados table with columns damage,date,month . I used the following code to create a barchart . <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ...
5
votes
3answers
703 views

Adding Properties to GeoJSON File

I have a GeoJSON file of the country of Haiti with the administrative boundaries for communes (i.e. counties). Here is the file: ...
1
vote
1answer
277 views

Is there a standard projection for Sub-Saharan Africa?

With the help of d3.js, TopoJSON, and data from Glottolog I have made this map of Bantu languages that exist in Sub-Saharan Africa. I've used the standard Mercator projection so far. I know that ...
7
votes
1answer
298 views

Moving a shape around the earth while maintaining the proper projection

What is the transformation needed to be taken on every data point of a shape to rotate that shape around the globe. I'm trying to figure out the math behind this kind of transformation so I can ...
2
votes
1answer
422 views

Issue with using TopoJSON server API to return TopoJSON object with properties

I am creating a node application and using TopoJSON server API reference (see the link below) to convert a GeoJSON object to a TopoJSON object. TopoJSON server API reference I used these three lines ...
4
votes
2answers
1k views

How to load big geo-data file into web application

I am building a web app where I show details in map. I load data using geojson file (190 mb). I was looking in different possibilities to show the data, here there are: Leaflet GeoJSon: it should ...
4
votes
2answers
790 views

Populating D3 Graph with Cartodb

I have been looking at D3 and following along with their basic tutorials. In the documentation you can use json files to create graphs, however I am confused on how to make the connection from my ...
3
votes
1answer
186 views

Simplifying TopoJSON causes leak of Natural Earth in d3

I'm working with topoJSON and D3 to display Natural Earth data on a globe. Obviously, we need to simplify our geometries while still keeping borders consistent. We've created a script as based on ...
7
votes
3answers
783 views

Should I use a discrete or continuous scale for coloring a chloropleth?

I am making a choropleth for an upcoming local race using D3. There are two candidates running for an election. For any given polygon on my map, if the red candidate has more votes, the color should ...
0
votes
0answers
128 views

QGIS: Albers projection in lat lng?

I'm trying to make a map of Russia in the Albers projection. My projection string is: +proj=aea +lat_1=45 +lat_2=70 +lat_0=40 +lon_0=100 +x_0=20 +y_0=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m ...
0
votes
0answers
538 views

D3.js with dynamic geojson data

I have a $.ajax function which returns the geojson data from the asp.net mvc server method. I want to know how I could send that as a parameter to d3.json() function. Better if anyone shared code ...
1
vote
1answer
532 views

get data from WFS and present in using d3js - correct projection

I'm trying to get data for map of Poland. I found WFS service that provides GML files. It is located under: http://sdi.geoportal.gov.pl/wfs_prg/wfservice.aspx?request=getCapabilities&service=wfs ...