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

learn more… | top users | synonyms

0
votes
0answers
19 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
15 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 ...
1
vote
1answer
47 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
0answers
32 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
44 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
107 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, ...
2
votes
0answers
20 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 ...
2
votes
1answer
99 views

D3 missing zoom Choropleth + Raster

following this example and Choropleth from Mike's site trying to get: image + vector + choropleth = my map As you can see I'd lost zoom capability on vector layer. I'd been trying differents things, ...
1
vote
1answer
69 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 ...
3
votes
1answer
164 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
1answer
116 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", ...
0
votes
1answer
713 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
127 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
74 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 ...
5
votes
1answer
229 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
57 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, ...
2
votes
1answer
119 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" ...
4
votes
3answers
241 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: ...
0
votes
0answers
95 views

Placing Pins and following transformation on zoom map d3

So I am using this http:// bl.ocks. org/mbostock/4699541 framework on D3.js and I just figured out how to append circles to the map. However when you click on a state the circle moves out of place ...
1
vote
1answer
249 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 ...
6
votes
1answer
196 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 ...
0
votes
1answer
203 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 ...
2
votes
2answers
550 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 ...
3
votes
2answers
576 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 ...
1
vote
0answers
129 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 ...
6
votes
3answers
508 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
87 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
363 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
363 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 ...
2
votes
1answer
396 views

SVG control not visible on top of Leaflet.js

I'm using Leaflet 0.7.1 and want to draw a radial menu (like openstreetmap's iD editor) on top using d3. Some examples I found use Leaflet's overlayPane to append the svg element to: var ...
0
votes
1answer
248 views

How to convert cartesian to lat-lon with Topojson?

I've been following the "Let's Make a Map" tutorial by mbostock about converting files for use for d3.js. I have been able to get things working with files from Natural Earth, but when trying to ...
1
vote
0answers
131 views

Filtering a Topojson on server-side. Which part of topology I need?

I have a big Topojson which I want to avoid loading it at page load. Instead I would like to parse on server-side at user request, sending back chunks of this original Topojson to be ploted. So I ...
1
vote
0answers
1k views

D3 adding topojson - no data visible

Yesterday I asked what would be the best method of creating an overlay in a web map that would allow for some interactivity. Create interactive map with no server Thanks to a variety of people who ...
0
votes
0answers
158 views

How do I completely fill polygons with text labels on a per-feature basis?

I would like to create a map of regions, where each region is completely filled with its specific chunks of text. Think a map of Wordles in the shape of regions that are assembled together into a map. ...
0
votes
1answer
265 views

Leaflet: Centering map when zoom in

For a project I have to use four sets of JSON datas (and one of the files is bigger than 10M). I am loading these files asynchronously using queue.js. Once it's fully loaded and displayed I am ...
3
votes
1answer
322 views

D3 to match this QGIS projection?

I have a map of Finland in QGIS, which says CRS = ETRS89 / ETRS-TM35 (Authority ID = EPSG:3047). I'm trying to show the map with D3, and can't quite match the borders/projection. The black one is ...
11
votes
3answers
4k views

D3 for maps---at what stage to bring in data to the geo?

I'd like to map a world choropleth for display with D3, a la: http://bl.ocks.org/mbostock/4206573 http://bl.ocks.org/jasondavies/4188334 I have a dataset I'd like to display that's keyed to ...
1
vote
0answers
506 views

Topography: How to convert raster into vector layers?

(nb:This project is part of the #Wikipedia #wikimaps project) 1. Question: How to create vector topographic maps from raster image ? How to convert raster topographic image into closed vector ...
1
vote
1answer
1k views

Texture overlay in d3 map

D3 map can be drawn and colored as shown in this example : http://techslides.com/demos/d3/d3-world-map-zoom-points.html. I need to overlay a texture or image within the boundary of a given country. Is ...
3
votes
1answer
1k views

display a choropleth map using D3 and Leaftlet

I am trying to get a leaflet map to display a choropleth map using d3. I have written this code using samples I have found however the map just displays as the black fill, not the color classes I ...
2
votes
2answers
1k views

How to determine intersection between geojson feature and given coordinates?

I'm overlaying a leaflet map with features of geojson, fetched with d3 and added as SVG elements to the DOM. My geojson contains too many features to render at once, so my goal is to add to the map ...
2
votes
1answer
124 views

How to render iD editor-style streetmaps?

Is there a simple way to render OSM data (let's start with just streets and names for a single metro area) client side as nodes and edges like the new iD editor? I'm comfortable with d3 but am ...
2
votes
1answer
2k views

Conversion from Shapefile to TopoJSON format results in incorrect map when rendered using d3js

I am trying to build a map of Canada showing FSA boundaries using d3js. I got shape data from Statistics Canada ...
1
vote
3answers
2k views

How to move and open shapefiles with ogr2ogr?

I'm a total newb following along the d3 map tutorial. at this line: ogr2ogr \ -f GeoJSON \ -where "adm0_a3 IN ('GBR', 'IRL')" \ subunits.json \ ne_10m_admin_0_map_subunits.shp I get ...
1
vote
0answers
197 views

D3, Polymaps and Lines

I'm quite new to d3 and Polymaps and I have a question to ask.. I am trying to connect two points using a line, using Polymaps and d3, my starting point is from this code that Mike provided ...
2
votes
1answer
2k views

Either GeoJson to TopoJson conversion problem, or projection-issue with D3.js

My 'handcrafted' cartogram (How to create contiguous area cartograms in QGIS or R?) is ready to embed in code - I want to present it online with D3.js. Therefore I produced a topoJSON file of it - ...
2
votes
1answer
339 views

Converting from shp to geojson fails

I'm following Mike Bostock's tutorial, let's make a map, but for a map of Mexico. I want to display state boundaries. I was able to get the map of Mexico from Natural Earth Data's world maps. My ...
3
votes
3answers
801 views

How to properly convert landmass NaturalEarth data into GeoJSON?

100% Newbie. I've been following Mike's d3 Map Tutorial and I've come up against a challenge. I guess my question essentially boils down to: how does one generate the proper GeoJSON/TopoJSON files ...
4
votes
2answers
3k views

d3.geo.path() to draw a path from GIS coordinates

Trying to take GIS data of the zip codes of the Bronx and turn it into a map using d3.js. But I am having trouble rendering. Could you show me proper use of d3.geo.path() ? [ [ -73.84463693999993, ...
3
votes
2answers
268 views

“Hello World” introduction for ubuntuGIS?

Is the GIS equivalent of "Hello world!" = "You are here?" I installed ubuntuGIS recently, but I'm a little overwhelmed navigating the network of many packages to begin accomplishing simple things. ...