python_data_scien/algorithmic_thinking2/project3/alg_project3_viz.py
def load_data_table(data_url):
    """
    Import a table of county-based cancer risk data
    from a csv format file
    """
    data_file = urllib2.urlopen(data_url)
    data = data_file.read()
    data_lines = data.split('\n')
    print "Loaded", len(data_lines), "data points"
    data_tokens = [line.split(',') for line in data_lines]
    return [[tokens[0], float(tokens[1]), float(tokens[2]), int(tokens[3]), float(tokens[4])] 
            for tokens in data_tokens]

    Import a table of county-based cancer risk data
    from a csv format file
    
Import a table of county-based cancer risk data
from a csv format file
Import a table of county - based cancer risk data from a csv format file
def load_data_table(data_url):
    data_file = urllib2.urlopen(data_url)
    data = data_file.read()
    data_lines = data.split('\n')
    print "Loaded", len(data_lines), "data points"
    data_tokens = [line.split(',') for line in data_lines]
    return [[tokens[0], float(tokens[1]), float(tokens[2]), int(tokens[3]), float(tokens[4])] 
            for tokens in data_tokens]
def load_data_table ( data_url ) : data_file = urllib2 . urlopen ( data_url ) data = data_file . read ( ) data_lines = data . split ( '\n' ) print "Loaded" , len ( data_lines ) , "data points" data_tokens = [ line . split ( ',' ) for line in data_lines ] return [ [ tokens [ 0 ] , float ( tokens [ 1 ] ) , float ( tokens [ 2 ] ) , int ( tokens [ 3 ] ) , float ( tokens [ 4 ] ) ] for tokens in data_tokens ]
Import a table of county-based cancer risk data
from a csv format file
Import a table of county - based cancer risk data from a csv format file
"""
    Import a table of county-based cancer risk data
    from a csv format file
    """
data_url