Skip to content

Instantly share code, notes, and snippets.

Avatar

Devdatta Tengshe devdattaT

  • Pune
View GitHub Profile
View Dams.csv
We can't make this file beautiful and searchable because it's too large.
Longitude,Latitude,objectid,dm_name,strucode,nrld_no,dm_lat,dm_long,dm_ncity,dtcode,stcode,rivcode,bacode,dm_type,dm_cmp_yr,dm_length,dm_height,dm_flod_des,dm_spil_type,dm_spil_leng,dm_spil_lev,dm_spil_cap,dm_gate_type,dm_gate_no,dm_gate_sz,dam_vol,dm_coment,uname,dm_cmn_yr,dm_name_al,dm_status,dm_ses_zone,dm_no_river_sluice,dm_sluice_purpose,dm_sluice_sz,dm_mod_oper,dm_inst_inter_ager,dm_inst_inter,dm_perliament,dm_ener_dissp,dm_instru_embed,class,dm_oper_main_age,dm_gt_ungtd,dm_lat_1,dm_long_1,created_user,created_date,last_edited_user,last_edited_date,ltype
86.2955202501893,25.0331853491585,"1",Ajan Dam,D00105,BR02HH0020,25.033076,86.295052,Jamui,Jamui,BR,Ajan,2A,TE,"1989","518.3","39.02",,CH,"76.25","123.32","878.5",UG,,,,,Vineeta,,"Anjan, Azan",Completed,Seismic Zone-IV,,,,,,,Jamui,,,Class 2,"Water Resources Department, Govt.of Bihar",UG,25.03318596,86.29551697,,,,,dam
@devdattaT
devdattaT / LocationHistory.md
Created Feb 14, 2019
How to Visualize your Google Location History
View LocationHistory.md

Google is extremely transparent about the Location History it has on you. You can check it out on the timeline feature in the Google Maps application on the phone, or on https://www.google.com/maps/timeline It is possible that you have that turned off, and in that case, consider yourself lucky.

If there is data there, you can view it online, or Download and Analyze it yourself.

View ConvertGoogleHistory.py
import json
import csv
import sys
import datetime
import os
def make_reader(in_json):
# Open location history data
@devdattaT
devdattaT / HawkerCenters.csv
Created Jan 22, 2019
Location information for Hawker Centres
View HawkerCenters.csv
Name Latitude Longitude
Maxwell Food Center 1.2804887 103.8446716
Chomp Chomp Food Centre 1.3641944 103.8663601
Lau Pa Sat 1.2806279 103.8502290
Tiong Bahru Market 1.2847589 103.8326789
@devdattaT
devdattaT / MRT.qml
Created Jan 22, 2019
Style for MRT subway routes
View MRT.qml
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis simplifyMaxScale="1" labelsEnabled="0" hasScaleBasedVisibilityFlag="0" simplifyAlgorithm="0" readOnly="0" simplifyDrawingTol="1" simplifyLocal="1" minScale="1e+8" simplifyDrawingHints="1" version="3.2.0-Bonn" maxScale="0">
<renderer-v2 symbollevels="0" enableorderby="0" attr="name" forceraster="0" type="categorizedSymbol">
<categories>
<category symbol="0" render="true" label="Circle Line" value="Circle Line"/>
<category symbol="1" render="true" label="Circle Line Extension" value="Circle Line Extension"/>
<category symbol="2" render="true" label="Circle Line MRT" value="Circle Line MRT"/>
<category symbol="3" render="true" label="Downtown Line" value="Downtown Line"/>
<category symbol="4" render="true" label="Downtown Line MRT" value="Downtown Line MRT"/>
<category symbol="5" render="true" label="MRT East West Line (EW)" value="MRT East West Line (EW)"/>
@devdattaT
devdattaT / Upgrading Postgresql Client to 10.x on Ubuntu
Last active Jun 5, 2018
Upgrading Postgresql Client to 10.x on Ubuntu
View Upgrading Postgresql Client to 10.x on Ubuntu
Upgrading Postgresql Client to 10.x on Ubuntu
==
We need to first check which Postgresql components are currently installed. This can be done by running a command like:
`dpkg -l | grep postgres`
This returned:
`
ii postgresql-client 9.5+173ubuntu0.1 all front-end programs for PostgreSQL (supported version)
@devdattaT
devdattaT / nodeApp.js
Created Apr 23, 2018
Area Mismatch with PostGIS
View nodeApp.js
var turf = require( "turf" );
let input='{"type":"Polygon","coordinates":[[[81.84447939698728,25.457757],[81.84430664903012,25.456003060556696],[81.84379504376571,25.45431652402258],[81.84296424189746,25.452762203050835],[81.84184617067527,25.45139982932473],[81.84048379694916,25.450281758102534],[81.83892947597742,25.449450956234294],[81.8372429394433,25.448939350969884],[81.835489,25.44876660301271],[81.83373506055669,25.448939350969884],[81.83204852402257,25.449450956234294],[81.83049420305083,25.450281758102534],[81.82913182932472,25.45139982932473],[81.82801375810253,25.452762203050835],[81.82718295623428,25.45431652402258],[81.82667135096987,25.456003060556696],[81.82649860301271,25.457757],[81.82667135096987,25.459510939443305],[81.82718295623428,25.46119747597742],[81.82801375810253,25.462751796949167],[81.82913182932472,25.464114170675273],[81.83049420305083,25.465232241897468],[81.83204852402257,25.466063043765708],[81.83373506055669,25.466574649030118],[81.835489,25.46674739698729],[81.8372429394
@devdattaT
devdattaT / mohallas.geojson
Last active Jun 24, 2016
The Polygons of Mohallas of Delhi
View mohallas.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@devdattaT
devdattaT / getTiles.py
Created Jul 14, 2014
Downloading of Slippy Tiles using Shapely.
View getTiles.py
import math
import os
import urllib
from shapely.geometry import Polygon
def deg2num(lat_deg, lon_deg, zoom):
lat_rad = math.radians(lat_deg)
n = 2.0 ** zoom
xtile = int((lon_deg + 180.0) / 360.0 * n)
ytile = int((1.0 - math.log(math.tan(lat_rad) + (1 / math.cos(lat_rad))) / math.pi) / 2.0 * n)
You can’t perform that action at this time.