Announcement

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

  • The same geoplot/geoframe code working in Windows while producing error messages in Mac

    Hi,

    first of all thank you for paying attention to the post.

    I have been using geoplot/geoframe for my research and recently I have started using Macbook pro.

    Then, I realized the same code for mapping does not work in Mac while it works without any issue in Windows.

    The following message is what I am getting in Mac.
    ---------------------------------------------------------------------------------------------
    . geoframe use worldmap

    (creating frame worldmap from worldmap.dta)

    (creating frame worldmap_shp from worldmap_shp.dta)



    Frame name: worldmap [make current]

    Frame type: attribute

    Feature type: <none>

    Number of obs: 281

    Unit ID: _ID

    Coordinates: _CX _CY

    Linked shape frame: worldmap_shp

    . geoframe describe worldmap_shp

    Frame name: worldmap_shp [make current]

    Frame type: shape

    Feature type: <none>

    Number of obs: 8,270,167

    Unit ID: _ID

    Coordinates: _X _Y

    Within-unit sort ID: shape_order



    . merge 1:1 countryname using `export_oea'

    no variables defined

    r(111);

    end of do-file

    r(111);

    ---------------------------------------------------------------------------------------------

    However, when I run the same code in windows, I am getting

    . geoframe create worldmap
    (reading shapes from worldmap_shp.dta)
    (4,942 observations in frame worldmap_shp unmatched)
    (dropped 4,942 unmatched observations in frame worldmap_shp)
    (link to frame worldmap_shp added)
    (current frame now worldmap)

    Frame name: worldmap
    Frame type: unit
    Feature type: <none>
    Number of obs: 281
    Unit ID: _ID
    Coordinates: _CX _CY
    Area: <none>
    Linked shape frame: worldmap_shp

    . geoframe describe worldmap_shp

    Frame name: worldmap_shp
    Frame type: shape
    Feature type: <none>
    Number of obs: 8,265,225
    Unit ID: _ID
    Coordinates: _X _Y
    Within-unit sort ID: shape_order
    Within-unit polygon ID: <none>
    Plot level ID: <none>

    . merge 1:1 countryname using `export_oea'

    Result Number of obs
    -----------------------------------------
    Not matched 267
    from master 267 (_merge==1)
    from using 0 (_merge==2)

    Matched 14 (_merge==3)

    I have found only difference that when geoframe create begins Windows Stata actually reads the shapefile stored in the same folder as do while
    Mac Stata tries to create the shape files.

    Is there anyone who knows why I am encountering this issue? It is just hard to understand that it works in one computer but not in the other.

    Thank you in advance for your kind help and attention.

    Best,




  • #2
    This might be because you are using different version of geoplot on the two computers. At some point default behavior with respect to whether created frames are made current or not changed. Type

    Code:
    geoframe use worldmap, current
    or

    Code:
    frame worldmap: merge 1:1 countryname using `export_oea'
    to make your code run.
    ben

    Comment


    • #3
      Hi Ben Jann !

      Thank you so much! After typing the code, the code works perfectly and creates the maps precisely as I expected!

      It seems like Stata mac version requires specifying the geoframe unlike the windows. Thank you so much! It is really helpful!

      Comment


      • #4
        Behavior of geoplot/geoframe should be the same on Windows and Mac, as long as you used the same version of the geoplot package on both systems. ben

        Comment

        Working...
        X