Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error message with travel time command

    Hi,

    I want to compute the travel time and distance between different points in a city (identified by an id variable and latitude+ longitude variables: lat and longi) and one central location (identified by latitude+ longitude variables: spd_lat and spd_long). After much research I found the traveltime command that seemed ideal for my requirements.

    When I run the travel time command, I get an error message

    traveltime, start_x(lat) start_y(longi) end_x(spd_lat) end_y(spd_long) mode(1) km
    file
    http://maps.google.com/maps?f=d&outp...33984,12.00102
    > 424621582&daddr=77.58755493164063,12.9743814468383 8&dirflg= not found
    r(601);


    Here is a sample of my dataset:

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input long id float(lat longitude spd_lat spd_long)
     20991 12.001024 77.70712 12.974381 77.58755
      2959 12.070302  77.5703 12.974381 77.58755
    162626 12.507794  77.5078 12.974381 77.58755
    159814  12.86992 77.65437 12.974381 77.58755
     16389 12.870568 77.65546 12.974381 77.58755
     22218 12.871995 77.65626 12.974381 77.58755
     19087 12.872005 77.67294 12.974381 77.58755
    275486  12.87487 77.67224 12.974381 77.58755
    194328 12.885044 77.63017 12.974381 77.58755
    226270 12.885414 77.63052 12.974381 77.58755
    169819 12.887903 77.65548 12.974381 77.58755
    182538 12.889082 77.58725 12.974381 77.58755
    224114  12.88909 77.58726 12.974381 77.58755
    274636 12.889285 77.65857 12.974381 77.58755
    201300   12.8904 77.63549 12.974381 77.58755
     41928  12.89126 77.46133 12.974381 77.58755
    151982  12.89156 77.47163 12.974381 77.58755
    290228 12.892353 77.61005 12.974381 77.58755
    240791  12.89277 77.62984 12.974381 77.58755
    289699  12.89277 77.62984 12.974381 77.58755
    end
    What am I doing wrong? Is this the correct command for my requirements or should I use another command? Thanks

  • #2
    Long story short: apparently the user-written traveltime command uses a Google API that no longer is supported by Google..

    At least two user-written alternatives appear to exist; I have no knowledge of geocoding and cannot evaluate their suitability for your task.
    1. osrmtime - run findit osrmtime but then see post #3 in
      https://www.statalist.org/forums/for...ps-information
    2. georoute - run findit georoute but then see the discussion at
      https://www.statalist.org/forums/for...eoroute-on-ssc

    Comment


    • #3
      Just salt in the wound, but most of the user-written (community-contributed) commands in this territory are highly vulnerable to changes in supplier habits.

      Comment


      • #4
        Thanks William and Nick. I am now using georoute and it works (at least for now).

        Comment


        • #5
          Originally posted by Nick Cox View Post
          Just salt in the wound, but most of the user-written (community-contributed) commands in this territory are highly vulnerable to changes in supplier habits.
          Nick is right, but I like to emphasize that OSRMTIME is not vulnerable because it is based on opensource software and these opensource-projects will continue.

          Comment


          • #6
            I've no axe to grind here, but I don't follow #5.

            Open source support continuing indefinitely is an empirical matter and contingent on people and their efforts.

            Stata is a mixture of proprietary software, as we know, and, pertinent here, a mass of user-contributed software additions that is -- with very few exceptions -- open with respect to code and free with respect to cost. (A few authors want money for their efforts, which is up to them and their customers.)

            It's not hard to find community-contributed commands abandoned by their creators. I am pointing no fingers here, as I document myself some of my own commands that are obsolete or superseded (in njc_stuff from SSC).
            Last edited by Nick Cox; 05 Nov 2019, 11:18.

            Comment

            Working...
            X