returned.attributes['Staff_Multilingual'] = row['Multilingual_Staff'] returned.attributes['Access_Multilingual'] = row['Multilingual_Access'] returned.attributes['Training'] = row['Training'] returned.attributes['Wheelchair_Access'] = row['Wheelchair_Access'] returned.attributes['Funded'] = row['Funded'] returned.attributes['Environment'] = row['Environment'] returned.attributes['Arm/Base Adjustable'] = row['Adjustable Arm/Base'] returned.attributes['Desk Adjustable'] = row['Adjustable Desk'] returned.attributes['Content Filtering'] = row['Content Filtering'] returned.attributes['Food Kiosk'] = row['Food Kiosk'] return returned if __name__ == "__main__": print('Loading information from CSV') locations = locationsFromCSVFile() print('Adding latitudes and longitudes to location information') locationsToShapefileConversion.addLatLongs(locations) print('Writing to shapefile') locationsToShapefileConversion.writeToShapeFile(locations, 'Internet', ['phone', 'category','Cost','Bookings','Mon_Open_Time','Mon_Close_Time','Tue_Open_Time','Tue_Close_Time', 'Wen_Open_Time','Wen_Close_Time','Thu_Open_Time','Thu_Close_Time','Fri_Open_Time','Fri_Close_Time', 'Sat_Open_Time','Sat_Close_Time','Sun_Open_Time','Sun_Close_Time','Num_Terminals', 'Friendly_Terminals_Disability','Printing_Available','Touch_Screen','Trackball','Large_Keyboard', 'Large_Monitor','Accessibility_Options','Speech_Synthesizer','Software_Disability','Documentation', 'Assistance','Staff_Multilingual','Access_Multilingual','Training','Wheelchair_Access','Funded','Environment', 'Arm/Base Adjustable','Desk Adjustable','Content Filtering','Food Kiosk'])
return locations def locationFromGFYLRow(row): returned = locationsToShapefileConversion.Location() returned.name = row['Name'] returned.address = row['Address'] + ' ' + row['Suburb'] + ' ' + row['State'] returned.attributes['category'] = row['Business Category'] return returned if __name__ == "__main__": print('Listing GFYLDataFiles') datafiles = getGFYLDataFiles() locationInfos = [] print('Loading information from GFYLFiles') for dataFile in datafiles: locationInfos.extend(locationsFromGFYLDataFile(dataFile)) print('Adding latitudes and longitudes to location information') locationsToShapefileConversion.addLatLongs(locationInfos) print('Writing to shapefile') locationsToShapefileConversion.writeToShapeFile(locationInfos, 'GFYL', ['category'])
returned.name = 'DHS' + row['Type of office'] returned.attributes['phone'] = row['Telephone'] returned.attributes['Type of office'] = row['Type of office'] returned.attributes['LGA01'] = row['LGA1'] returned.attributes['LGA02'] = row['LGA2'] returned.attributes['LGA03'] = row['LGA3'] returned.attributes['LGA04'] = row['LGA4'] returned.attributes['LGA05'] = row['LGA5'] returned.attributes['LGA06'] = row['LGA6'] returned.attributes['LGA07'] = row['LGA7'] returned.attributes['LGA08'] = row['LGA8'] returned.attributes['LGA09'] = row['LGA9'] returned.attributes['LGA10'] = row['LGA10'] return returned if __name__ == "__main__": print('Loading information from CSV') locations = locationsFromDHSFile() print('Adding latitudes and longitudes to location information') locationsToShapefileConversion.addLatLongs(locations) print('Writing to shapefile') locationsToShapefileConversion.writeToShapeFile(locations, 'DHS', ['phone', 'Type of office', 'LGA01', 'LGA02','LGA03','LGA04','LGA05','LGA06','LGA07', 'LGA08','LGA09','LGA10'])
continue locations.append(locationFromRow(row)) print('Retrieved information for ' + str(len(locations)) + ' locations from file ' + findLocationFileLocation) return locations def locationFromRow(row): returned = Location() returned.address = row['Address1'] + ', ' + row['Address2'] + ', VIC, Australia' returned.name = row['Name'] returned.attributes['phone'] = row['phone'] return returned if __name__ == "__main__": print('Loading information from CSV') locations = locationsFromCSVFile() print('Adding latitudes and longitudes to location information') locationsToShapefileConversion.addLatLongs(locations) print('Writing to shapefile') locationsToShapefileConversion.writeToShapeFile(locations, 'FindLocal', ['phone'])
continue locations.append(locationFromRow(row)) print('Retrieved information for ' + str(len(locations)) + ' locations from file ' + fileLocation) return locations def locationFromRow(row): returned = Location() returned.address = row['Street'] + ', ' + row['Suburb'] + ', ' + row['State'] + ', Australia' returned.name = row['Service Name'] returned.attributes['LGA'] = row['LGA'] return returned if __name__ == "__main__": print('Loading information from CSV') csvColumns = locationsFromCSVFile() print('Adding latitudes and longitudes to location information') locationsToShapefileConversion.addLatLongs(csvColumns) print('Writing to shapefile') locationsToShapefileConversion.writeToShapeFile(csvColumns, 'Kindergartens', ['LGA'])