Skip to content

Instantly share code, notes, and snippets.

View alexcjohnson's full-sized avatar

Alex Johnson alexcjohnson

View GitHub Profile
@alexcjohnson
alexcjohnson / LICENSE
Last active March 25, 2024 12:17
Working with React and D3 together
The MIT License (MIT)
Copyright (c) Plotly, Inc
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@alexcjohnson
alexcjohnson / tutorial_wrapper.py
Created May 7, 2020 21:14
Dash app tutorial wrapper
#
# Dash app wrapper: show an app next to its code,
# for tutorials and presentations.
#
# Replace "todo" on the first line with your app, tweak the styles to taste.
# Then run this file as a dash app.
#
# Caveats:
# - Your app must be in a place you can import it from this script
# - In this version, your app must create an `app` variable, and
@alexcjohnson
alexcjohnson / massachusetts.json
Created April 8, 2020 15:01
plolyjs mapbox testing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexcjohnson
alexcjohnson / isnumeric.js
Created May 11, 2015 03:06
Plotly isNumeric implementation
/**
* inspired by is-number <https://github.com/jonschlinkert/is-number>
* but significantly simplified and sped up by ignoring number and string constructors
* ie these return false:
* new Number(1)
* new String('1')
*/
'use strict';
@alexcjohnson
alexcjohnson / index.html
Last active August 29, 2015 14:19
map panning with no roll
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.zoomlayer {
fill: transparent;
}
.land {
fill: rgb(83, 207, 142);
}
.graticule {
@alexcjohnson
alexcjohnson / testIsNumeric.js
Created April 8, 2015 18:48
Test of various javascript isNumeric implementations
var shouldPass = [
0xff,
5e3,
0,
-1.1,
37,
3.14,
1,
1.1,