Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use Census function for 2000 data #119

Open
ts724 opened this issue Jun 24, 2024 · 5 comments
Open

Unable to use Census function for 2000 data #119

ts724 opened this issue Jun 24, 2024 · 5 comments

Comments

@ts724
Copy link

ts724 commented Jun 24, 2024

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

@IgorRigolon
Copy link
Contributor

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.

@ts724
Copy link
Author

ts724 commented Jun 24, 2024

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.

@IgorRigolon
Copy link
Contributor

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.

@ts724 ts724 closed this as completed Jul 3, 2024
@ts724 ts724 reopened this Jul 3, 2024
@ts724
Copy link
Author

ts724 commented Jul 3, 2024

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

@IgorRigolon
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants