Skip to content

Ideas about visualization #19

@davidwang001

Description

@davidwang001

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.

  1. 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]

  1. 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
  1. 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions