Skip to content

Instantly share code, notes, and snippets.

View asifm's full-sized avatar

Asif Mehedi asifm

  • Charlottesville, VA, USA
  • 13:37 (UTC -04:00)
View GitHub Profile
@asifm
asifm / index.html
Last active November 2, 2015 14:34
D3 bar chart with lines
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Top MSAs by new establishments</title>
<script src="//d3js.org/d3.v3.min.js" charset="utf-8"></script>
<style>
body {
margin: 0;
@asifm
asifm / index.html
Last active December 7, 2015 21:01
Interactive Stacked Chart
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>US Higher Education: Research Expenditure</title>
<script src="//d3js.org/d3.v3.min.js" charset="utf-8"></script>
<style type="text/css">
body {
margin: 50px;
@asifm
asifm / index.html
Last active December 7, 2015 20:59
Map of USA: Albers Projection
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>United States: Albers Projection</title>
<script type="text/javascript" src="//d3js.org/d3.v3.min.js"></script>
<style type="text/css">
.state {
@asifm
asifm / index.html
Last active December 7, 2015 20:59
Map with arrows
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>UVa's out-of-state students later creating ventures in Virginia</title>
<script src="//d3js.org/d3.v3.min.js" charset="utf-8"></script>
<style>
body {
margin: 0;
@asifm
asifm / median.py
Created September 23, 2017 22:16
Find median of three numbers without using a list
# The principle is to exhaustively compare all three numbers, so that we can know
# the order of the three numbers. We can do this with 3 levels of if statements.
# At first level we compare two of the three numbers (here a and b) and then
# at the next level we compare another pair (such as b and c or a and c). And then
# at the last level we compare the last remaining pair, if necessary. This way
# we exhaust all possibilities.
def median(a, b, c):
# First compare the first two numbers a and b.
@asifm
asifm / .block
Created October 4, 2017 22:17
Focus + Context Scatter Plots
license: mit
@asifm
asifm / .block
Created December 10, 2017 10:08
Brush & Zoom II
license: gpl-3.0
height: 600
@asifm
asifm / .block
Created December 10, 2017 10:11
Brush & Zoom II
license: gpl-3.0
height: 600
@asifm
asifm / .block
Created December 10, 2017 10:12
Brush Minimap
license: mit
@asifm
asifm / .block
Created December 10, 2017 10:14
Brushable Scatterplot/Choropleth
license: mit
height: 350