Converting JSON file format

The .json file we produced in December has the wrong format for topoJSON - it needs an array (list), but we produced our data as a hash (dictionary). We'll import it to Python, rearrange the data, and re-export it to JSON in the proper form.

In [2]:
!head ../airmaps.json
{
  "BOS": {
    "url": "http://image.weather.com/web/radar/us_bos_closeradar_large_usen.jpg",
    "coords": {
      "long": -71.005,
      "lat": 42.36416666666667
    }
  },
  "BRO": {
    "url": "http://image.weather.com/web/radar/us_bro_closeradar_large_usen.jpg",
In [3]:
import json
In [4]:
with open('../airmaps.json') as infile:
    content = json.load(infile)
In [19]:
content
Out[19]:
{'BTV': {'url': 'http://image.weather.com/web/radar/us_btv_closeradar_large_usen.jpg',
  'coords': {'lat': 44.47166666666667, 'long': -73.15305555555557}},
 'DFW': {'url': 'http://image.weather.com/web/radar/us_dfw_closeradar_large_usen.jpg',
  'coords': {'lat': 32.896388888888886, 'long': -97.0375}},
 'PHX': {'url': 'http://image.weather.com/web/radar/us_phx_closeradar_large_usen.jpg',
  'coords': {'lat': 33.43416666666666, 'long': -112.00805555555556}},
 'TLH': {'url': 'http://image.weather.com/web/radar/us_tlh_closeradar_large_usen.jpg',
  'coords': {'lat': 30.39638888888889, 'long': -84.35027777777778}},
 'RNO': {'url': 'http://image.weather.com/web/radar/us_rno_closeradar_large_usen.jpg',
  'coords': {'lat': 39.498333333333335, 'long': -119.76805555555555}},
 'FAT': {'url': 'http://image.weather.com/web/radar/us_fat_closeradar_large_usen.jpg',
  'coords': {'lat': 36.77611111111111, 'long': -119.71805555555555}},
 'CHS': {'url': 'http://image.weather.com/web/radar/us_chs_closeradar_large_usen.jpg',
  'coords': {'lat': 32.89861111111111, 'long': -80.04027777777777}},
 'OKC': {'url': 'http://image.weather.com/web/radar/us_okc_closeradar_large_usen.jpg',
  'coords': {'lat': 35.393055555555556, 'long': -97.60055555555554}},
 'GEG': {'url': 'http://image.weather.com/web/radar/us_geg_closeradar_large_usen.jpg',
  'coords': {'lat': 47.61972222222222, 'long': -117.53361111111111}},
 'TPA': {'url': 'http://image.weather.com/web/radar/us_tpa_closeradar_large_usen.jpg',
  'coords': {'lat': 27.975277777777777, 'long': -82.53305555555555}},
 'CLT': {'url': 'http://image.weather.com/web/radar/us_clt_closeradar_large_usen.jpg',
  'coords': {'lat': 35.21388888888889, 'long': -80.94305555555556}},
 'LIT': {'url': 'http://image.weather.com/web/radar/us_lit_closeradar_large_usen.jpg',
  'coords': {'lat': 34.72944444444445, 'long': -92.22416666666666}},
 'DSM': {'url': 'http://image.weather.com/web/radar/us_dsm_closeradar_large_usen.jpg',
  'coords': {'lat': 41.53388888888889, 'long': -93.66250000000001}},
 'DEN': {'url': 'http://image.weather.com/web/radar/us_den_closeradar_large_usen.jpg',
  'coords': {'lat': 39.858333333333334, 'long': -104.66694444444445}},
 'ATL': {'url': 'http://image.weather.com/web/radar/us_atl_closeradar_large_usen.jpg',
  'coords': {'lat': 33.640277777777776, 'long': -84.42694444444444}},
 'MSP': {'url': 'http://image.weather.com/web/radar/us_msp_closeradar_large_usen.jpg',
  'coords': {'lat': 44.88027777777778, 'long': -93.21666666666667}},
 'IND': {'url': 'http://image.weather.com/web/radar/us_ind_closeradar_large_usen.jpg',
  'coords': {'lat': 39.717222222222226, 'long': -86.29416666666667}},
 'SEA': {'url': 'http://image.weather.com/web/radar/us_sea_closeradar_large_usen.jpg',
  'coords': {'lat': 47.44888888888889, 'long': -122.30916666666667}},
 'BRO': {'url': 'http://image.weather.com/web/radar/us_bro_closeradar_large_usen.jpg',
  'coords': {'lat': 25.906666666666666, 'long': -97.42583333333334}},
 'OMA': {'url': 'http://image.weather.com/web/radar/us_oma_closeradar_large_usen.jpg',
  'coords': {'lat': 41.302499999999995, 'long': -95.89361111111111}},
 'PDX': {'url': 'http://image.weather.com/web/radar/us_pdx_closeradar_large_usen.jpg',
  'coords': {'lat': 45.58861111111111, 'long': -122.5975}},
 'JAN': {'url': 'http://image.weather.com/web/radar/us_jan_closeradar_large_usen.jpg',
  'coords': {'lat': 32.31111111111111, 'long': -90.07583333333334}},
 'MAF': {'url': 'http://image.weather.com/web/radar/us_maf_closeradar_large_usen.jpg',
  'coords': {'lat': 31.9425, 'long': -102.20166666666667}},
 'ABQ': {'url': 'http://image.weather.com/web/radar/us_abq_closeradar_large_usen.jpg',
  'coords': {'lat': 35.04, 'long': -106.60916666666667}},
 'BOI': {'url': 'http://image.weather.com/web/radar/us_boi_closeradar_large_usen.jpg',
  'coords': {'lat': 43.564166666666665, 'long': -116.22277777777778}},
 'SHV': {'url': 'http://image.weather.com/web/radar/us_shv_closeradar_large_usen.jpg',
  'coords': {'lat': 32.44638888888888, 'long': -93.82555555555555}},
 'MIA': {'url': 'http://image.weather.com/web/radar/us_mia_closeradar_large_usen.jpg',
  'coords': {'lat': 25.793055555555558, 'long': -80.29055555555556}},
 'LAS': {'url': 'http://image.weather.com/web/radar/us_las_closeradar_large_usen.jpg',
  'coords': {'lat': 36.08027777777778, 'long': -115.15222222222222}},
 'CPR': {'url': 'http://image.weather.com/web/radar/us_cpr_closeradar_large_usen.jpg',
  'coords': {'lat': 42.907777777777774, 'long': -106.46416666666667}},
 'BOS': {'url': 'http://image.weather.com/web/radar/us_bos_closeradar_large_usen.jpg',
  'coords': {'lat': 42.36416666666667, 'long': -71.005}},
 'RIC': {'url': 'http://image.weather.com/web/radar/us_ric_closeradar_large_usen.jpg',
  'coords': {'lat': 37.505, 'long': -77.31944444444444}},
 'ORD': {'url': 'http://image.weather.com/web/radar/us_ord_closeradar_large_usen.jpg',
  'coords': {'lat': 41.97944444444445, 'long': -87.90444444444445}},
 'DTW': {'url': 'http://image.weather.com/web/radar/us_dtw_closeradar_large_usen.jpg',
  'coords': {'lat': 42.21222222222222, 'long': -83.35333333333332}},
 'ROC': {'url': 'http://image.weather.com/web/radar/us_roc_closeradar_large_usen.jpg',
  'coords': {'lat': 43.118611111111115, 'long': -77.67222222222223}},
 'SFO': {'url': 'http://image.weather.com/web/radar/us_sfo_closeradar_large_usen.jpg',
  'coords': {'lat': 37.61888888888889, 'long': -122.37472222222222}},
 'PIT': {'url': 'http://image.weather.com/web/radar/us_pit_closeradar_large_usen.jpg',
  'coords': {'lat': 40.49138888888889, 'long': -80.23277777777778}},
 'SLC': {'url': 'http://image.weather.com/web/radar/us_slc_closeradar_large_usen.jpg',
  'coords': {'lat': 40.788333333333334, 'long': -111.9775}},
 'SJU': {'url': 'http://image.weather.com/web/radar/us_sju_closeradar_large_usen.jpg',
  'coords': {'lat': 18.439166666666665, 'long': -66.00166666666667}},
 'STL': {'url': 'http://image.weather.com/web/radar/us_stl_closeradar_large_usen.jpg',
  'coords': {'lat': 38.7475, 'long': -90.35972222222222}},
 'DCA': {'url': 'http://image.weather.com/web/radar/us_dca_closeradar_large_usen.jpg',
  'coords': {'lat': 38.85194444444445, 'long': -77.0375}},
 'AMA': {'url': 'http://image.weather.com/web/radar/us_ama_closeradar_large_usen.jpg',
  'coords': {'lat': 35.219166666666666, 'long': -101.70583333333333}},
 'LAX': {'url': 'http://image.weather.com/web/radar/us_lax_closeradar_large_usen.jpg',
  'coords': {'lat': 33.942499999999995, 'long': -118.40805555555556}},
 'BHM': {'url': 'http://image.weather.com/web/radar/us_bhm_closeradar_large_usen.jpg',
  'coords': {'lat': 33.562777777777775, 'long': -86.75333333333333}},
 'SAT': {'url': 'http://image.weather.com/web/radar/us_sat_closeradar_large_usen.jpg',
  'coords': {'lat': 29.533611111111114, 'long': -98.46972222222223}}}

Converting our dictionary to a list - the old-fashioned way

In [20]:
lst = []
for (k, v) in content.items():
    lst.append({'code': k, 'url': v['url'], 'coords': v['coords']})

the new "list comprehension" way

In [21]:
lst = [{'code': k, 'url': v['url'], 'coords': v['coords']} for (k, v) in content.items()]
In [22]:
lst
Out[22]:
[{'code': 'BTV',
  'url': 'http://image.weather.com/web/radar/us_btv_closeradar_large_usen.jpg',
  'coords': {'lat': 44.47166666666667, 'long': -73.15305555555557}},
 {'code': 'DFW',
  'url': 'http://image.weather.com/web/radar/us_dfw_closeradar_large_usen.jpg',
  'coords': {'lat': 32.896388888888886, 'long': -97.0375}},
 {'code': 'PHX',
  'url': 'http://image.weather.com/web/radar/us_phx_closeradar_large_usen.jpg',
  'coords': {'lat': 33.43416666666666, 'long': -112.00805555555556}},
 {'code': 'TLH',
  'url': 'http://image.weather.com/web/radar/us_tlh_closeradar_large_usen.jpg',
  'coords': {'lat': 30.39638888888889, 'long': -84.35027777777778}},
 {'code': 'RNO',
  'url': 'http://image.weather.com/web/radar/us_rno_closeradar_large_usen.jpg',
  'coords': {'lat': 39.498333333333335, 'long': -119.76805555555555}},
 {'code': 'FAT',
  'url': 'http://image.weather.com/web/radar/us_fat_closeradar_large_usen.jpg',
  'coords': {'lat': 36.77611111111111, 'long': -119.71805555555555}},
 {'code': 'CHS',
  'url': 'http://image.weather.com/web/radar/us_chs_closeradar_large_usen.jpg',
  'coords': {'lat': 32.89861111111111, 'long': -80.04027777777777}},
 {'code': 'OKC',
  'url': 'http://image.weather.com/web/radar/us_okc_closeradar_large_usen.jpg',
  'coords': {'lat': 35.393055555555556, 'long': -97.60055555555554}},
 {'code': 'GEG',
  'url': 'http://image.weather.com/web/radar/us_geg_closeradar_large_usen.jpg',
  'coords': {'lat': 47.61972222222222, 'long': -117.53361111111111}},
 {'code': 'TPA',
  'url': 'http://image.weather.com/web/radar/us_tpa_closeradar_large_usen.jpg',
  'coords': {'lat': 27.975277777777777, 'long': -82.53305555555555}},
 {'code': 'CLT',
  'url': 'http://image.weather.com/web/radar/us_clt_closeradar_large_usen.jpg',
  'coords': {'lat': 35.21388888888889, 'long': -80.94305555555556}},
 {'code': 'LIT',
  'url': 'http://image.weather.com/web/radar/us_lit_closeradar_large_usen.jpg',
  'coords': {'lat': 34.72944444444445, 'long': -92.22416666666666}},
 {'code': 'DSM',
  'url': 'http://image.weather.com/web/radar/us_dsm_closeradar_large_usen.jpg',
  'coords': {'lat': 41.53388888888889, 'long': -93.66250000000001}},
 {'code': 'DEN',
  'url': 'http://image.weather.com/web/radar/us_den_closeradar_large_usen.jpg',
  'coords': {'lat': 39.858333333333334, 'long': -104.66694444444445}},
 {'code': 'ATL',
  'url': 'http://image.weather.com/web/radar/us_atl_closeradar_large_usen.jpg',
  'coords': {'lat': 33.640277777777776, 'long': -84.42694444444444}},
 {'code': 'MSP',
  'url': 'http://image.weather.com/web/radar/us_msp_closeradar_large_usen.jpg',
  'coords': {'lat': 44.88027777777778, 'long': -93.21666666666667}},
 {'code': 'IND',
  'url': 'http://image.weather.com/web/radar/us_ind_closeradar_large_usen.jpg',
  'coords': {'lat': 39.717222222222226, 'long': -86.29416666666667}},
 {'code': 'SEA',
  'url': 'http://image.weather.com/web/radar/us_sea_closeradar_large_usen.jpg',
  'coords': {'lat': 47.44888888888889, 'long': -122.30916666666667}},
 {'code': 'BRO',
  'url': 'http://image.weather.com/web/radar/us_bro_closeradar_large_usen.jpg',
  'coords': {'lat': 25.906666666666666, 'long': -97.42583333333334}},
 {'code': 'OMA',
  'url': 'http://image.weather.com/web/radar/us_oma_closeradar_large_usen.jpg',
  'coords': {'lat': 41.302499999999995, 'long': -95.89361111111111}},
 {'code': 'PDX',
  'url': 'http://image.weather.com/web/radar/us_pdx_closeradar_large_usen.jpg',
  'coords': {'lat': 45.58861111111111, 'long': -122.5975}},
 {'code': 'JAN',
  'url': 'http://image.weather.com/web/radar/us_jan_closeradar_large_usen.jpg',
  'coords': {'lat': 32.31111111111111, 'long': -90.07583333333334}},
 {'code': 'MAF',
  'url': 'http://image.weather.com/web/radar/us_maf_closeradar_large_usen.jpg',
  'coords': {'lat': 31.9425, 'long': -102.20166666666667}},
 {'code': 'ABQ',
  'url': 'http://image.weather.com/web/radar/us_abq_closeradar_large_usen.jpg',
  'coords': {'lat': 35.04, 'long': -106.60916666666667}},
 {'code': 'BOI',
  'url': 'http://image.weather.com/web/radar/us_boi_closeradar_large_usen.jpg',
  'coords': {'lat': 43.564166666666665, 'long': -116.22277777777778}},
 {'code': 'SHV',
  'url': 'http://image.weather.com/web/radar/us_shv_closeradar_large_usen.jpg',
  'coords': {'lat': 32.44638888888888, 'long': -93.82555555555555}},
 {'code': 'MIA',
  'url': 'http://image.weather.com/web/radar/us_mia_closeradar_large_usen.jpg',
  'coords': {'lat': 25.793055555555558, 'long': -80.29055555555556}},
 {'code': 'LAS',
  'url': 'http://image.weather.com/web/radar/us_las_closeradar_large_usen.jpg',
  'coords': {'lat': 36.08027777777778, 'long': -115.15222222222222}},
 {'code': 'CPR',
  'url': 'http://image.weather.com/web/radar/us_cpr_closeradar_large_usen.jpg',
  'coords': {'lat': 42.907777777777774, 'long': -106.46416666666667}},
 {'code': 'BOS',
  'url': 'http://image.weather.com/web/radar/us_bos_closeradar_large_usen.jpg',
  'coords': {'lat': 42.36416666666667, 'long': -71.005}},
 {'code': 'RIC',
  'url': 'http://image.weather.com/web/radar/us_ric_closeradar_large_usen.jpg',
  'coords': {'lat': 37.505, 'long': -77.31944444444444}},
 {'code': 'ORD',
  'url': 'http://image.weather.com/web/radar/us_ord_closeradar_large_usen.jpg',
  'coords': {'lat': 41.97944444444445, 'long': -87.90444444444445}},
 {'code': 'DTW',
  'url': 'http://image.weather.com/web/radar/us_dtw_closeradar_large_usen.jpg',
  'coords': {'lat': 42.21222222222222, 'long': -83.35333333333332}},
 {'code': 'ROC',
  'url': 'http://image.weather.com/web/radar/us_roc_closeradar_large_usen.jpg',
  'coords': {'lat': 43.118611111111115, 'long': -77.67222222222223}},
 {'code': 'SFO',
  'url': 'http://image.weather.com/web/radar/us_sfo_closeradar_large_usen.jpg',
  'coords': {'lat': 37.61888888888889, 'long': -122.37472222222222}},
 {'code': 'PIT',
  'url': 'http://image.weather.com/web/radar/us_pit_closeradar_large_usen.jpg',
  'coords': {'lat': 40.49138888888889, 'long': -80.23277777777778}},
 {'code': 'SLC',
  'url': 'http://image.weather.com/web/radar/us_slc_closeradar_large_usen.jpg',
  'coords': {'lat': 40.788333333333334, 'long': -111.9775}},
 {'code': 'SJU',
  'url': 'http://image.weather.com/web/radar/us_sju_closeradar_large_usen.jpg',
  'coords': {'lat': 18.439166666666665, 'long': -66.00166666666667}},
 {'code': 'STL',
  'url': 'http://image.weather.com/web/radar/us_stl_closeradar_large_usen.jpg',
  'coords': {'lat': 38.7475, 'long': -90.35972222222222}},
 {'code': 'DCA',
  'url': 'http://image.weather.com/web/radar/us_dca_closeradar_large_usen.jpg',
  'coords': {'lat': 38.85194444444445, 'long': -77.0375}},
 {'code': 'AMA',
  'url': 'http://image.weather.com/web/radar/us_ama_closeradar_large_usen.jpg',
  'coords': {'lat': 35.219166666666666, 'long': -101.70583333333333}},
 {'code': 'LAX',
  'url': 'http://image.weather.com/web/radar/us_lax_closeradar_large_usen.jpg',
  'coords': {'lat': 33.942499999999995, 'long': -118.40805555555556}},
 {'code': 'BHM',
  'url': 'http://image.weather.com/web/radar/us_bhm_closeradar_large_usen.jpg',
  'coords': {'lat': 33.562777777777775, 'long': -86.75333333333333}},
 {'code': 'SAT',
  'url': 'http://image.weather.com/web/radar/us_sat_closeradar_large_usen.jpg',
  'coords': {'lat': 29.533611111111114, 'long': -98.46972222222223}}]
In [23]:
with open('airmaps_lst.json', 'w') as outfile:
    json.dump(lst, outfile)
In [24]:
!head airmaps_lst.json
[{"code": "BTV", "url": "http://image.weather.com/web/radar/us_btv_closeradar_large_usen.jpg", "coords": {"lat": 44.47166666666667, "long": -73.15305555555557}}, {"code": "DFW", "url": "http://image.weather.com/web/radar/us_dfw_closeradar_large_usen.jpg", "coords": {"lat": 32.896388888888886, "long": -97.0375}}, {"code": "PHX", "url": "http://image.weather.com/web/radar/us_phx_closeradar_large_usen.jpg", "coords": {"lat": 33.43416666666666, "long": -112.00805555555556}}, {"code": "TLH", "url": "http://image.weather.com/web/radar/us_tlh_closeradar_large_usen.jpg", "coords": {"lat": 30.39638888888889, "long": -84.35027777777778}}, {"code": "RNO", "url": "http://image.weather.com/web/radar/us_rno_closeradar_large_usen.jpg", "coords": {"lat": 39.498333333333335, "long": -119.76805555555555}}, {"code": "FAT", "url": "http://image.weather.com/web/radar/us_fat_closeradar_large_usen.jpg", "coords": {"lat": 36.77611111111111, "long": -119.71805555555555}}, {"code": "CHS", "url": "http://image.weather.com/web/radar/us_chs_closeradar_large_usen.jpg", "coords": {"lat": 32.89861111111111, "long": -80.04027777777777}}, {"code": "OKC", "url": "http://image.weather.com/web/radar/us_okc_closeradar_large_usen.jpg", "coords": {"lat": 35.393055555555556, "long": -97.60055555555554}}, {"code": "GEG", "url": "http://image.weather.com/web/radar/us_geg_closeradar_large_usen.jpg", "coords": {"lat": 47.61972222222222, "long": -117.53361111111111}}, {"code": "TPA", "url": "http://image.weather.com/web/radar/us_tpa_closeradar_large_usen.jpg", "coords": {"lat": 27.975277777777777, "long": -82.53305555555555}}, {"code": "CLT", "url": "http://image.weather.com/web/radar/us_clt_closeradar_large_usen.jpg", "coords": {"lat": 35.21388888888889, "long": -80.94305555555556}}, {"code": "LIT", "url": "http://image.weather.com/web/radar/us_lit_closeradar_large_usen.jpg", "coords": {"lat": 34.72944444444445, "long": -92.22416666666666}}, {"code": "DSM", "url": "http://image.weather.com/web/radar/us_dsm_closeradar_large_usen.jpg", "coords": {"lat": 41.53388888888889, "long": -93.66250000000001}}, {"code": "DEN", "url": "http://image.weather.com/web/radar/us_den_closeradar_large_usen.jpg", "coords": {"lat": 39.858333333333334, "long": -104.66694444444445}}, {"code": "ATL", "url": "http://image.weather.com/web/radar/us_atl_closeradar_large_usen.jpg", "coords": {"lat": 33.640277777777776, "long": -84.42694444444444}}, {"code": "MSP", "url": "http://image.weather.com/web/radar/us_msp_closeradar_large_usen.jpg", "coords": {"lat": 44.88027777777778, "long": -93.21666666666667}}, {"code": "IND", "url": "http://image.weather.com/web/radar/us_ind_closeradar_large_usen.jpg", "coords": {"lat": 39.717222222222226, "long": -86.29416666666667}}, {"code": "SEA", "url": "http://image.weather.com/web/radar/us_sea_closeradar_large_usen.jpg", "coords": {"lat": 47.44888888888889, "long": -122.30916666666667}}, {"code": "BRO", "url": "http://image.weather.com/web/radar/us_bro_closeradar_large_usen.jpg", "coords": {"lat": 25.906666666666666, "long": -97.42583333333334}}, {"code": "OMA", "url": "http://image.weather.com/web/radar/us_oma_closeradar_large_usen.jpg", "coords": {"lat": 41.302499999999995, "long": -95.89361111111111}}, {"code": "PDX", "url": "http://image.weather.com/web/radar/us_pdx_closeradar_large_usen.jpg", "coords": {"lat": 45.58861111111111, "long": -122.5975}}, {"code": "JAN", "url": "http://image.weather.com/web/radar/us_jan_closeradar_large_usen.jpg", "coords": {"lat": 32.31111111111111, "long": -90.07583333333334}}, {"code": "MAF", "url": "http://image.weather.com/web/radar/us_maf_closeradar_large_usen.jpg", "coords": {"lat": 31.9425, "long": -102.20166666666667}}, {"code": "ABQ", "url": "http://image.weather.com/web/radar/us_abq_closeradar_large_usen.jpg", "coords": {"lat": 35.04, "long": -106.60916666666667}}, {"code": "BOI", "url": "http://image.weather.com/web/radar/us_boi_closeradar_large_usen.jpg", "coords": {"lat": 43.564166666666665, "long": -116.22277777777778}}, {"code": "SHV", "url": "http://image.weather.com/web/radar/us_shv_closeradar_large_usen.jpg", "coords": {"lat": 32.44638888888888, "long": -93.82555555555555}}, {"code": "MIA", "url": "http://image.weather.com/web/radar/us_mia_closeradar_large_usen.jpg", "coords": {"lat": 25.793055555555558, "long": -80.29055555555556}}, {"code": "LAS", "url": "http://image.weather.com/web/radar/us_las_closeradar_large_usen.jpg", "coords": {"lat": 36.08027777777778, "long": -115.15222222222222}}, {"code": "CPR", "url": "http://image.weather.com/web/radar/us_cpr_closeradar_large_usen.jpg", "coords": {"lat": 42.907777777777774, "long": -106.46416666666667}}, {"code": "BOS", "url": "http://image.weather.com/web/radar/us_bos_closeradar_large_usen.jpg", "coords": {"lat": 42.36416666666667, "long": -71.005}}, {"code": "RIC", "url": "http://image.weather.com/web/radar/us_ric_closeradar_large_usen.jpg", "coords": {"lat": 37.505, "long": -77.31944444444444}}, {"code": "ORD", "url": "http://image.weather.com/web/radar/us_ord_closeradar_large_usen.jpg", "coords": {"lat": 41.97944444444445, "long": -87.90444444444445}}, {"code": "DTW", "url": "http://image.weather.com/web/radar/us_dtw_closeradar_large_usen.jpg", "coords": {"lat": 42.21222222222222, "long": -83.35333333333332}}, {"code": "ROC", "url": "http://image.weather.com/web/radar/us_roc_closeradar_large_usen.jpg", "coords": {"lat": 43.118611111111115, "long": -77.67222222222223}}, {"code": "SFO", "url": "http://image.weather.com/web/radar/us_sfo_closeradar_large_usen.jpg", "coords": {"lat": 37.61888888888889, "long": -122.37472222222222}}, {"code": "PIT", "url": "http://image.weather.com/web/radar/us_pit_closeradar_large_usen.jpg", "coords": {"lat": 40.49138888888889, "long": -80.23277777777778}}, {"code": "SLC", "url": "http://image.weather.com/web/radar/us_slc_closeradar_large_usen.jpg", "coords": {"lat": 40.788333333333334, "long": -111.9775}}, {"code": "SJU", "url": "http://image.weather.com/web/radar/us_sju_closeradar_large_usen.jpg", "coords": {"lat": 18.439166666666665, "long": -66.00166666666667}}, {"code": "STL", "url": "http://image.weather.com/web/radar/us_stl_closeradar_large_usen.jpg", "coords": {"lat": 38.7475, "long": -90.35972222222222}}, {"code": "DCA", "url": "http://image.weather.com/web/radar/us_dca_closeradar_large_usen.jpg", "coords": {"lat": 38.85194444444445, "long": -77.0375}}, {"code": "AMA", "url": "http://image.weather.com/web/radar/us_ama_closeradar_large_usen.jpg", "coords": {"lat": 35.219166666666666, "long": -101.70583333333333}}, {"code": "LAX", "url": "http://image.weather.com/web/radar/us_lax_closeradar_large_usen.jpg", "coords": {"lat": 33.942499999999995, "long": -118.40805555555556}}, {"code": "BHM", "url": "http://image.weather.com/web/radar/us_bhm_closeradar_large_usen.jpg", "coords": {"lat": 33.562777777777775, "long": -86.75333333333333}}, {"code": "SAT", "url": "http://image.weather.com/web/radar/us_sat_closeradar_large_usen.jpg", "coords": {"lat": 29.533611111111114, "long": -98.46972222222223}}]

Learning D3

There's an excellent, gentle D3 tutorial at https://github.com/janmilosh/d3js-presentation. After installing git on your machine,

git clone https://github.com/janmilosh/d3js-presentation
cd d3js-presentation
firefox index.html

View both the page rendered in a web browser and the raw index.html source code.