Hello, I would like to calculate the travel time and distance between two locations. I have the latitude and longitude for both locations. I am using the 'mqtime ' command of Stata for this purpose.
Before using the 'mqtime' command, I have installed all the necessary packages by following the instructions provided in the 'help mqtime' command.
To provide you with the latitude and longitude information of the starting and ending locations, I have used the 'dataex' command.
----------------------- copy starting from the next line -----------------------
Here is the command I used:
mqtime, start_x(Start_longitude) start_y(Start_latitude) end_x(End_longitude) end_y(End_latitude)
However, I encountered an issue where both the generated travel time and distance values are missing.
below using dataex- I provide you with what the travel time and travel distance look like.
------------------ copy up to and including the previous line ------------------
Listed 5 out of 5 observations
--------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line ------------------
Listed 5 out of 5 observations
My main issue is how to find "travel time". I managed to find distance using geodist command. However, the only means I have gotten to calculate travel time so far is "mqtime" command.
Could you please advise me on how to resolve this issue? I would greatly appreciate your assistance. Especially on how I can find travel time using the latitude and longitude information of two different locations. Thank you!"
Before using the 'mqtime' command, I have installed all the necessary packages by following the instructions provided in the 'help mqtime' command.
To provide you with the latitude and longitude information of the starting and ending locations, I have used the 'dataex' command.
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. For more info, type help dataex clear input double(Start_longitude Start_latitude End_longitude End_latitude) 5.062018999999999 61.3467485 9.65035 65.37965 5.062018999999999 61.3467485 9.65035 65.37965 5.0893297 60.4618726 48.125 70.9375 5.0893297 60.4618726 -13.41665 53.50346 5.0893297 60.4618726 -12.91464 65.52053 end
Here is the command I used:
mqtime, start_x(Start_longitude) start_y(Start_latitude) end_x(End_longitude) end_y(End_latitude)
However, I encountered an issue where both the generated travel time and distance values are missing.
below using dataex- I provide you with what the travel time and travel distance look like.
------------------ copy up to and including the previous line ------------------
Listed 5 out of 5 observations
--------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. For more info, type help dataex clear input double(Start_longitude Start_latitude End_longitude End_latitude) float(travel_time distance fuelUsed) str9 service 5.062018999999999 61.3467485 9.65035 65.37965 . . . "HERE Maps" 5.062018999999999 61.3467485 9.65035 65.37965 . . . "HERE Maps" 5.0893297 60.4618726 48.125 70.9375 . . . "HERE Maps" 5.0893297 60.4618726 -13.41665 53.50346 . . . "HERE Maps" 5.0893297 60.4618726 -12.91464 65.52053 . . . "HERE Maps" end
Listed 5 out of 5 observations
My main issue is how to find "travel time". I managed to find distance using geodist command. However, the only means I have gotten to calculate travel time so far is "mqtime" command.
Could you please advise me on how to resolve this issue? I would greatly appreciate your assistance. Especially on how I can find travel time using the latitude and longitude information of two different locations. Thank you!"
Comment