datazoompuc/datazoom_social_Stata

Unable to use Census function for 2000 data

Closed this issue · 6 comments

End up with error right away saying: "v0103 not found"

Hi, this error has been reported before on #86. I ran the function on the data I already had on my computer and it worked fine.

I think the error is caused by the data not being read properly, and then the v0103 variable just doesn't exist. Could you share the code you are using or which states you're loading?

You should have all Domxx.txt, Pesxx.txt, or FAMIxx.txt files saved in the same folder for the function to read them properly, they can't be stored in folders inside that folder.

Thanks for your response. 2010 worked for me without any issues. Here is the code I am using for 2000:

datazoom_censo, years( 2000 ) ufs( RO AC AM RR PA AP TO MA PI CE RN PB PE AL SE BA MG ES RJ SP PR SC RS MS MT GO DF ) original(/home/ecco_rais/data/interwrk/ts724/Data/Census 2000/Raw) saving(/home/ecco_rais/data/interwrk/ts724/Data/Census 2000/Datazoom) all english

I have tried to reduce to a smaller number of states and had the same issue. The previous issue says that the issue is with paths but I used essentially the same paths for the 2010 data and it worked fine. And to confirm, yes I have all the files saved in the same folder and not within other folders.

Hi, I still couldn't reproduce the error. First I though it was because of the space in the path (the folder /Census 2000/), but I tried adding a space here and it still works. I've uploaded the data I'm using to a Google Drive folder. Please check if your data matches it.

If it still doesn't work, please follow the instructions at the bottom of this page to produce a log file that can show what exactly is causing the error.

Hi Igor, thanks for your help again. I downloaded your files, they are the same except for the fact that you have five fewer Pes files than I did. Upon running it again, I have the same error as before with your files. I am attaching the log you requested below, thanks!
datazoom_error.txt

Hi, thank you for sharing the logs and sorry for the delay, this is quite a tricky problem to debug. I did some testing and from the log, it seems that the problem is arising during

quietly cap infile using /tmp/St2735106.000003, using("/home/ecco_rais/data/interwrk/ts724/Data/Census_2000/Censo 2000/pes11.txt") clear

where the tempfile is a dictionary and the pes11.txt is the actual data. It can't read this file properly, which leads to problems down the road (because the quietly capture suppresses it for the moment).

If you may, I suggest you download this dictionary file. Then you can directly run

infile using path/to/censo2000pes_en.dct, using("/home/ecco_rais/data/interwrk/ts724/Data/Census_2000/Censo 2000/pes11.txt") clear

This should at least reveal what the actual error is, could be something wrong with the dictionary of with the .txt file. I tried downloading all the Census data from the IBGE website onto another PC and couldn't replicate the error.

Hi @ts724 ! I couldn't replicate your error either. I ran
datazoom_censo, years( 2000 ) ufs( DF ) original(C:\Users\laura\OneDrive\Laura\economia\pibic\dados censo 2000\DF) saving(C:\Users\laura\OneDrive\Laura\economia\pibic\dados censo 2000) all english
and everything worked smoothly. v0103 is indeed in the database. I just downloaded all the files from IBGE's website. There is nothing we can change on the code to help you, but please let us know if there is any other way we can assist you.