Skip to content

Instantly share code, notes, and snippets.

View yesoreyeram's full-sized avatar

Sriram yesoreyeram

View GitHub Profile
@yesoreyeram
yesoreyeram / README.md
Created October 28, 2015 14:01
SVG Clock

Clock using SVG and d3

@yesoreyeram
yesoreyeram / helper.js
Created November 12, 2015 06:18
Javascript Helpers
// Pick random element in arry
var randomElementInArray = function(arrayOfElements){
return arrayOfElements[Math.floor(Math.random() * arrayOfElements.length)];
}
// usage : randomElementInArray(['apple','boy','cat']);
@yesoreyeram
yesoreyeram / README.md
Last active February 15, 2016 08:56
Sample D3.js Program

This is a sample D3.js program

@yesoreyeram
yesoreyeram / README.md
Last active February 15, 2016 09:15
Sample D3.js Program
@yesoreyeram
yesoreyeram / India.jpg
Created February 15, 2016 09:20
Map-with-Latitude-Longitude
����JFIF``��C 

   ��C  ���"��
���}!1AQa"q2���#B��R��$3br�
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz���������������������������������������������������������������������������
���w!1AQaq"2�B���� #3R�br�
$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?����(��(��(��(��(��(��~'�K��xS�6�p��>��u2B�2.@�P<��w�k�=G� �Q�%��Z��t_%�ѥhcb?�p�i�6��޻p�v+��SrK�M�x�� �j5�(�ݤ}UE~f�h������M���-o�����~'������������Y�/#�P���_#�ߴ��x�I׵?k����O��>����KGݻ�$�2zt����> �U�5Y(v���=|���q���i'>���姙��E~+|9����a�Wĸuۏk���)%���h�� �h�#�`�Fc�z`�
�5���Y�Gx��5��f�-]���W����� ����0�N
@yesoreyeram
yesoreyeram / README.md
Created February 25, 2016 12:34
D3 Example: zoom, pan, and axis rescale

This example is a mashup of the D3 Zoom-Pan example along with Ricardo Marimon's example of X-axis re-scaling by dragging.

  • Drag on the canvas to translate/pan the graph.
  • double-click on the canvas to zoom in
  • shift-double-click on the canvas to zoom out
  • Drag on one of the X or Y axis numeric labels to re-scale that axis
  • click on a data point to select it
  • drag a selected data point up or down to change it's Y value
  • enter the delete or backspace key to delete a selected data point
  • hold the ALT/Option key down and click an empty area of the graph to add a data point
@yesoreyeram
yesoreyeram / data.csv
Created March 22, 2016 11:08 — forked from d3noob/.block
Simple d3.js Graph
date close
1-May-12 58.13
30-Apr-12 53.98
27-Apr-12 67.00
26-Apr-12 89.70
25-Apr-12 99.00
24-Apr-12 130.28
23-Apr-12 166.70
20-Apr-12 234.98
19-Apr-12 345.44
@yesoreyeram
yesoreyeram / index.html
Created March 22, 2016 11:22 — forked from d3noob/.block
World Map Centered on the Pacific
<!DOCTYPE html>
<meta charset="utf-8">
<style>
path {
stroke: white;
stroke-width: 0.25px;
fill: grey;
}
</style>
<body>
@yesoreyeram
yesoreyeram / namespace.js
Created April 6, 2016 14:20
Creating Namespaces in javascript
(function() {
"use strict";
this.myapp = function(namespaceString, parentObj, delimiter) {
var d, f, e;
parentObj = parentObj || myapp || this;
namespaceString = namespaceString.split(delimiter || ".");
d = 0;
for (f = namespaceString.length; d < f; d++)
{
delimiter = namespaceString[d],
@yesoreyeram
yesoreyeram / .block
Created May 17, 2016 04:59
Fetching CSV
license: gpl-3.0