Skip to content

Instantly share code, notes, and snippets.

View saliksyed's full-sized avatar

Salik Syed saliksyed

  • California
View GitHub Profile
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import json
# create new figure, axes instances.
# we specify specific sizes for the figure to make it bigger
# DPI is "Dots per inch" -- it's used in the printing world
# The reason we specify the DPI instead of raw pixels is because
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
# create new figure, axes instances.
fig = plt.figure()
m = Basemap()
m.drawcoastlines()
plt.show()
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import json
# create new figure, axes instances.
# we specify specific sizes for the figure to make it bigger
# DPI is "Dots per inch" -- it's used in the printing world
# The reason we specify the DPI instead of raw pixels is because
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
# create new figure, axes instances.
# we specify specific sizes for the figure to make it bigger
# DPI is "Dots per inch" -- it's used in the printing world
# The reason we specify the DPI instead of raw pixels is because
# we want the text to be consistently scaled.
my_dpi = 75
{
"Madagascar": {
"country": "Madagascar",
"growth_rate": 2.71,
"population": 23043000.0
},
"Sudan": {
"country": "Sudan",
"growth_rate": 3.07,
"population": 40235000.0
{
"4302": {
"latitude": 23.552,
"country": "China",
"airport_id": "4302",
"longitude": 116.5033,
"name": "Jieyang Chaoshan International Airport"
},
"4301": {
"latitude": 32.8533333333,
@saliksyed
saliksyed / map_test.py
Last active July 10, 2017 09:21
Test Basemap
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Sun Jul 9 11:42:14 2017
@author: saliksyed
"""
from mpl_toolkits.basemap import Basemap
import numpy as np
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 5 00:19:18 2017
@author: saliksyed
"""
import json
from sklearn.cluster import KMeans
country_routes = json.loads(open("routes.json").read())
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 5 00:19:18 2017
@author: saliksyed
"""
import json
from sklearn.cluster import KMeans
country_routes = json.loads(open("routes.json").read())
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 5 00:19:18 2017
@author: saliksyed
"""
import json
from sklearn import svm