Announcement

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

  • Converting Eurostat data in Stata data


    Hi!

    I have this database:




    It has one table for each value of n_person, i.e., it has 6 tables.

    I want to convert this data format in panel data format. How can i do?

    Thanks for the attention.

  • #2
    Read in each worksheet as a separate dataset and reshape long Then append the datasets.
    Last edited by Nick Cox; 10 Apr 2016, 04:24.

    Comment


    • #3
      Hi Nick! I state that I began to use STATA for a short time. Could you be more explicit, please?
      My idea is to create a unique dataset in panel data format merging he tables.
      How do I implement this procedure in a single do.file?
      Thanks.
      Last edited by Ivan Nardini; 10 Apr 2016, 04:50.

      Comment


      • #4
        Sorry, but no.

        I can't easily be more explicit because you don't provide an example file I could use. Nor do you give precise references to where these files can be downloaded. A few people here might know just from the Eurostat reference, but this is an international, multidisciplinary forum and it's not a good idea to assume that everyone else does what you do.

        So, you really should not expect me to write a do file. (A contingent detail is that at the moment I don't have access to a recent version of Stata either.)

        I've named commands that should be useful for you. import excel or import delimited may be another, depending on what the files actually are.

        Please do read the FAQ Advice http://www.statalist.org/forums/help especially #12 and all the way up to #18.

        Comment


        • #5
          I'm sorry Nick, I did not want to be rude or presumptuous. I just did not understand your suggestion. My question was whether it was possible to write it in a single do.file. However, if you are still willing to help me out, this is the link with the database:

          http://ec.europa.eu/eurostat/en/web/...s/-/ILC_LVPH03

          The ultimate goal would be to reproduce this graph.

          http://ec.europa.eu/eurostat/statist...olds)_PF15.png


          Sorry again.

          Comment


          • #6
            I didn't think you were being rude, just a little unrealistic. Others may be able to push this forward today.

            Comment


            • #7
              Dear Ivan,

              The "new" command eurouse available at SSC might be useful for you. According to its description "eurouse automatically downloads and imports Eurostat datasets into Stata using the Eurostat bulk facility"

              Comment


              • #8
                Hi Enrique!
                Thanks for the advice.
                I will try.

                Comment


                • #9
                  It works only for Mac. Do you know any other solution?

                  Comment


                  • #10
                    The following command works fine on my Windows 8.? computer.
                    Code:
                    ssc install eurouse
                    Stata/MP 14.1 (64-bit x86-64)
                    Revision 19 May 2016
                    Win 8.1

                    Comment


                    • #11
                      Carole: You can install it on any OS. The problem is that the program bails out if the OS is not Macintosh. This isn't documented, so far as I can see (and that would be a good idea). It's the use of shell gzip which appears OS-specific.

                      Comment


                      • #12
                        Ah, got it! Thanks!
                        Stata/MP 14.1 (64-bit x86-64)
                        Revision 19 May 2016
                        Win 8.1

                        Comment


                        • #13
                          Anyway, I found the solution. Its name is getdata. I tried and it works. I post the link so anyone in need can use it. Thanks at all. To the next question
                          Downloadable! getdata imports data from several SDMX Data providers (OECD, EUROSTAT, ECB, IMF, ILO, ...) in raw, cross-sectional, time series or panel data structure using SDMX rest codes.

                          Comment


                          • #14
                            Hi Ivan!

                            Did getdata work well for you? Feedback for possible future improvements would be appreciated. (I don't know whether this is the place, but my email is in the help file).



                            Regarding its use for Eurostat data, it downloads data over SDMX, so it is restricted by Eurostat if you want to download an absurdly large amount of data with a single line of code, say a full dataset (can happen).



                            To bypass it, you can either partition your request into smaller pieces or use other ways, like downloading through the bulk (xteurostat, eurouse, ...). However, these methods have the disadvantage of requiring you to download the whole table, making it slow and download intensive.



                            Finally, if anyone has a user configuration for tapping into other data providers SDMX data warehouse please do share as these could be implemented as defaults.

                            Comment


                            • #15
                              Hi everyone,

                              I'm trying to use getdata code for downloading data from OECD. I read about "getdata code" from stata help. But the code below didn't work at all.


                              [getdata structure provider, rest(restcode) [geo(s1 [s2]) time(s1 [s2]) isocountrycodes(codetype) start(starttime) end(endtime) merge(1:1|1:m|m:1|m:m) replace update frequency(frequency) datemask(mask) varname(varname) set clear]

                              Could you help me, please?

                              Comment

                              Working...
                              X