Skip to content

Instantly share code, notes, and snippets.

View isc-rsingh's full-sized avatar

Raj Singh isc-rsingh

View GitHub Profile
@isc-rsingh
isc-rsingh / urbanity.ipynb
Created July 30, 2017 02:16
Urbanity in the US, Categorizing urban density
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[-81.54453, 28.37968],
[-81.54517, 28.37869],
[-81.54594, 28.37742],
[-81.54615, 28.37686],
[-81.54635, 28.37677],
@isc-rsingh
isc-rsingh / Cycling through History.md
Last active May 9, 2017 18:30
cycling through history site

Cycling through History

@isc-rsingh
isc-rsingh / LICENSE.txt
Last active May 2, 2017 15:14
Analyze Boston geographic open data sets
------------------------------------------------------------------------
Copyright IBM Corp. 2017
Licensed under the Apache License, Version 2.0 (the 'License');
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@isc-rsingh
isc-rsingh / index.html
Last active February 14, 2017 22:27
mapbox symbol styling
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.32.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.32.1/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
@isc-rsingh
isc-rsingh / SimpleDisplayMeta.py
Created January 4, 2017 19:29
pixiedust SimpleDisplayMeta.py in dir display/table
from .SimpleDisplay import SimpleDisplay
from ..display import *
import pixiedust.utils.dataFrameMisc as dataFrameMisc
@PixiedustDisplay()
class SimpleDisplayMeta(DisplayHandlerMeta):
@addId
def getMenuInfo(self,entity,dataHandler):
if dataFrameMisc.isPySparkDataFrame(entity) or dataFrameMisc.isPandasDataFrame(entity):
return [
@isc-rsingh
isc-rsingh / dataframeTable.html
Created January 4, 2017 16:36
pixiedust dataframeTable.html in dir display/table/templates
<style type="text/css" class="pd_save">
.df-table-wrapper .panel-heading {
border-radius: 0;
padding: 0px;
}
.df-table-wrapper .panel-heading:hover {
border-color: #008571;
}
.df-table-wrapper .panel-title a {
background-color: #f9f9fb;
@isc-rsingh
isc-rsingh / pixiedust_display-table-display-v0.7.py
Created January 4, 2017 16:10
pixiedust display.py in dir display/table
class TableDisplay(Display):
def doRender(self, handlerId):
entity=self.entity
if dataFrameMisc.fqName(entity) == "graphframes.graphframe.GraphFrame":
if handlerId == "edges":
entity=entity.edges
else:
entity=entity.vertices
if dataFrameMisc.isPySparkDataFrame(entity) or dataFrameMisc.isPandasDataFrame(entity):
self._addHTMLTemplate('dataframeTable.html', entity=PandasDataFrameAdapter(entity))