Announcement

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

  • New package georoute on SSC

    Dear all,

    Thanks to Kit Baum, a new package georoute is now available for download from SSC. In Stata, type ssc install georoute to install it.
    The georoute package allows to compute travel distance and travel time between two points defined by their addresses or their geographical coordinates. The package contains a "full command" georoute, an immediate command georoutei, and their accompanying help file.
    The purpose of the package is similar to that of existing commands such as traveltime, traveltime3, mqtime, and osrmtime. The first 3 commands are however deprecated, while osrmtime only allows the user to start from geographical coordinates. georoute should thus be useful to researchers who want to compute travel distance between pairs of addresses.

    Best wishes,

    Sylvain

    georoute calculates the georouting distance between two
    addresses or two geographical points identified by their
    coordinates. It uses the HERE API (see
    https://developer.here.com) to retrieve distances in two steps.
    In the first step, addresses are geocoded and their geographical
    coordinates (latitude and longitude) are obtained. In the second
    step, the georouting distance between the two points is obtained.
    The user can also directly provide geographical coordinates,
    which will bypass the first step.

    KW: geography
    KW: distance
    KW: travel time
    KW: geocoding

    Requires: Stata version 11 and insheetjson, libjson from SSC (q.v.)

    Distribution-Date: 20161101

    Author: Sylvain Weber, University of Neuchâtel, Institute of Economic Research
    Support: email sylvain.weber@unine.ch

    Author: Martin Péclat, University of Neuchâtel, Institute of Economic Research
    Support: email martin.peclat@unine.ch


  • #2
    Are these distances as the crow flies, or more google maps-style?

    Comment


    • #3
      Hi Jesse,

      Thanks for your question. The distances computed by georoute are travel distances, i.e. how much you would have to drive to go from point A to point B (or if you prefer google maps-style, but note that the API used by georoute is the HERE API and not the Google API).
      Geodetic (straight line) distances could be obtained by a command such as geodist (from SSC). You can compare the outcome of these two commands for example as follows:
      Code:
      clear
      input str30 place1 str30 place2
      "Paris, France" "Berlin, Germany"
      "Rome, Italy" "Moscow, Russia"
      end
      georoute, hereid(INSERT_YOUR_APP_ID) herecode(INSERT_YOUR_APP_CODE) startad(place1) endad(place2) km coordinates(place1 place2)
      geodist place1_x place1_y place2_x place2_y, gen(linear_distance)
      l place1 place2 travel_distance linear_distance
      You can then check that travel distance is different from (and obviously larger than) geodetic distance in any case.
      I hope this helps.

      Best,

      Sylvain

      Comment


      • #4
        Wow, that's quite frankly amazing! I've often thought it'd be useful to such travel distance exercises, but always stayed away from it because it'd be extremely time consuming.

        Comment


        • #5
          Hello Sylvain,

          Thank you and Martin for this command! I have questions about the use of and your experiences with the HERE account:
          1. What happens (or what have you done) after the 90-day trial period? On HERE's developer site, it looks like there's a basic developer account allowing 15K requests / month; can pay for an account with more monthly requests.
          2. How does HERE define (or calculate) "normal traffic conditions"?
          3. Any idea if the HERE API will be changed in the near future?
          Best, Patrick

          Comment


          • #6
            Dear Patrick,

            Thank you for your questions and sorry for the late reply.
            1. In our experience, it is possible to reactivate a new 90-day free trial once it expires, using the same HERE account. But if you choose to subscribe to any other HERE plan, the command should also work.
            2. Concerning the "normal traffic conditions", we cannot say much more than this I believe. The related HERE documentation is here : https://developer.here.com/documenta...e-summary.html. The attribute in question is "BaseTime". When we wrote “under normal traffic conditions”, we simply wanted to be intuitive. There is no exact way to formulate that I think.
            3. georoute is indeed vulnerable to change in the HERE API, and we cannot guarantee that it will still work in the future. I’m not sure if this is reassuring or not, but georoute is now working since nearly two years.
            I hope this helps.
            Best,
            Martin

            Comment


            • #7
              Dear all,

              Right now, I am having a problem when I run the command georoute. It does not work, generating the following message: <istmt>: 3499 libjson not found r(3499);
              Even when I installed libjson, georoute is still not working, presenting the same error message.
              How can I solve this problem?

              Thank you for your help.
              Best regards,
              Cristian

              Comment


              • #8
                Dear Cristian,

                It's a bit difficult to guess what happened with the information you provide.
                Have you installed both -libjson- and -insheetjson- as requested by -georoute-? It's certainly worth to update these two packages anyway:
                Code:
                ssc install insheetjson, replace
                ssc install libjson, replace
                and then retry to run -georoute-.

                Best,

                Sylvain

                Comment

                Working...
                X