"output_type": "auto", "description": "For a csv file, given the name of the column \ containing the address, this function append a new column \ containing the corresponding postal code", "parameter": [{ "name": "address_colname", "description": "Name of the column containing address", "type": "string", "source": "search_column", "range": None, "default": None, "new_column": None },{ "name": "postcode_colname", "description": "Name of the appended postcode column", "type": "string", "source": "user_input", "range": None, "default": "Postal Code", "new_column": True }] } import address_to_postal import os from webapp_library import build_app if __name__ == '__main__': port = int(os.getenv("VCAP_APP_PORT")) build_app(MD, address_to_postal, port, True, '_postcode.csv') # build_app(MD, address_to_postal, 1010, True, '_postcode.csv')
MD = { "name": "Postcode to LatLon", "supported_file_type": ["csv"], "input_type": "upload_first", "output_type": "auto", "description": "For a csv file, given the name of the column \ containing the postal code, this function append two new columns \ containing the corresponding latitude and longitude", "parameter": [{ "name": "postcode_colname", "description": "Name of the column containg postal code", "type": "string", "source": "search_column", "range": None, "default": None, "new_column": None }] } import postal_to_latlon import os from webapp_library import build_app if __name__ == '__main__': port = int(os.getenv("VCAP_APP_PORT")) build_app(MD, postal_to_latlon, port, True, '_merged.csv') # build_app(MD, postal_to_latlon, 1020, True, '_merged.csv')
"supported_file_type": ['csv'], "input_type": "auto", "output_type": "'auto", "description": "For a csv file, this function will search \ for the latlon pair columns and append the corresponding Region Info", "parameter": [{ "name": "ura_type", "description": "Type of region to be appended", "type": "string", "source": "from_options", "range": ('region','planning','subzone'), "default": None, #the default value "new_column": None },{ "name": "num_run", "description": "Number of runs (number of latlon pairs)", "type": "integer", "source": "user_input", "range": None, "default": 1, "new_column": None }] } import region_csv_appender from webapp_library import build_app if __name__ == '__main__': port = int(os.getenv("VCAP_APP_PORT")) #build_app(MD, region_csv_appender, 1030, True, '_enriched.csv') build_app(MD, region_csv_appender, port, True, '_enriched.csv')