I wanted to share my ideas about visualization and hopefully get some help on debugging them since our group's data isn't ready yet.
- First I want to filter the panda dataframe so that we only have data relevant to the state of interest.
def state_data(state, data):
sdata=data[state in data.location]
return sdata[0:10]
- Next, we dig into that data to find values of the bbox by taking max and min long/lats for the new data set.
quakes = state_data("California",data)
from mpl_toolkits.basemap import Basemap
def bbox(quakes):
#create a variable called x to create margins
x=50
#calculate quake bounding box from lat,lon
Max_lat=quakes[,1]+x
Min_lat=quakes[,1]+x
Max_long=quakes[,2]+x
Min_long=quakes[,2]+x
centerlat=mean(quakes[,1])
centerlon=mean(quakes[,2])
#create bounded box
b=[]
return b
- Use the bbox to create a nice area for the visualization map
Am I missing anything up to this point? Does any of it not make sense? Also, how do I synch a python compiler to my sublime text 2? Thank you guys!
I wanted to share my ideas about visualization and hopefully get some help on debugging them since our group's data isn't ready yet.
def state_data(state, data):
sdata=data[state in data.location]
return sdata[0:10]
quakes = state_data("California",data)
from mpl_toolkits.basemap import Basemap
def bbox(quakes):
#create a variable called x to create margins
x=50
Am I missing anything up to this point? Does any of it not make sense? Also, how do I synch a python compiler to my sublime text 2? Thank you guys!