Skip to content

Instantly share code, notes, and snippets.

View git-ashish's full-sized avatar
🏠
Freelancing – Open to exciting opportunities

Ashish Singh git-ashish

🏠
Freelancing – Open to exciting opportunities
View GitHub Profile
@git-ashish
git-ashish / Makefile
Created September 11, 2018 11:15 — forked from johan/Makefile
Makefile of the steps in Mike Bostock's command-line cartography tutorial, parts 1-4 https://medium.com/@mbostock/command-line-cartography-part-1-897aa8f8ca2c
# request one at http://api.census.gov/data/key_signup.html and paste it below
CENSUS_API_KEY=YOUR_CODE_HERE
# a factor 1609.34 squared
SQ_M_TO_SQ_MI=2589975.2356
#prereqs:
# npm install -g shapefile # 0.6.1
# npm install -g d3-geo-projection # 1.2.1
# npm install -g ndjson-cli # 0.3.0
@git-ashish
git-ashish / .block
Created September 11, 2018 09:45 — forked from mbostock/.block
U.S. TopoJSON
license: gpl-3.0
height: 600
border: no
@git-ashish
git-ashish / index.html
Created September 9, 2018 12:23 — forked from phil-pedruco/index.html
Plotting points on a map in D3
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Point on a map D3</title>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<style type="text/css">
@git-ashish
git-ashish / .block
Created September 9, 2018 12:09 — forked from mbostock/.block
Choropleth
license: gpl-3.0
height: 600
border: no
@git-ashish
git-ashish / cb_2014_500k.json
Created September 9, 2018 11:53 — forked from aaronpdennis/cb_2014_500k.json
Congressional Districts Map with TopoJSON and Mapbox GL JS
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@git-ashish
git-ashish / README.md
Created September 8, 2018 14:09 — forked from jefffriesen/README.md
US Zip Codes

This is a d3.js visualization of US zip codes.

Original zip code dataset from Geocommons.

5MB shapefile with properties such as zipcode, state, name, population, area, more.

http://geocommons.com/overlays/54893 (Thank you Bill Greer)

This converts it nicely:

@git-ashish
git-ashish / README.md
Created September 1, 2018 12:13 — forked from mbostock/README.md
Quadtree

This example demonstrates accelerated two-dimensional filtering enabled by d3-quadtree. A quadtree recursively subdivides square cells into four equal-sized subcells. Each leaf node of the quadtree contains a single point. If a given quadtree cell does not intersect the brush extent, then none of the points contained in that subtree can be selected, and thus do not need to be scanned. Above, orange indicates points that are scanned but not selected. Without a quadtree, all points would need to be scanned!

@git-ashish
git-ashish / README.md
Created August 29, 2018 13:05 — forked from chringel21/README.md
Mapbox GL + D3 overlay

Mapbox GL and geojson overlay using D3

Display geojson data as an overlay on a Mapbox GL map using D3, and switch between geographic and topologic view. It shows the Berlin metro and underground rail system (S-Bahn and U-Bahn). This is heavily inspired by Jordi Tosts mapbox-gl-d3-playground

@git-ashish
git-ashish / delete_git_submodule.md
Created August 17, 2018 17:18 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@git-ashish
git-ashish / .block
Created August 17, 2018 09:53 — forked from mbostock/.block
Solar Terminator
license: gpl-3.0