# CrossCompute
url = "https://data.cityofnewyork.us/api/views/c3uy-2p5r/rows.csv?accessType=DOWNLOAD"
target_folder = '/tmp'
# Milestone 1
# Show a graph for air quality of NYC for Toxin-Indicator ID(646)
borough_select.strip().splitlines()[0]
# Load Data
import pandas as pd
t = pd.read_csv(url)
t.head()
# Aggreggate data for the selected toxin 646 over all locations
len(t)
x = t[(t['indicator_id'] == 646)].copy()
%pylab inline
ax = x.plot(x=['year_description'], y=['indicator_data_id'])
# Save graph
from os.path import join
fig = ax.get_figure()
target_path = join(target_folder, 'graph.png')
fig.savefig(target_path)
print('x_image_path = %s' % target_path)