Announcement

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

  • Geoinpoly

    Hi all -

    I'm hoping to get help with using geoinpoly. I have two datasets, the first is "lat_long.dta" and has the latitude/longitude coordinates for the home addresses of patients in a database. It has three columns: patient ID, latitude, and longitude. The second dataset, "cbg_fips.dta," was created by appending the census block group shapefiles for all US states from census.gov. The columns are: _ID, _CX, _CY, STATEPF, COUNTYPF, TRACTCE, BLKGRPCE, AFFGEOID, GEOID, NAME, LSAD, ALAND, AWATER.

    I am hoping to generate the census block group FIPS code for each lat/long pair using geoinpoly. I ultimately need to create a dataset with patient ID and GEOID. I am struggling to figure out the code to accomplish this. Appreciate any help. Thank you so much!

  • #2
    I have only occasionally worked with geolocated data, but -geoinpoly- (a user-written module, available at -ssc-) has good documentation and *perhaps* I or someone else can point you in the right direction. To that end, I have several suggestions:

    1) While you can't very well post a -dataex- example of the block group shape file, given its size, helping you would be much easier if we knew what the variables in that file are. Among other things, many (most?) of the participants on this list aren't U.S. residents aren't going to know what a FIPS code is and that it's (I presume) what the GEOID holds. To that end, showing the output of the -describe- command along with a short description of each variable would be helpful.

    2) Try running one of the examples shown in the help file for -geoinpoly-, which is what I would do to become more familiar with how this command works. Perhaps you have done this.

    3) Have you tried running any code yet with your data files? If so, show it to us along with any error messages you received.

    Comment


    • #3
      Hi Sophia Hayes, were you able to find a solution? I need to do the same thing and I'm struggling to do so. Thank you!

      Comment

      Working...
      X