SlideShare a Scribd company logo
1 of 35
Download to read offline
Mapping	
  with	
  D3	
  
Sudhir	
  Chowbina	
  
@genomegeek	
  
Follow	
  along	
  code	
  !	
  
h9p://bit.ly/1IPr6hj	
  
	
  
Books	
  and	
  Blogs	
  
q  Let’s Make a Map – Mike Bostock
(http://bost.ocks.org/mike/map/)
q  Mapping with D3, A friendly introduction by Andy Woodruff
(http://maptimeboston.github.io/d3-maptime/)
q  Learning D3.js Mapping by Thomas Newton and Oscar Villarreal
q  D3.js in Action by Elijah Meeks
What	
  is	
  D3	
  (Data-­‐Driven	
  Documents)?	
  
•  D3.js	
  is	
  a	
  JavaScript	
  library	
  for	
  manipulaOng	
  documents	
  
based	
  on	
  data.	
  	
  
•  D3	
  helps	
  you	
  bring	
  data	
  to	
  life	
  using	
  HTML,	
  SVG,	
  and	
  CSS.	
  	
  
•  D3	
  combines	
  powerful	
  visualizaOon	
  components	
  and	
  a	
  data-­‐
driven	
  approach	
  to	
  DOM	
  manipulaOon.	
  
•  Developed	
  by	
  Mike	
  Bostock	
  with	
  the	
  idea	
  of	
  bridging	
  the	
  
gap	
  between	
  staOc	
  display	
  of	
  data,	
  and	
  interacOve	
  and	
  
animated	
  data	
  visualizaOons.	
  
WHAT	
  DOES	
  THAT	
  
MEAN?	
  
IT	
  MEANS	
  TAKING	
  DATA	
  …	
  
City	
   #	
  of	
  rats	
  
Cambridge	
   400	
  
Boston	
   900	
  
Somerville	
   300	
  
Brookline	
   600	
  
VersaOle	
  way	
  of	
  loading	
  data	
  (asynchronously)	
  into	
  the	
  browser	
  is	
  using	
  an	
  XMLH9pRequest,	
  or	
  XHR	
  
d3.text,	
  d3.csv,	
  d3.html,	
  d3.xml,	
  d3.tsv,	
  d3.json	
  	
  
…	
  BINDING	
  TO	
  HTML	
  OR	
  SVG	
  ELEMENTS	
  …	
  
<rect	
  x="0"	
  width="15"	
  fill="#d1c9b8"></rect>	
  	
  
<rect	
  x="25"	
  width="15“	
  fill="#d1c9b8"></rect>	
  
<rect	
  x="50"	
  width="15"	
  fill="#d1c9b8"></rect>	
  
<rect	
  x="75"	
  width="15"	
  fill="#d1c9b8"></rect>	
  
	
  
…	
  AND	
  MANIPULATING	
  THESE	
  
ELEMENTS	
  BASED	
  ON	
  THE	
  DATA	
  …	
  
Simple.	
  Right?	
  
D3	
  is	
  Not	
  a	
  Graphical	
  RepresentaOon	
  
D3	
  is	
  not	
  a	
  magic	
  tool	
  that	
  draws	
  and	
  styles	
  charts,	
  maps,	
  etc.	
  
Rather,	
  it	
  provides	
  a	
  means	
  for	
  YOU	
  to	
  create	
  and	
  style	
  web-­‐
standard	
  documents	
  based	
  on	
  your	
  data.	
  
	
  
It's	
  not	
  about	
  charts,	
  nor	
  maps,	
  nor	
  any	
  parOcular	
  kind	
  of	
  
graphic.	
  It	
  is	
  fundamentally	
  about	
  data	
  and	
  web	
  documents.	
  
(But	
  let's	
  sOck	
  to	
  maps	
  for	
  now.)	
  
Map	
  File	
  Storage	
  Formats	
  
	
  
The	
  Shapefile	
  format	
  is	
  a	
  popular	
  geospaOal	
  vector	
  data	
  format	
  for	
  geographic	
  informaOon	
  
system	
  (GIS)	
  sofware.	
  
	
  
	
  
GeoJSON	
  is	
  a	
  format	
  for	
  encoding	
  a	
  variety	
  of	
  geographic	
  data	
  structures.	
  
	
  
GeometryCollec<on,	
  FeatureCollec<on.	
  
	
  
	
  
TopoJSON	
  is	
  an	
  extension	
  of	
  GeoJSON	
  that	
  encodes	
  topology.	
  	
  
	
  
Convert	
  Shapefiles	
  and	
  GeoJSON	
  
	
  
brew	
  install	
  gdal	
  
	
  
ogr2ogr	
  -­‐f	
  GeoJSON	
  nc_charloDe_zipcodes.json	
  meclenburg.shp	
  -­‐t_srs	
  EPSG:4326	
  
	
  
	
  
t_srs	
  -­‐	
  Reproject/transform	
  to	
  this	
  SRS	
  (SpaOal	
  Reference	
  System)	
  on	
  output	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
EPSG	
  4326	
  defines	
  a	
  full	
  coordinate	
  reference	
  system,	
  providing	
  spaOal	
  meaning	
  to	
  otherwise	
  meaningless	
  pairs	
  of	
  numbers.	
  It	
  means	
  
"laOtude	
  and	
  longitude	
  coordinates	
  on	
  the	
  WGS84	
  reference	
  ellipsoid.”	
  WGS84	
  comprises	
  a	
  standard	
  coordinate	
  frame	
  for	
  the	
  Earth,	
  a	
  
datum/reference	
  ellipsoid	
  for	
  raw	
  alOtude	
  data,	
  and	
  a	
  gravitaOonal	
  equipotenOal	
  surface	
  (the	
  geoid)	
  that	
  defines	
  the	
  nominal	
  sea	
  level.	
  
TopoJSON	
  
brew	
  install	
  node	
  
npm	
  install	
  -­‐g	
  topojson	
  
	
  
topojson	
  	
  
-­‐o	
  topo_nc_zipcode.json	
  	
  
-­‐-­‐id-­‐property	
  zipcode	
  	
  
-­‐-­‐properLes	
  name=zipcode	
  	
  
nc_charloDe_zipcodes.json	
  
	
  
•  Rather	
  than	
  represenOng	
  geometries	
  discretely,	
  geometries	
  in	
  TopoJSON	
  files	
  are	
  sOtched	
  
together	
  from	
  shared	
  line	
  segments	
  called	
  arcs.	
  	
  
•  Eliminates	
  redundancy,	
  offering	
  more	
  compact	
  representaOons	
  of	
  geometry	
  than	
  GeoJSON	
  
•  80%	
  smaller	
  than	
  their	
  GeoJSON	
  equivalents.	
  
Sample	
  File	
  
-­‐-­‐properLes	
  name=zipcode	
  
-­‐-­‐id-­‐property	
  zipcode	
  
Map	
  ProjecOons	
  in	
  D3	
  
ENOUGH	
  INTRODUCTION.	
  
LET’S	
  MAKE	
  SOMETHING!	
  
Code	
  at:	
  h9p://bit.ly/1IPr6hj	
  
Lay	
  down	
  some	
  boilerplate	
  HTML	
  &	
  	
  
Load	
  the	
  d3	
  and	
  topojson	
  library	
  
<html>
<head>
<title>Meclenburg Per Capita Income and Number of Starbucks</title>
<script type=“text/javascript” src=“lib/d3.js”></script>
<script type=“text/javascript” src=“lib/topojson.js”></script>
</head>
<body>
<script>
// our code will go here
</script>
</body>
</html>
var	
  svg	
  =	
  d3.select(“body”)	
  	
  //	
  returns	
  body	
  selecOon	
  
	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .append(“svg”)	
  //	
  returns	
  svg	
  selecOon	
  
	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .aDr(“width”,	
  width)	
  //	
  returns	
  svg	
  selecOon	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
   	
  .aDr(“height”,	
  height);	
  //	
  returns	
  svg	
  selecOon	
  
	
  
	
  
•  Select	
  the	
  body	
  and	
  append	
  an	
  svg	
  to	
  it.	
  
•  D3's	
  append()	
  	
  
•  takes	
  only	
  the	
  name	
  of	
  the	
  element	
  and	
  	
  
•  returns	
  the	
  appended	
  element,	
  not	
  the	
  parent	
  
•  D3	
  has	
  select()	
  and	
  selectAll()	
  methods	
  to	
  find	
  single	
  or	
  
mulOple	
  DOM	
  elements,	
  respecOvely.	
  	
  
svg.append(“g”)	
  
	
  .selectAll(“path”)	
  
	
  	
  	
  	
  	
  	
  	
  .data(	
  topojson.feature(us,	
  us.objects.counLes).features	
  )	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
Now,	
  we're	
  selecOng	
  all	
  the	
  <path>	
  elements	
  in	
  the	
  
SVG	
  and	
  binding	
  data	
  to	
  them...	
  
WAIT	
  !!	
  PATH	
  DOES	
  
NOT	
  EXISTS	
  !	
  
This	
  part	
  is	
  hard	
  to	
  grasp	
  at	
  first,	
  but	
  don't	
  worry.	
  
For	
  now,	
  just	
  know	
  that	
  this	
  is	
  how	
  you	
  write	
  the	
  
code.	
  
	
  
If	
  there	
  are	
  no	
  <path>	
  elements,	
  we	
  get	
  an	
  empty	
  
selecOon,	
  kind	
  of	
  a	
  placeholder	
  for	
  what's	
  to	
  come.	
  
Once	
  we	
  bind	
  data	
  to	
  this	
  selecOon	
  and	
  append	
  
some	
  elements,	
  the	
  selecOon	
  will	
  contain	
  those	
  
elements.	
  
svg.append(“g”)	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .selectAll(“path”)	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .data(	
  topojson.feature(us,	
  us.objects.counLes).features	
  )	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .enter()	
  
	
   	
  	
  	
  	
  	
  .append(“path”)	
  
This	
  is	
  the	
  basic	
  syntax	
  for	
  creaOng	
  new	
  elements	
  to	
  
match	
  a	
  data	
  array.	
  
enter()	
  refers	
  to	
  new	
  incoming	
  data	
  for	
  which	
  there	
  is	
  
not	
  yet	
  an	
  exisOng	
  <path>.	
  For	
  each	
  incoming	
  data	
  
value,	
  we're	
  appending	
  a	
  <path>	
  element.	
  
SVG	
  path	
  element	
  is	
  the	
  generic	
  element	
  to	
  define	
  a	
  shape.	
  All	
  basic	
  shapes	
  can	
  be	
  created	
  with	
  a	
  path	
  element	
  
CSV	
  with	
  Income	
  and	
  #Starbucks	
  per	
  Zipcode	
  
Loop	
  over	
  two	
  data	
  files	
  
d3.json("data/topo_nc_zipcode.json",	
  funcLon	
  (error,	
  us)	
  {	
  
	
  
	
  //	
  Create	
  a	
  Path	
  Generator	
  FuncLon	
  
	
  //	
  Collect	
  the	
  outer	
  bound	
  projecLon	
  parameters	
  and	
  zoom	
  to	
  the	
  county	
  
	
  
	
  	
  	
  	
  	
  	
  	
  	
  d3.csv('data/nc_city_zip_rand.csv',	
  funcLon(zips)	
  {	
  
	
  	
  
	
   	
  //	
  For	
  each	
  zip-­‐code	
  collect	
  the	
  income	
  
	
   	
  //	
  Create	
  a	
  ‘path’	
  for	
  each	
  Zip	
  
	
   	
  //	
  Color	
  the	
  zip	
  code	
  by	
  income	
  value	
  
	
  
	
  	
  });	
  
});	
  
Path	
  Generators	
  
	
  var	
  projecLon	
  =	
  d3.geo.mercator();	
  
	
  var	
  geoPath	
  =	
  d3.geo.path().projecLon(projecLon);	
  
We	
  are	
  creaOng	
  a	
  funcOon	
  here.	
  A	
  path	
  is	
  a	
  funcOon	
  that	
  
takes	
  a	
  TopoJSON	
  feature	
  and	
  returns	
  SVG	
  path	
  data,	
  based	
  
on	
  the	
  specified	
  projecOon.	
  	
  
svg.append(“g”)	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .selectAll(“path”)	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .data(	
  topojson.feature(us,	
  us.objects.counLes).features	
  )	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .enter()	
  
	
   	
  	
  	
  	
  	
  .append(“path”)	
  
	
   	
  	
  	
  	
  	
  .aDr("d",	
  geoPath)	
  
Specify	
  where	
  to	
  project	
  the	
  path	
  
In	
  SVG	
  Land	
  d	
  is	
  an	
  a9ribute	
  that	
  defines	
  the	
  
coordinates	
  of	
  a	
  path.	
  
Color	
  Zipcodes	
  by	
  Per-­‐Capita	
  Income	
  
var	
  threshold	
  =	
  d3.scale.threshold()	
  
	
  .domain([20000,	
  40000,	
  60000,	
  80000])	
  
	
  .range(["#6e7c5a",	
  "#a0b28f",	
  "#d8b8b3",	
  "#b45554",	
  "#760000"]);	
  
var	
  rateById	
  =	
  {};	
  
zips.forEach(funcLon	
  (d)	
  {	
  
	
  rateById[d.id]	
  =	
  +d.rate;	
  
});	
  
.style("fill",	
  	
  funcLon	
  (pt)	
  {	
  
	
  return	
  threshold(rateById[pt.id]);	
  
});	
  
Apply	
  data	
  from	
  CSV	
  
var	
  zipPoints	
  =	
  svg.selectAll('circle').data(zips);	
  
	
  
zipPoints	
  
	
   	
  	
  	
  	
  	
  	
  	
  .enter()	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .append('circle')	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .aDr('cx',	
  funcLon(d)	
  {return	
  projecLon([d.lon,	
  d.lat])[0]})	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .aDr('cy',	
  funcLon(d)	
  {return	
  projecLon([d.lon,	
  d.lat])[1]})	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .aDr('r',	
  funcLon(d)	
  {return	
  radius(d.star);	
  })	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .style("stroke",	
  "white")	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .aDr('fill',	
  'lightblue');	
  
Show	
  circle	
  on	
  each	
  zip-­‐code	
  with	
  a	
  radius	
  that	
  corresponds	
  
to	
  the	
  number	
  of	
  Starbucks	
  
Extras	
  
API	
  Reference	
  for	
  topojson.feature	
  funcOon	
  
topojson.feature(topology,	
  object)	
  
	
  
Returns	
  the	
  GeoJSON	
  Feature	
  or	
  FeatureCollecOon	
  for	
  the	
  specified	
  object	
  in	
  the	
  given	
  
topology.	
  If	
  the	
  specified	
  object	
  is	
  a	
  GeometryCollecOon,	
  a	
  FeatureCollecOon	
  is	
  returned,	
  and	
  
each	
  geometry	
  in	
  the	
  collecOon	
  is	
  mapped	
  to	
  a	
  Feature.	
  Otherwise,	
  a	
  Feature	
  is	
  returned.	
  
	
  
Some	
  examples:	
  
•  A	
  point	
  is	
  mapped	
  to	
  a	
  feature	
  with	
  a	
  geometry	
  object	
  of	
  type	
  “Point”.	
  
•  Likewise	
  for	
  line	
  strings,	
  polygons,	
  and	
  other	
  simple	
  geometries.	
  
•  A	
  null	
  geometry	
  object	
  (of	
  type	
  null	
  in	
  TopoJSON)	
  is	
  mapped	
  to	
  a	
  feature	
  with	
  a	
  null	
  
geometry	
  object.	
  
•  A	
  geometry	
  collecOon	
  of	
  points	
  is	
  mapped	
  to	
  a	
  feature	
  collecOon	
  of	
  features,	
  each	
  with	
  a	
  
point	
  geometry.	
  
•  A	
  geometry	
  collecOon	
  of	
  geometry	
  collecOons	
  is	
  mapped	
  to	
  a	
  feature	
  collecOon	
  of	
  
features,	
  each	
  with	
  a	
  geometry	
  collecOon.	
  
	
  
SVG	
  path	
  element	
  
h9ps://developer.mozilla.org/en-­‐US/docs/Web/SVG/Element/path	
  
D3	
  ProjecOon	
  Methods	
  
h9ps://github.com/mbostock/d3/wiki/Geo-­‐ProjecOons	
  
#	
  projecOon.center([locaLon])	
  
If	
  locaLon	
  is	
  specified,	
  sets	
  the	
  projecOon’s	
  center	
  to	
  the	
  specified	
  locaLon,	
  a	
  two-­‐
element	
  array	
  of	
  longitude	
  and	
  laOtude	
  in	
  degrees	
  and	
  returns	
  the	
  projecOon.	
  If	
  center	
  
is	
  not	
  specified,	
  returns	
  the	
  current	
  center	
  which	
  defaults	
  to	
  ⟨0°,0°⟩.	
  
	
  
#	
  projecOon.translate([point])	
  
If	
  point	
  is	
  specified,	
  sets	
  the	
  projecOon’s	
  translaOon	
  offset	
  to	
  the	
  specified	
  two-­‐
element	
  array	
  [x,	
  y]	
  and	
  returns	
  the	
  projecOon.	
  If	
  point	
  is	
  not	
  specified,	
  returns	
  the	
  
current	
  translaOon	
  offset	
  which	
  defaults	
  to	
  [480,	
  250].	
  The	
  translaOon	
  offset	
  
determines	
  the	
  pixel	
  coordinates	
  of	
  the	
  projecOon’s	
  center.	
  The	
  default	
  translaOon	
  
offset	
  places	
  ⟨0°,0°⟩	
  at	
  the	
  center	
  of	
  a	
  960×500	
  area.	
  
	
  
#	
  projecOon.scale([scale])	
  
If	
  scale	
  is	
  specified,	
  sets	
  the	
  projecOon’s	
  scale	
  factor	
  to	
  the	
  specified	
  value	
  and	
  returns	
  
the	
  projecOon.	
  If	
  scale	
  is	
  not	
  specified,	
  returns	
  the	
  current	
  scale	
  factor	
  which	
  defaults	
  
to	
  150.	
  The	
  scale	
  factor	
  corresponds	
  linearly	
  to	
  the	
  distance	
  between	
  projected	
  
points.	
  However,	
  scale	
  factors	
  are	
  not	
  consistent	
  across	
  projecOons.	
  
	
  
ProjecOon	
  Scale	
  and	
  Translate	
  
	
  var	
  states	
  =	
  topojson.feature(us,	
  us.objects.counLes);	
  
	
  
	
  	
  var	
  b,	
  s,	
  t;	
  
	
  	
  projecLon.scale(1).translate([0,	
  0]);	
  
	
  	
  var	
  b	
  =	
  geoPath.bounds(states);	
  //	
  zoom	
  to	
  the	
  county	
  
	
  	
  var	
  s	
  =	
  .9	
  /	
  Math.max((b[1][0]	
  -­‐	
  b[0][0])	
  /	
  width,	
  (b[1][1]	
  -­‐	
  b[0][1])	
  /	
  height);	
  
	
  	
  var	
  t	
  =	
  [(width	
  -­‐	
  s	
  *	
  (b[1][0]	
  +	
  b[0][0]))	
  /	
  2,	
  (height	
  -­‐	
  s	
  *	
  (b[1][1]	
  +	
  b[0][1]))	
  /	
  2];	
  
	
  	
  projecLon.scale(s).translate(t);	
  

More Related Content

What's hot

Js info vis_toolkit
Js info vis_toolkitJs info vis_toolkit
Js info vis_toolkitnikhilyagnic
 
Save Java memory
Save Java memorySave Java memory
Save Java memoryJavaDayUA
 
Scalding - Hadoop Word Count in LESS than 70 lines of code
Scalding - Hadoop Word Count in LESS than 70 lines of codeScalding - Hadoop Word Count in LESS than 70 lines of code
Scalding - Hadoop Word Count in LESS than 70 lines of codeKonrad Malawski
 
Should I Use Scalding or Scoobi or Scrunch?
Should I Use Scalding or Scoobi or Scrunch? Should I Use Scalding or Scoobi or Scrunch?
Should I Use Scalding or Scoobi or Scrunch? DataWorks Summit
 
Transforming public data into thematic maps (TDC2019 presentation)
Transforming public data into thematic maps (TDC2019 presentation)Transforming public data into thematic maps (TDC2019 presentation)
Transforming public data into thematic maps (TDC2019 presentation)Helder da Rocha
 
Benefits of Using MongoDB Over RDBMS (At An Evening with MongoDB Minneapolis ...
Benefits of Using MongoDB Over RDBMS (At An Evening with MongoDB Minneapolis ...Benefits of Using MongoDB Over RDBMS (At An Evening with MongoDB Minneapolis ...
Benefits of Using MongoDB Over RDBMS (At An Evening with MongoDB Minneapolis ...MongoDB
 
Getting Started with Geospatial Data in MongoDB
Getting Started with Geospatial Data in MongoDBGetting Started with Geospatial Data in MongoDB
Getting Started with Geospatial Data in MongoDBMongoDB
 
Mapreduce Algorithms
Mapreduce AlgorithmsMapreduce Algorithms
Mapreduce AlgorithmsAmund Tveit
 
The Aggregation Framework
The Aggregation FrameworkThe Aggregation Framework
The Aggregation FrameworkMongoDB
 
Scalding: Reaching Efficient MapReduce
Scalding: Reaching Efficient MapReduceScalding: Reaching Efficient MapReduce
Scalding: Reaching Efficient MapReduceLivePerson
 
GeoScript - Spatial Capabilities for Scripting Languages
GeoScript - Spatial Capabilities for Scripting LanguagesGeoScript - Spatial Capabilities for Scripting Languages
GeoScript - Spatial Capabilities for Scripting LanguagesJustin Deoliveira
 
OrientDB the graph database
OrientDB the graph databaseOrientDB the graph database
OrientDB the graph databaseArtem Orobets
 
Precog & MongoDB User Group: Skyrocket Your Analytics
Precog & MongoDB User Group: Skyrocket Your Analytics Precog & MongoDB User Group: Skyrocket Your Analytics
Precog & MongoDB User Group: Skyrocket Your Analytics MongoDB
 
Stratosphere System Overview Big Data Beers Berlin. 20.11.2013
Stratosphere System Overview Big Data Beers Berlin. 20.11.2013Stratosphere System Overview Big Data Beers Berlin. 20.11.2013
Stratosphere System Overview Big Data Beers Berlin. 20.11.2013Robert Metzger
 
Stratosphere Intro (Java and Scala Interface)
Stratosphere Intro (Java and Scala Interface)Stratosphere Intro (Java and Scala Interface)
Stratosphere Intro (Java and Scala Interface)Robert Metzger
 
Hadoop - MongoDB Webinar June 2014
Hadoop - MongoDB Webinar June 2014Hadoop - MongoDB Webinar June 2014
Hadoop - MongoDB Webinar June 2014MongoDB
 
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...Altinity Ltd
 
NLP on a Billion Documents: Scalable Machine Learning with Apache Spark
NLP on a Billion Documents: Scalable Machine Learning with Apache SparkNLP on a Billion Documents: Scalable Machine Learning with Apache Spark
NLP on a Billion Documents: Scalable Machine Learning with Apache SparkMartin Goodson
 

What's hot (20)

Js info vis_toolkit
Js info vis_toolkitJs info vis_toolkit
Js info vis_toolkit
 
Save Java memory
Save Java memorySave Java memory
Save Java memory
 
Scalding - Hadoop Word Count in LESS than 70 lines of code
Scalding - Hadoop Word Count in LESS than 70 lines of codeScalding - Hadoop Word Count in LESS than 70 lines of code
Scalding - Hadoop Word Count in LESS than 70 lines of code
 
Should I Use Scalding or Scoobi or Scrunch?
Should I Use Scalding or Scoobi or Scrunch? Should I Use Scalding or Scoobi or Scrunch?
Should I Use Scalding or Scoobi or Scrunch?
 
Transforming public data into thematic maps (TDC2019 presentation)
Transforming public data into thematic maps (TDC2019 presentation)Transforming public data into thematic maps (TDC2019 presentation)
Transforming public data into thematic maps (TDC2019 presentation)
 
Benefits of Using MongoDB Over RDBMS (At An Evening with MongoDB Minneapolis ...
Benefits of Using MongoDB Over RDBMS (At An Evening with MongoDB Minneapolis ...Benefits of Using MongoDB Over RDBMS (At An Evening with MongoDB Minneapolis ...
Benefits of Using MongoDB Over RDBMS (At An Evening with MongoDB Minneapolis ...
 
Getting Started with Geospatial Data in MongoDB
Getting Started with Geospatial Data in MongoDBGetting Started with Geospatial Data in MongoDB
Getting Started with Geospatial Data in MongoDB
 
Mapreduce Algorithms
Mapreduce AlgorithmsMapreduce Algorithms
Mapreduce Algorithms
 
Networkx tutorial
Networkx tutorialNetworkx tutorial
Networkx tutorial
 
Python networkx library quick start guide
Python networkx library quick start guidePython networkx library quick start guide
Python networkx library quick start guide
 
The Aggregation Framework
The Aggregation FrameworkThe Aggregation Framework
The Aggregation Framework
 
Scalding: Reaching Efficient MapReduce
Scalding: Reaching Efficient MapReduceScalding: Reaching Efficient MapReduce
Scalding: Reaching Efficient MapReduce
 
GeoScript - Spatial Capabilities for Scripting Languages
GeoScript - Spatial Capabilities for Scripting LanguagesGeoScript - Spatial Capabilities for Scripting Languages
GeoScript - Spatial Capabilities for Scripting Languages
 
OrientDB the graph database
OrientDB the graph databaseOrientDB the graph database
OrientDB the graph database
 
Precog & MongoDB User Group: Skyrocket Your Analytics
Precog & MongoDB User Group: Skyrocket Your Analytics Precog & MongoDB User Group: Skyrocket Your Analytics
Precog & MongoDB User Group: Skyrocket Your Analytics
 
Stratosphere System Overview Big Data Beers Berlin. 20.11.2013
Stratosphere System Overview Big Data Beers Berlin. 20.11.2013Stratosphere System Overview Big Data Beers Berlin. 20.11.2013
Stratosphere System Overview Big Data Beers Berlin. 20.11.2013
 
Stratosphere Intro (Java and Scala Interface)
Stratosphere Intro (Java and Scala Interface)Stratosphere Intro (Java and Scala Interface)
Stratosphere Intro (Java and Scala Interface)
 
Hadoop - MongoDB Webinar June 2014
Hadoop - MongoDB Webinar June 2014Hadoop - MongoDB Webinar June 2014
Hadoop - MongoDB Webinar June 2014
 
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
 
NLP on a Billion Documents: Scalable Machine Learning with Apache Spark
NLP on a Billion Documents: Scalable Machine Learning with Apache SparkNLP on a Billion Documents: Scalable Machine Learning with Apache Spark
NLP on a Billion Documents: Scalable Machine Learning with Apache Spark
 

Viewers also liked

2016 Matteo Pizzo Resume
2016 Matteo Pizzo Resume2016 Matteo Pizzo Resume
2016 Matteo Pizzo ResumeMatteo Pizzo
 
深水埗區傑出學生協會 第五期會訊
深水埗區傑出學生協會 第五期會訊深水埗區傑出學生協會 第五期會訊
深水埗區傑出學生協會 第五期會訊sspdosa
 
Täytekakku
TäytekakkuTäytekakku
Täytekakkujklkoti
 
Compare-and-Recommendation
Compare-and-RecommendationCompare-and-Recommendation
Compare-and-RecommendationKent Keeler
 
2015 PortfolioMW
2015 PortfolioMW2015 PortfolioMW
2015 PortfolioMWMark Wilson
 
Creador de Ingresos
Creador de IngresosCreador de Ingresos
Creador de Ingresoscreaingresos
 
Topic proposal no.1
Topic proposal no.1Topic proposal no.1
Topic proposal no.1ejaycoloma24
 
Clarissa Niederauer Leote da Silva
Clarissa Niederauer Leote da SilvaClarissa Niederauer Leote da Silva
Clarissa Niederauer Leote da SilvaClarissa E Fabiano
 
MASECO Approach Jan15v2
MASECO Approach Jan15v2MASECO Approach Jan15v2
MASECO Approach Jan15v2Josh Matthews
 
How to Get Your Career Moving
How to Get Your Career MovingHow to Get Your Career Moving
How to Get Your Career MovingTorrensUniversity
 
Distance education in Bachelor of Science - B.Sc UP,Noida@9278888356
Distance education in Bachelor of Science - B.Sc UP,Noida@9278888356Distance education in Bachelor of Science - B.Sc UP,Noida@9278888356
Distance education in Bachelor of Science - B.Sc UP,Noida@9278888356path2career
 
Get started with dropbox
Get started with dropboxGet started with dropbox
Get started with dropboxVille Gjerulff
 

Viewers also liked (20)

2016 Matteo Pizzo Resume
2016 Matteo Pizzo Resume2016 Matteo Pizzo Resume
2016 Matteo Pizzo Resume
 
sk me (1)
sk me (1)sk me (1)
sk me (1)
 
Fest 10 3
Fest 10 3Fest 10 3
Fest 10 3
 
深水埗區傑出學生協會 第五期會訊
深水埗區傑出學生協會 第五期會訊深水埗區傑出學生協會 第五期會訊
深水埗區傑出學生協會 第五期會訊
 
Täytekakku
TäytekakkuTäytekakku
Täytekakku
 
final report
final reportfinal report
final report
 
Compare-and-Recommendation
Compare-and-RecommendationCompare-and-Recommendation
Compare-and-Recommendation
 
2015 PortfolioMW
2015 PortfolioMW2015 PortfolioMW
2015 PortfolioMW
 
Creador de Ingresos
Creador de IngresosCreador de Ingresos
Creador de Ingresos
 
Rahul Singh
Rahul SinghRahul Singh
Rahul Singh
 
Topic proposal no.1
Topic proposal no.1Topic proposal no.1
Topic proposal no.1
 
Clarissa Niederauer Leote da Silva
Clarissa Niederauer Leote da SilvaClarissa Niederauer Leote da Silva
Clarissa Niederauer Leote da Silva
 
MASECO Approach Jan15v2
MASECO Approach Jan15v2MASECO Approach Jan15v2
MASECO Approach Jan15v2
 
How to Get Your Career Moving
How to Get Your Career MovingHow to Get Your Career Moving
How to Get Your Career Moving
 
Path2car2
Path2car2Path2car2
Path2car2
 
Distance education in Bachelor of Science - B.Sc UP,Noida@9278888356
Distance education in Bachelor of Science - B.Sc UP,Noida@9278888356Distance education in Bachelor of Science - B.Sc UP,Noida@9278888356
Distance education in Bachelor of Science - B.Sc UP,Noida@9278888356
 
Abc
AbcAbc
Abc
 
hudgensresume0915
hudgensresume0915hudgensresume0915
hudgensresume0915
 
Negara maju
Negara majuNegara maju
Negara maju
 
Get started with dropbox
Get started with dropboxGet started with dropbox
Get started with dropbox
 

Similar to D3 Mapping Visualization

"Визуализация данных с помощью d3.js", Михаил Дунаев, MoscowJS 19
"Визуализация данных с помощью d3.js", Михаил Дунаев, MoscowJS 19"Визуализация данных с помощью d3.js", Михаил Дунаев, MoscowJS 19
"Визуализация данных с помощью d3.js", Михаил Дунаев, MoscowJS 19MoscowJS
 
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open SourceState of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open SourceOSCON Byrum
 
Learn D3.js in 90 minutes
Learn D3.js in 90 minutesLearn D3.js in 90 minutes
Learn D3.js in 90 minutesJos Dirksen
 
Visualization of Big Data in Web Apps
Visualization of Big Data in Web AppsVisualization of Big Data in Web Apps
Visualization of Big Data in Web AppsEPAM
 
Barcelona MUG MongoDB + Hadoop Presentation
Barcelona MUG MongoDB + Hadoop PresentationBarcelona MUG MongoDB + Hadoop Presentation
Barcelona MUG MongoDB + Hadoop PresentationNorberto Leite
 
D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)
D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)
D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)Oleksii Prohonnyi
 
Server side geo_tools_in_drupal_pnw_2012
Server side geo_tools_in_drupal_pnw_2012Server side geo_tools_in_drupal_pnw_2012
Server side geo_tools_in_drupal_pnw_2012Mack Hardy
 
Mongo db washington dc 2014
Mongo db washington dc 2014Mongo db washington dc 2014
Mongo db washington dc 2014ikanow
 
SVGo: a Go Library for SVG generation
SVGo: a Go Library for SVG generationSVGo: a Go Library for SVG generation
SVGo: a Go Library for SVG generationAnthony Starks
 
SVCC 2013 D3.js Presentation (10/05/2013)
SVCC 2013 D3.js Presentation (10/05/2013)SVCC 2013 D3.js Presentation (10/05/2013)
SVCC 2013 D3.js Presentation (10/05/2013)Oswald Campesato
 
Ingesting streaming data into Graph Database
Ingesting streaming data into Graph DatabaseIngesting streaming data into Graph Database
Ingesting streaming data into Graph DatabaseGuido Schmutz
 
Create Graph and Grid Using D3 Library
Create Graph and Grid Using D3 LibraryCreate Graph and Grid Using D3 Library
Create Graph and Grid Using D3 LibraryYanliang Bao (Beryl)
 
OrientDB - The 2nd generation of (multi-model) NoSQL
OrientDB - The 2nd generation of  (multi-model) NoSQLOrientDB - The 2nd generation of  (multi-model) NoSQL
OrientDB - The 2nd generation of (multi-model) NoSQLRoberto Franchini
 
Omnibus database machine
Omnibus database machineOmnibus database machine
Omnibus database machineAleck Landgraf
 

Similar to D3 Mapping Visualization (20)

"Визуализация данных с помощью d3.js", Михаил Дунаев, MoscowJS 19
"Визуализация данных с помощью d3.js", Михаил Дунаев, MoscowJS 19"Визуализация данных с помощью d3.js", Михаил Дунаев, MoscowJS 19
"Визуализация данных с помощью d3.js", Михаил Дунаев, MoscowJS 19
 
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open SourceState of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
 
Introduction to D3.js
Introduction to D3.jsIntroduction to D3.js
Introduction to D3.js
 
Learn D3.js in 90 minutes
Learn D3.js in 90 minutesLearn D3.js in 90 minutes
Learn D3.js in 90 minutes
 
Visualization of Big Data in Web Apps
Visualization of Big Data in Web AppsVisualization of Big Data in Web Apps
Visualization of Big Data in Web Apps
 
The D3 Toolbox
The D3 ToolboxThe D3 Toolbox
The D3 Toolbox
 
Barcelona MUG MongoDB + Hadoop Presentation
Barcelona MUG MongoDB + Hadoop PresentationBarcelona MUG MongoDB + Hadoop Presentation
Barcelona MUG MongoDB + Hadoop Presentation
 
SVGD3Angular2React
SVGD3Angular2ReactSVGD3Angular2React
SVGD3Angular2React
 
D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)
D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)
D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)
 
Server side geo_tools_in_drupal_pnw_2012
Server side geo_tools_in_drupal_pnw_2012Server side geo_tools_in_drupal_pnw_2012
Server side geo_tools_in_drupal_pnw_2012
 
Mongo db washington dc 2014
Mongo db washington dc 2014Mongo db washington dc 2014
Mongo db washington dc 2014
 
Pycon2011
Pycon2011Pycon2011
Pycon2011
 
SVGo: a Go Library for SVG generation
SVGo: a Go Library for SVG generationSVGo: a Go Library for SVG generation
SVGo: a Go Library for SVG generation
 
Svcc 2013-d3
Svcc 2013-d3Svcc 2013-d3
Svcc 2013-d3
 
SVCC 2013 D3.js Presentation (10/05/2013)
SVCC 2013 D3.js Presentation (10/05/2013)SVCC 2013 D3.js Presentation (10/05/2013)
SVCC 2013 D3.js Presentation (10/05/2013)
 
10. R getting spatial
10.  R getting spatial10.  R getting spatial
10. R getting spatial
 
Ingesting streaming data into Graph Database
Ingesting streaming data into Graph DatabaseIngesting streaming data into Graph Database
Ingesting streaming data into Graph Database
 
Create Graph and Grid Using D3 Library
Create Graph and Grid Using D3 LibraryCreate Graph and Grid Using D3 Library
Create Graph and Grid Using D3 Library
 
OrientDB - The 2nd generation of (multi-model) NoSQL
OrientDB - The 2nd generation of  (multi-model) NoSQLOrientDB - The 2nd generation of  (multi-model) NoSQL
OrientDB - The 2nd generation of (multi-model) NoSQL
 
Omnibus database machine
Omnibus database machineOmnibus database machine
Omnibus database machine
 

Recently uploaded

DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 

Recently uploaded (20)

DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 

D3 Mapping Visualization

  • 1. Mapping  with  D3   Sudhir  Chowbina   @genomegeek  
  • 2. Follow  along  code  !   h9p://bit.ly/1IPr6hj    
  • 3. Books  and  Blogs   q  Let’s Make a Map – Mike Bostock (http://bost.ocks.org/mike/map/) q  Mapping with D3, A friendly introduction by Andy Woodruff (http://maptimeboston.github.io/d3-maptime/) q  Learning D3.js Mapping by Thomas Newton and Oscar Villarreal q  D3.js in Action by Elijah Meeks
  • 4. What  is  D3  (Data-­‐Driven  Documents)?   •  D3.js  is  a  JavaScript  library  for  manipulaOng  documents   based  on  data.     •  D3  helps  you  bring  data  to  life  using  HTML,  SVG,  and  CSS.     •  D3  combines  powerful  visualizaOon  components  and  a  data-­‐ driven  approach  to  DOM  manipulaOon.   •  Developed  by  Mike  Bostock  with  the  idea  of  bridging  the   gap  between  staOc  display  of  data,  and  interacOve  and   animated  data  visualizaOons.  
  • 5. WHAT  DOES  THAT   MEAN?  
  • 6. IT  MEANS  TAKING  DATA  …   City   #  of  rats   Cambridge   400   Boston   900   Somerville   300   Brookline   600   VersaOle  way  of  loading  data  (asynchronously)  into  the  browser  is  using  an  XMLH9pRequest,  or  XHR   d3.text,  d3.csv,  d3.html,  d3.xml,  d3.tsv,  d3.json    
  • 7. …  BINDING  TO  HTML  OR  SVG  ELEMENTS  …   <rect  x="0"  width="15"  fill="#d1c9b8"></rect>     <rect  x="25"  width="15“  fill="#d1c9b8"></rect>   <rect  x="50"  width="15"  fill="#d1c9b8"></rect>   <rect  x="75"  width="15"  fill="#d1c9b8"></rect>    
  • 8. …  AND  MANIPULATING  THESE   ELEMENTS  BASED  ON  THE  DATA  …  
  • 10. D3  is  Not  a  Graphical  RepresentaOon   D3  is  not  a  magic  tool  that  draws  and  styles  charts,  maps,  etc.   Rather,  it  provides  a  means  for  YOU  to  create  and  style  web-­‐ standard  documents  based  on  your  data.     It's  not  about  charts,  nor  maps,  nor  any  parOcular  kind  of   graphic.  It  is  fundamentally  about  data  and  web  documents.  
  • 11. (But  let's  sOck  to  maps  for  now.)  
  • 12.
  • 13. Map  File  Storage  Formats     The  Shapefile  format  is  a  popular  geospaOal  vector  data  format  for  geographic  informaOon   system  (GIS)  sofware.       GeoJSON  is  a  format  for  encoding  a  variety  of  geographic  data  structures.     GeometryCollec<on,  FeatureCollec<on.       TopoJSON  is  an  extension  of  GeoJSON  that  encodes  topology.      
  • 14. Convert  Shapefiles  and  GeoJSON     brew  install  gdal     ogr2ogr  -­‐f  GeoJSON  nc_charloDe_zipcodes.json  meclenburg.shp  -­‐t_srs  EPSG:4326       t_srs  -­‐  Reproject/transform  to  this  SRS  (SpaOal  Reference  System)  on  output                 EPSG  4326  defines  a  full  coordinate  reference  system,  providing  spaOal  meaning  to  otherwise  meaningless  pairs  of  numbers.  It  means   "laOtude  and  longitude  coordinates  on  the  WGS84  reference  ellipsoid.”  WGS84  comprises  a  standard  coordinate  frame  for  the  Earth,  a   datum/reference  ellipsoid  for  raw  alOtude  data,  and  a  gravitaOonal  equipotenOal  surface  (the  geoid)  that  defines  the  nominal  sea  level.  
  • 15. TopoJSON   brew  install  node   npm  install  -­‐g  topojson     topojson     -­‐o  topo_nc_zipcode.json     -­‐-­‐id-­‐property  zipcode     -­‐-­‐properLes  name=zipcode     nc_charloDe_zipcodes.json     •  Rather  than  represenOng  geometries  discretely,  geometries  in  TopoJSON  files  are  sOtched   together  from  shared  line  segments  called  arcs.     •  Eliminates  redundancy,  offering  more  compact  representaOons  of  geometry  than  GeoJSON   •  80%  smaller  than  their  GeoJSON  equivalents.  
  • 16. Sample  File   -­‐-­‐properLes  name=zipcode   -­‐-­‐id-­‐property  zipcode  
  • 18. ENOUGH  INTRODUCTION.   LET’S  MAKE  SOMETHING!   Code  at:  h9p://bit.ly/1IPr6hj  
  • 19. Lay  down  some  boilerplate  HTML  &     Load  the  d3  and  topojson  library   <html> <head> <title>Meclenburg Per Capita Income and Number of Starbucks</title> <script type=“text/javascript” src=“lib/d3.js”></script> <script type=“text/javascript” src=“lib/topojson.js”></script> </head> <body> <script> // our code will go here </script> </body> </html>
  • 20. var  svg  =  d3.select(“body”)    //  returns  body  selecOon                        .append(“svg”)  //  returns  svg  selecOon                          .aDr(“width”,  width)  //  returns  svg  selecOon                              .aDr(“height”,  height);  //  returns  svg  selecOon       •  Select  the  body  and  append  an  svg  to  it.   •  D3's  append()     •  takes  only  the  name  of  the  element  and     •  returns  the  appended  element,  not  the  parent   •  D3  has  select()  and  selectAll()  methods  to  find  single  or   mulOple  DOM  elements,  respecOvely.    
  • 21. svg.append(“g”)    .selectAll(“path”)                .data(  topojson.feature(us,  us.objects.counLes).features  )                                                                               Now,  we're  selecOng  all  the  <path>  elements  in  the   SVG  and  binding  data  to  them...  
  • 22. WAIT  !!  PATH  DOES   NOT  EXISTS  !  
  • 23. This  part  is  hard  to  grasp  at  first,  but  don't  worry.   For  now,  just  know  that  this  is  how  you  write  the   code.     If  there  are  no  <path>  elements,  we  get  an  empty   selecOon,  kind  of  a  placeholder  for  what's  to  come.   Once  we  bind  data  to  this  selecOon  and  append   some  elements,  the  selecOon  will  contain  those   elements.  
  • 24. svg.append(“g”)                                          .selectAll(“path”)                                          .data(  topojson.feature(us,  us.objects.counLes).features  )                                          .enter()              .append(“path”)   This  is  the  basic  syntax  for  creaOng  new  elements  to   match  a  data  array.   enter()  refers  to  new  incoming  data  for  which  there  is   not  yet  an  exisOng  <path>.  For  each  incoming  data   value,  we're  appending  a  <path>  element.   SVG  path  element  is  the  generic  element  to  define  a  shape.  All  basic  shapes  can  be  created  with  a  path  element  
  • 25. CSV  with  Income  and  #Starbucks  per  Zipcode  
  • 26. Loop  over  two  data  files   d3.json("data/topo_nc_zipcode.json",  funcLon  (error,  us)  {      //  Create  a  Path  Generator  FuncLon    //  Collect  the  outer  bound  projecLon  parameters  and  zoom  to  the  county                    d3.csv('data/nc_city_zip_rand.csv',  funcLon(zips)  {          //  For  each  zip-­‐code  collect  the  income      //  Create  a  ‘path’  for  each  Zip      //  Color  the  zip  code  by  income  value        });   });  
  • 27. Path  Generators    var  projecLon  =  d3.geo.mercator();    var  geoPath  =  d3.geo.path().projecLon(projecLon);   We  are  creaOng  a  funcOon  here.  A  path  is  a  funcOon  that   takes  a  TopoJSON  feature  and  returns  SVG  path  data,  based   on  the  specified  projecOon.    
  • 28. svg.append(“g”)                                          .selectAll(“path”)                                          .data(  topojson.feature(us,  us.objects.counLes).features  )                                          .enter()              .append(“path”)              .aDr("d",  geoPath)   Specify  where  to  project  the  path   In  SVG  Land  d  is  an  a9ribute  that  defines  the   coordinates  of  a  path.  
  • 29. Color  Zipcodes  by  Per-­‐Capita  Income   var  threshold  =  d3.scale.threshold()    .domain([20000,  40000,  60000,  80000])    .range(["#6e7c5a",  "#a0b28f",  "#d8b8b3",  "#b45554",  "#760000"]);   var  rateById  =  {};   zips.forEach(funcLon  (d)  {    rateById[d.id]  =  +d.rate;   });   .style("fill",    funcLon  (pt)  {    return  threshold(rateById[pt.id]);   });  
  • 30. Apply  data  from  CSV   var  zipPoints  =  svg.selectAll('circle').data(zips);     zipPoints                  .enter()                              .append('circle')                              .aDr('cx',  funcLon(d)  {return  projecLon([d.lon,  d.lat])[0]})                              .aDr('cy',  funcLon(d)  {return  projecLon([d.lon,  d.lat])[1]})                              .aDr('r',  funcLon(d)  {return  radius(d.star);  })                              .style("stroke",  "white")                              .aDr('fill',  'lightblue');   Show  circle  on  each  zip-­‐code  with  a  radius  that  corresponds   to  the  number  of  Starbucks  
  • 32. API  Reference  for  topojson.feature  funcOon   topojson.feature(topology,  object)     Returns  the  GeoJSON  Feature  or  FeatureCollecOon  for  the  specified  object  in  the  given   topology.  If  the  specified  object  is  a  GeometryCollecOon,  a  FeatureCollecOon  is  returned,  and   each  geometry  in  the  collecOon  is  mapped  to  a  Feature.  Otherwise,  a  Feature  is  returned.     Some  examples:   •  A  point  is  mapped  to  a  feature  with  a  geometry  object  of  type  “Point”.   •  Likewise  for  line  strings,  polygons,  and  other  simple  geometries.   •  A  null  geometry  object  (of  type  null  in  TopoJSON)  is  mapped  to  a  feature  with  a  null   geometry  object.   •  A  geometry  collecOon  of  points  is  mapped  to  a  feature  collecOon  of  features,  each  with  a   point  geometry.   •  A  geometry  collecOon  of  geometry  collecOons  is  mapped  to  a  feature  collecOon  of   features,  each  with  a  geometry  collecOon.    
  • 33. SVG  path  element   h9ps://developer.mozilla.org/en-­‐US/docs/Web/SVG/Element/path  
  • 34. D3  ProjecOon  Methods   h9ps://github.com/mbostock/d3/wiki/Geo-­‐ProjecOons   #  projecOon.center([locaLon])   If  locaLon  is  specified,  sets  the  projecOon’s  center  to  the  specified  locaLon,  a  two-­‐ element  array  of  longitude  and  laOtude  in  degrees  and  returns  the  projecOon.  If  center   is  not  specified,  returns  the  current  center  which  defaults  to  ⟨0°,0°⟩.     #  projecOon.translate([point])   If  point  is  specified,  sets  the  projecOon’s  translaOon  offset  to  the  specified  two-­‐ element  array  [x,  y]  and  returns  the  projecOon.  If  point  is  not  specified,  returns  the   current  translaOon  offset  which  defaults  to  [480,  250].  The  translaOon  offset   determines  the  pixel  coordinates  of  the  projecOon’s  center.  The  default  translaOon   offset  places  ⟨0°,0°⟩  at  the  center  of  a  960×500  area.     #  projecOon.scale([scale])   If  scale  is  specified,  sets  the  projecOon’s  scale  factor  to  the  specified  value  and  returns   the  projecOon.  If  scale  is  not  specified,  returns  the  current  scale  factor  which  defaults   to  150.  The  scale  factor  corresponds  linearly  to  the  distance  between  projected   points.  However,  scale  factors  are  not  consistent  across  projecOons.    
  • 35. ProjecOon  Scale  and  Translate    var  states  =  topojson.feature(us,  us.objects.counLes);        var  b,  s,  t;      projecLon.scale(1).translate([0,  0]);      var  b  =  geoPath.bounds(states);  //  zoom  to  the  county      var  s  =  .9  /  Math.max((b[1][0]  -­‐  b[0][0])  /  width,  (b[1][1]  -­‐  b[0][1])  /  height);      var  t  =  [(width  -­‐  s  *  (b[1][0]  +  b[0][0]))  /  2,  (height  -­‐  s  *  (b[1][1]  +  b[0][1]))  /  2];      projecLon.scale(s).translate(t);