#NEWLINE# def main( data , causes , streets , holidays , global_start , global_end ) : #NEWLINE# #INDENT# feature_collection = { #NEWLINE# #INDENT# 'type' : 'FeatureCollection' , #NEWLINE# 'features' : [ ] , #NEWLINE# #UNINDENT# } #NEWLINE# with open ( '../data/data.geojson' , 'w' ) as outfile : #NEWLINE# #INDENT# for d in data : #NEWLINE# #INDENT# for crash in get_crashes ( d , causes , streets , holidays , global_start , global_end ) : #NEWLINE# #INDENT# feature_collection [ 'features' ] . append ( crash . __geo_interface__ ( ) ) #NEWLINE# #UNINDENT# #UNINDENT# outfile . write ( json . dumps ( feature_collection , separators = ( ',' , ':' ) ) ) #NEWLINE# outfile . close ( )