Announcement

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

  • From 7z to dta and Error r(610)

    I'm supposed to work on a data file that I'm able to get from this link https://ec.europa.eu/eurostat/estat-...Ffull202052.7z, to prepare a presentation. However, the file is 7.z and I tried to convert it to a .dta file to be able to analyse it in STATA. Is there an easy way to do this? I did it on an online converter, but Stata is not able to read it, when I use a simple
    Code:
    use "C:\Users\csi\OneDrive - Novo Locus\AN2022\full202052.dta"
    after the conversion.

    I tried
    Code:
    hexdump full202052.dta
    to see how data looks even if it is mistankenly noted as a Stata file. The output looks very strange:
    2f76bcf0 | 3030 302c 3035 2c32 2c31 2c2c 3230 3230 | 000,05,2,1,,2020
    | |
    2f76bd00 | 3532 2c34 3833 3932 3333 332c 3131 3730 | 52,48392333,1170
    2f76bd10 | 3132 3539 302c 300d 0a36 3030 2c43 592c | 12590,0..600,CY,
    2f76bd20 | 3039 3531 2c51 522c 492c 3939 4242 4230 | 0951,QR,I,99BBB0
    2f76bd30 | 3030 2c39 3331 3139 2c42 4242 422c 4242 | 00,93119,BBBB,BB
    | |
    2f76bd40 | 4242 2c42 4242 422c 3730 302c 3931 3030 | BB,BBBB,700,9100
    2f76bd50 | 3030 2c32 312c 322c 312c 2c32 3032 3035 | 00,21,2,1,,20205
    2f76bd60 | 322c 3432 3030 3138 352c 3439 3031 3130 | 2,4200185,490110
    2f76bd70 | 2c30 0d0a 3630 302c 4359 2c30 3935 312c | ,0..600,CY,0951,

    Hope you can help.

    Clara

  • #2
    I did it on an online converter,...
    This can mean anything. Please be specific.

    The file that you linked contains a compressed data file in CSV format, which can be imported to Stata with the -insheet- command. See help insheet (or import delimited, if you wish).

    Best, Sergiy


    Click image for larger version

Name:	7z.png
Views:	1
Size:	30.3 KB
ID:	1645767

    Comment


    • #3
      Thank you Sergiy! However, I'm still not quite sure how to do this?
      If I press the link it automatically download an 7 zip file.

      I tried using
      Code:
      insheet using full202052.7z
      , however, this might not be what you meant?

      Comment


      • #4
        "7z" is a format associated with the free and widely (but by no means universally) used 7zip compression software. You need to use it to decompress your 7z file into a CSV before trying to import that into Stata. Recognizing and handling all sorts of compression formats is not what most people would regard as the job of a program like Stata. While I suppose there may be other programs that can handle the 7z format, you can obtain the 7zip software at https://www.7-zip.org/.

        Comment

        Working...
        X