# NOT RUN {
data(HaslachSurvey)
# survey raw data (Store choices and purchases)
data(HaslachDistricts)
# IDs and information about customer origins
data(HaslachStores)
# IDs and information about destinations (grocery stores)
# }
# NOT RUN {
tcmat_haslach_airline <- tcmat.create(origins.id = HaslachDistricts$WO,
origins.addr = HaslachDistricts$WO_Adr, destinations.id = HaslachStores$LM,
destinations.addr = HaslachStores$LM_Adr_zus,
tc.type = "airline", tc.unit = "km",
addr.format = "stradr", tc.constant = 0, show_proc = TRUE)
# Creation of a transport costs matrix with airline distances
# saving as list object "tcmat_haslach_airline"
# Needs internet access and accesses OpenStreetMap server(s)
# If server not available, the function will produce an error
tcmat_haslach_drvtime <- tcmat.create(origins.id = HaslachDistricts$WO,
origins.addr = HaslachDistricts$WO_Adr, destinations.id = HaslachStores$LM,
destinations.addr = HaslachStores$LM_Adr_zus,
tc.type = "street", addr.format = "stradr",
tc.constant = 0, show_proc = TRUE)
# Creation of a transport costs matrix with car driving times
# saving as list object "tcmat_haslach_drvtime"
# Needs internet access and accesses OpenStreetMap server(s)
# If server not available, will produce an error
# }
Run the code above in your browser using DataLab