Announcement

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

  • How to Create Maps in Stata

    Hi All,

    I am trying to use the data attached to create 2 maps in Stata. Data is comprised of 2 variables, student zip codes (HOMEZIP) and student types (StudentType). I would like to "map" zip codes as dots onto the state of Texas to see whether student locations cluster. I would like to do this for 2 student types, gtex students in gtex.dta and TCEDH students in tcedh.dta. What are the commands necessary to construct these 2 maps (again, just zip-code-based dots mapped onto the state of Texas)? Here are links to my data (I was not able to upload them into Statalist):

    https://drive.google.com/file/d/0Bz-...ew?usp=sharing

    https://drive.google.com/file/d/0Bz-...ew?usp=sharing

    Thanks in advance,

    Adam



  • #2
    Hello Adam,

    Welcome to the Stata Forum/Statalist.

    At least in the computer I have in the office, I cannot open the link you provided. . What is more, with regards to graphics, please follow the instructions available in the FAQ.

    Also, you may share data, since it seems you .dta file, by using the CODE delimiters or installing the SSC dataex.

    Finally, I hope this article .plus this one will interest you.
    Last edited by Marcos Almeida; 02 Mar 2017, 11:32.
    Best regards,

    Marcos

    Comment


    • #3
      Thank you for replying to my post, Marcos. I have reattached one data set as a MS Excel file. It contains two variables, "home" for home zip codes and "type" for student type. If I can see how to do this for one dataset, it would be very helpful. Thank you so much in advance if you can show me how to do this and again for your reply.

      Best,
      Adam
      Attached Files

      Comment


      • #4
        Hello Adam,

        I have experience with spatial analysis, but I haven't much practice with zip codes.

        Maybe you will get further advice from member with expertise on this topic.

        That said, I believe the articles I shared will provide the information you are longing for. Anyway, you should try it out for yourself as well. Shall difficulties appear, you can share it in this forum.

        Finally, when I suggested to take a look at the FAQ, I meant it, really. The fact that you shared a .xlsx sparked me the "instinctive" fear that, perhaps, you haven't yet perused the FAQ, in spite of so many advantages of doing it.
        Best regards,

        Marcos

        Comment


        • #5
          Hi Marcos,

          I will study the FAQ in more detail before reposting my question using dataex. I will also spend a little time with both articles... That said, fingers crossed that someone might be able to give a fast response. Thanks for the direction! :-)

          Best,
          Adam

          Comment


          • #6
            Hello Adam,

            To share data, you may also use the CODE delimiters. Just click on the "A" button, above to the left. Again, select "#". You will see that "[CODE][CODE]" will apper in the message. Between each "[CODE]", write (or paste) your command and the data. Logically, depending on the data set, you are supposed to select a fraction of it.

            Hopefully that helps.
            Last edited by Marcos Almeida; 03 Mar 2017, 03:17.
            Best regards,

            Marcos

            Comment


            • #7
              Hi Marcos,

              Again, thank you for your guidance. Quick question... You stated that it is possible to share data using "[CODE][CODE]" - did you mean the raw data itself, or a data file? If you are referring to the raw data, how should I insert it in between "[CODE][CODE]"? Should I copy and paste from the Stata results window after the "list" command, or copy and paste out of MS Excel or Stata itself? Finally, do you know whether Statalist will allow users to upload small .dta datasets in the future? It just seems like it would be so much easier than selecting a small sample from a sample, especially if the results of a particular analysis are very sensitive to sample size.

              Any further guidance would be very much appreciated.

              Thanks,
              Adam

              Comment

              Working...
              X