lucasmation / microdadosBrasil

Reads most common Brazilian public microdata (CENSO, PNAD, etc) easy and fast
163 stars 59 forks source link

Troubles with RAIS #164

Closed cdshikida1 closed 6 years ago

cdshikida1 commented 6 years ago

Hi, First, thanks for the awesome package.

I just tried to replicate the example of RAIS (tried 2002, 2000 or 2013, same result).

The message:

RAIS

It will download files for all states and the selected year

download_sourceData("RAIS", i="2013") Error in download_sourceData("RAIS", i = "2013") : Invalid dataset. Must be one of the following: cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi

Actually, I dont' know what happened. My user name in laptop is cdshi_000, maybe it's some confusion with it. Any help would be welcome. Thanks Claudio

lucasmation commented 6 years ago

That is very weird.

What OS are you using? What R.Version()? What is the result of sessioninfo()?

Em 25 de mar de 2018 9:57 PM, "cdshikida1" notifications@github.com escreveu:

Hi, First, thanks for the awesome package.

I just tried to replicate the example of RAIS (tried 2002, 2000 or 2013, same result).

The message:

RAIS

It will download files for all states and the selected year

download_sourceData("RAIS", i="2013") Error in download_sourceData("RAIS", i = "2013") : Invalid dataset. Must be one of the following: cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi

Actually, I dont' know what happened. My user name in laptop is cdshi_000, maybe it's some confusion with it. Any help would be welcome. Thanks Claudio

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lucasmation/microdadosBrasil/issues/164, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXDiHvwQLZ0tKMP_gtJJnphebtSF7HWks5tiDzogaJpZM4S6Y5a .

lucasmation commented 6 years ago

Also: do you have rtools installed?

Em seg, 26 de mar de 2018 06:24, Lucas Ferreira Mation < lucasmation@gmail.com> escreveu:

That is very weird.

What OS are you using? What R.Version()? What is the result of sessioninfo()?

Em 25 de mar de 2018 9:57 PM, "cdshikida1" notifications@github.com escreveu:

Hi, First, thanks for the awesome package.

I just tried to replicate the example of RAIS (tried 2002, 2000 or 2013, same result).

The message:

RAIS

It will download files for all states and the selected year

download_sourceData("RAIS", i="2013") Error in download_sourceData("RAIS", i = "2013") : Invalid dataset. Must be one of the following: cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi

Actually, I dont' know what happened. My user name in laptop is cdshi_000, maybe it's some confusion with it. Any help would be welcome. Thanks Claudio

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lucasmation/microdadosBrasil/issues/164, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXDiHvwQLZ0tKMP_gtJJnphebtSF7HWks5tiDzogaJpZM4S6Y5a .

cdshikida1 commented 6 years ago

rtools? (is it a library? Let me check. )

Mine is Windows 10, updated, legal, etc. Last R, last Rstudio. Both updated Session:

sessionInfo() R version 3.4.4 (2018-03-15) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C

[5] LC_TIME=English_United States.1252

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] microdadosBrasil_0.0.0.9000

loaded via a namespace (and not attached): [1] Rcpp_0.12.16 dplyr_0.7.4 assertthat_0.2.0 [4] bitops_1.0-6 R6_2.2.2 magrittr_1.5 [7] pillar_1.2.1 stringi_1.1.7 rlang_0.2.0 [10] data.table_1.10.4-3 bindrcpp_0.2 tools_3.4.4 [13] stringr_1.3.0 readr_1.1.1 glue_1.2.0 [16] RCurl_1.95-4.10 hms_0.4.2 yaml_2.1.18 [19] compiler_3.4.4 pkgconfig_2.0.1 bindr_0.1.1 [22] tibble_1.4.2

Obrigado / Thanks for your time and attention.

Claudio D. Shikida

Esta mensagem pode conter informação confidencial e/ou privilegiada. Se você não for o destinatário ou a pessoa autorizada a receber esta mensagem, não poderá usar, copiar ou divulgar as informações nela contidas ou tomar qualquer ação baseada nessas informações. Se você recebeu esta mensagem por engano, por favor avise imediatamente o remetente, respondendo o presente e-mail e apague-o em seguida. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message.

On Mon, Mar 26, 2018 at 6:26 AM, lucasmation notifications@github.com wrote:

Also: do you have rtools installed?

Em seg, 26 de mar de 2018 06:24, Lucas Ferreira Mation < lucasmation@gmail.com> escreveu:

That is very weird.

What OS are you using? What R.Version()? What is the result of sessioninfo()?

Em 25 de mar de 2018 9:57 PM, "cdshikida1" notifications@github.com escreveu:

Hi, First, thanks for the awesome package.

I just tried to replicate the example of RAIS (tried 2002, 2000 or 2013, same result).

The message:

RAIS

It will download files for all states and the selected year

download_sourceData("RAIS", i="2013") Error in download_sourceData("RAIS", i = "2013") : Invalid dataset. Must be one of the following: cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi

Actually, I dont' know what happened. My user name in laptop is cdshi_000, maybe it's some confusion with it. Any help would be welcome. Thanks Claudio

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lucasmation/microdadosBrasil/issues/164, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXDiHvwQLZ0tKMP_ gtJJnphebtSF7HWks5tiDzogaJpZM4S6Y5a .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lucasmation/microdadosBrasil/issues/164#issuecomment-376102895, or mute the thread https://github.com/notifications/unsubscribe-auth/AGtlLNHhVCIlGz_Poi_9Ub_wn45moFXxks5tiLQ9gaJpZM4S6Y5a .

cdshikida1 commented 6 years ago

About rtools: It wasn't, and....

install.packages("rtools") Installing package into ‘C:/Users/cdshi_000/Documents/R/win-library/3.4’ (as ‘lib’ is unspecified) Warning in install.packages : package ‘rtools’ is not available (for R version 3.4.4)

Obrigado / Thanks for your time and attention.

Claudio D. Shikida

Esta mensagem pode conter informação confidencial e/ou privilegiada. Se você não for o destinatário ou a pessoa autorizada a receber esta mensagem, não poderá usar, copiar ou divulgar as informações nela contidas ou tomar qualquer ação baseada nessas informações. Se você recebeu esta mensagem por engano, por favor avise imediatamente o remetente, respondendo o presente e-mail e apague-o em seguida. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message.

On Mon, Mar 26, 2018 at 7:35 AM, Claudio Shikida cdshikida@gmail.com wrote:

rtools? (is it a library? Let me check. )

Mine is Windows 10, updated, legal, etc. Last R, last Rstudio. Both updated Session:

sessionInfo() R version 3.4.4 (2018-03-15) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C

[5] LC_TIME=English_United States.1252

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] microdadosBrasil_0.0.0.9000

loaded via a namespace (and not attached): [1] Rcpp_0.12.16 dplyr_0.7.4 assertthat_0.2.0 [4] bitops_1.0-6 R6_2.2.2 magrittr_1.5 [7] pillar_1.2.1 stringi_1.1.7 rlang_0.2.0 [10] data.table_1.10.4-3 bindrcpp_0.2 tools_3.4.4 [13] stringr_1.3.0 readr_1.1.1 glue_1.2.0 [16] RCurl_1.95-4.10 hms_0.4.2 yaml_2.1.18 [19] compiler_3.4.4 pkgconfig_2.0.1 bindr_0.1.1 [22] tibble_1.4.2

Obrigado / Thanks for your time and attention.

Claudio D. Shikida

Esta mensagem pode conter informação confidencial e/ou privilegiada. Se você não for o destinatário ou a pessoa autorizada a receber esta mensagem, não poderá usar, copiar ou divulgar as informações nela contidas ou tomar qualquer ação baseada nessas informações. Se você recebeu esta mensagem por engano, por favor avise imediatamente o remetente, respondendo o presente e-mail e apague-o em seguida. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message.

On Mon, Mar 26, 2018 at 6:26 AM, lucasmation notifications@github.com wrote:

Also: do you have rtools installed?

Em seg, 26 de mar de 2018 06:24, Lucas Ferreira Mation < lucasmation@gmail.com> escreveu:

That is very weird.

What OS are you using? What R.Version()? What is the result of sessioninfo()?

Em 25 de mar de 2018 9:57 PM, "cdshikida1" notifications@github.com escreveu:

Hi, First, thanks for the awesome package.

I just tried to replicate the example of RAIS (tried 2002, 2000 or 2013, same result).

The message:

RAIS

It will download files for all states and the selected year

download_sourceData("RAIS", i="2013") Error in download_sourceData("RAIS", i = "2013") : Invalid dataset. Must be one of the following: cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi

Actually, I dont' know what happened. My user name in laptop is cdshi_000, maybe it's some confusion with it. Any help would be welcome. Thanks Claudio

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lucasmation/microdadosBrasil/issues/164, or mute the thread https://github.com/notifications/unsubscribe-auth/ ABXDiHvwQLZ0tKMP_gtJJnphebtSF7HWks5tiDzogaJpZM4S6Y5a .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lucasmation/microdadosBrasil/issues/164#issuecomment-376102895, or mute the thread https://github.com/notifications/unsubscribe-auth/AGtlLNHhVCIlGz_Poi_9Ub_wn45moFXxks5tiLQ9gaJpZM4S6Y5a .

lucasmation commented 6 years ago

Rtools is a separate software you install to give Linux like capabilities (compiling C code, unziping weird files, etc) to Windows.

http://cran.us.r-project.org/bin/windows/Rtools/

Please try installing it and try the package again.

We made Rtools a requirement of microdadosBrasil in order to deal with .rar and .7z files that some data providers use. But at the minimum we should throw and error if Rtools is not installed and update the readme. (I may remove this weird out of R dependency, the downside will be losing unziping support..)

Em seg, 26 de mar de 2018 07:37, cdshikida1 notifications@github.com escreveu:

About rtools: It wasn't, and....

install.packages("rtools") Installing package into ‘C:/Users/cdshi_000/Documents/R/win-library/3.4’ (as ‘lib’ is unspecified) Warning in install.packages : package ‘rtools’ is not available (for R version 3.4.4)

Obrigado / Thanks for your time and attention.

Claudio D. Shikida

Esta mensagem pode conter informação confidencial e/ou privilegiada. Se você não for o destinatário ou a pessoa autorizada a receber esta mensagem, não poderá usar, copiar ou divulgar as informações nela contidas ou tomar qualquer ação baseada nessas informações. Se você recebeu esta mensagem por engano, por favor avise imediatamente o remetente, respondendo o presente e-mail e apague-o em seguida. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message.

On Mon, Mar 26, 2018 at 7:35 AM, Claudio Shikida cdshikida@gmail.com wrote:

rtools? (is it a library? Let me check. )

Mine is Windows 10, updated, legal, etc. Last R, last Rstudio. Both updated Session:

sessionInfo() R version 3.4.4 (2018-03-15) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C

[5] LC_TIME=English_United States.1252

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] microdadosBrasil_0.0.0.9000

loaded via a namespace (and not attached): [1] Rcpp_0.12.16 dplyr_0.7.4 assertthat_0.2.0 [4] bitops_1.0-6 R6_2.2.2 magrittr_1.5 [7] pillar_1.2.1 stringi_1.1.7 rlang_0.2.0 [10] data.table_1.10.4-3 bindrcpp_0.2 tools_3.4.4 [13] stringr_1.3.0 readr_1.1.1 glue_1.2.0 [16] RCurl_1.95-4.10 hms_0.4.2 yaml_2.1.18 [19] compiler_3.4.4 pkgconfig_2.0.1 bindr_0.1.1 [22] tibble_1.4.2

Obrigado / Thanks for your time and attention.

Claudio D. Shikida

Esta mensagem pode conter informação confidencial e/ou privilegiada. Se você não for o destinatário ou a pessoa autorizada a receber esta mensagem, não poderá usar, copiar ou divulgar as informações nela contidas ou tomar qualquer ação baseada nessas informações. Se você recebeu esta mensagem por engano, por favor avise imediatamente o remetente, respondendo o presente e-mail e apague-o em seguida. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message.

On Mon, Mar 26, 2018 at 6:26 AM, lucasmation notifications@github.com wrote:

Also: do you have rtools installed?

Em seg, 26 de mar de 2018 06:24, Lucas Ferreira Mation < lucasmation@gmail.com> escreveu:

That is very weird.

What OS are you using? What R.Version()? What is the result of sessioninfo()?

Em 25 de mar de 2018 9:57 PM, "cdshikida1" notifications@github.com escreveu:

Hi, First, thanks for the awesome package.

I just tried to replicate the example of RAIS (tried 2002, 2000 or 2013, same result).

The message:

RAIS

It will download files for all states and the selected year

download_sourceData("RAIS", i="2013") Error in download_sourceData("RAIS", i = "2013") : Invalid dataset. Must be one of the following: cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi

Actually, I dont' know what happened. My user name in laptop is cdshi_000, maybe it's some confusion with it. Any help would be welcome. Thanks Claudio

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lucasmation/microdadosBrasil/issues/164, or mute the thread https://github.com/notifications/unsubscribe-auth/ ABXDiHvwQLZ0tKMP_gtJJnphebtSF7HWks5tiDzogaJpZM4S6Y5a .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/lucasmation/microdadosBrasil/issues/164#issuecomment-376102895 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AGtlLNHhVCIlGz_Poi_9Ub_wn45moFXxks5tiLQ9gaJpZM4S6Y5a

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lucasmation/microdadosBrasil/issues/164#issuecomment-376122218, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXDiAEIGQR8oeEXubdBQopAdp2KU3Jaks5tiMTRgaJpZM4S6Y5a .

cdshikida1 commented 6 years ago

Well, just did it. This time, not on RStudio (and after installing the Rtools). After a precautionary reboot, this is, still, the output. If you need more information, just let me know.

library(microdadosBrasil)

It will download files for all states and the selected year

download_sourceData("RAIS", i = "2000") Error in download_sourceData("RAIS", i = "2000") : Invalid dataset. Must be one of the following: cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi

To import data from all UFs in a single data.frame

d<- read_RAIS('vinculos', i = 2000) You haven't specified neither the 'root_path' nor ther 'file' parameters to the function. in this case we will assume that data is in your working directory and the files are named exactly as they have been downloaded from the source.

Error in read_data(dataset = "RAIS", ft = ft, i = i, metadata = metadata, : RAIS is not a valid dataset. Available datasets are: cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi, cdshi

nicolassoarespinto commented 6 years ago

@lucasmation It is likely a bug at the function: get_available_datasets()

The same documented at https://github.com/lucasmation/microdadosBrasil/pull/161. I remember to quickly test the PR when it was submitted and note that the change would really fix the problem for users using the package in Linux with the package installed but it would break for another use case( I am not sure but I think is Windows using the package with devtools).

I can't dig into the function now but could give some assistance ( if needed) to whoever is working on this. It is actually pretty simple, just modify and test get_available_datasets() to make sure it works in all possible environments. The possibilities are: Linux/Windows X Devel(Using the R-Project and devtools)/Installed package.

cdshikida1 commented 6 years ago

Well, I hope I could use it soon. Thanks!

Obrigado / Thanks for your time and attention.

Claudio D. Shikida

Esta mensagem pode conter informação confidencial e/ou privilegiada. Se você não for o destinatário ou a pessoa autorizada a receber esta mensagem, não poderá usar, copiar ou divulgar as informações nela contidas ou tomar qualquer ação baseada nessas informações. Se você recebeu esta mensagem por engano, por favor avise imediatamente o remetente, respondendo o presente e-mail e apague-o em seguida. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message.

On Mon, Mar 26, 2018 at 4:16 PM, Nícolas Pinto notifications@github.com wrote:

@lucasmation https://github.com/lucasmation It is likely a bug at the function: get_available_datasets()

The same documented at #161 https://github.com/lucasmation/microdadosBrasil/pull/161. I remember to quickly test the PR when it was submitted and note that the change would really fix the problem for users using the package in Linux with the package installed but it would break for another use case( I am not sure but I think is Windows using the package with devtools).

I can't dig into the function now but could give some assistance ( if needed) to whoever is working on this. It is actually pretty simple, just modify and test get_available_datasets() to make sure it works in all possible environments. The possibilities are: Linux/Windows X Devel(Using the R-Project and devtools)/Installed package.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lucasmation/microdadosBrasil/issues/164#issuecomment-376280000, or mute the thread https://github.com/notifications/unsubscribe-auth/AGtlLNM8mJxDFojW-l9lemL32s8aJx0Jks5tiT54gaJpZM4S6Y5a .

lucasmation commented 6 years ago

@nicolassoarespinto , valeu! Ta muito fácil esta EPGE!, vai estudar...

Related to this topic, one option would be to remove the Rtools dependency and have users manually unzip the files. I sent the email below to the R-help mailing list, hoping to get advise from the R gods. Let's see what the suggest

2018-03-29 10:56 GMT-03:00 Lucas Ferreira Mation <lucasmation@gmail.com>:
I created this package, 

https://github.com/lucasmation/microdadosBrasil 

which we are preparing for Cran submission. The package facilitates downloading and reading most of the microdatasets (household surveys, Census, etc). For each dataset it:

(a) downloads the data from  the data providers
(b) "unzip" the necessary files
(c) imports the data into R.

For  (b), some of the datasets come in .7z and .rar format which ideally the package should unzip (or whatever the correct them for uncompacting these file types is) so that the underlying .txt or .csv files can be imported into R. 

Not being able to find a solution within R (R only deals with .zip files), we added a Rtools dependency, in order to use Rtools expanded unzipping capabilities on the .7z and .rar  files.

Is adding a Rtools dependency a bad practice for an R package? Is it even allowed by cran? I mean, it changes requires the installation of a  standalone software (Rtools), which does not seem very user-friendly. 

Is there any alternative for unzipping .rar and .7z files that only depends on R packages and works independently of the OS, etc?

If the Rtools is a big problem, I could also revert to our initial strategy that did not support .7z and .rar "unzipping", requesting the user to manually unpack those files.   

regards
Lucas
lucasmation commented 6 years ago

Answering my own questions, this may be the asnwer:

https://stackoverflow.com/questions/16096192/how-to-programmatically-extract-or-unzip-a-7z-7-zip-file-with-r

cdshikida1 commented 6 years ago

I will give it a try, thanks

On Thu, Mar 29, 2018, 11:08 lucasmation notifications@github.com wrote:

Answering my own questions, this may be the asnwer:

https://stackoverflow.com/questions/16096192/how-to-programmatically-extract-or-unzip-a-7z-7-zip-file-with-r

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lucasmation/microdadosBrasil/issues/164#issuecomment-377247074, or mute the thread https://github.com/notifications/unsubscribe-auth/AGtlLPE61uZNCCB8D_Lc7UZf6htoP-rkks5tjOrygaJpZM4S6Y5a .

lucasmation commented 6 years ago

No, I meant that will be part of the solution we will use in micrdadosBrasil. If you unzip the files yourself it will be difficult for you to use the package

2018-03-29 11:16 GMT-03:00 cdshikida1 notifications@github.com:

I will give it a try, thanks

On Thu, Mar 29, 2018, 11:08 lucasmation notifications@github.com wrote:

Answering my own questions, this may be the asnwer:

https://stackoverflow.com/questions/16096192/how-to- programmatically-extract-or-unzip-a-7z-7-zip-file-with-r

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lucasmation/microdadosBrasil/ issues/164#issuecomment-377247074, or mute the thread https://github.com/notifications/unsubscribe-auth/AGtlLPE61uZNCCB8D_ Lc7UZf6htoP-rkks5tjOrygaJpZM4S6Y5a .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lucasmation/microdadosBrasil/issues/164#issuecomment-377249381, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXDiHmawMGjjIaIuUAaoos7Jd5MGTy9ks5tjOy7gaJpZM4S6Y5a .

cdshikida1 commented 6 years ago

Ahhhh ok. Still waiting for RAIS :)

On Thu, Mar 29, 2018, 11:29 lucasmation notifications@github.com wrote:

No, I meant that will be part of the solution we will use in micrdadosBrasil. If you unzip the files yourself it will be difficult for you to use the package

2018-03-29 11:16 GMT-03:00 cdshikida1 notifications@github.com:

I will give it a try, thanks

On Thu, Mar 29, 2018, 11:08 lucasmation notifications@github.com wrote:

Answering my own questions, this may be the asnwer:

https://stackoverflow.com/questions/16096192/how-to- programmatically-extract-or-unzip-a-7z-7-zip-file-with-r

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lucasmation/microdadosBrasil/ issues/164#issuecomment-377247074, or mute the thread https://github.com/notifications/unsubscribe-auth/AGtlLPE61uZNCCB8D_ Lc7UZf6htoP-rkks5tjOrygaJpZM4S6Y5a .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/lucasmation/microdadosBrasil/issues/164#issuecomment-377249381 , or mute the thread < https://github.com/notifications/unsubscribe-auth/ABXDiHmawMGjjIaIuUAaoos7Jd5MGTy9ks5tjOy7gaJpZM4S6Y5a

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lucasmation/microdadosBrasil/issues/164#issuecomment-377253499, or mute the thread https://github.com/notifications/unsubscribe-auth/AGtlLOSQcNWYrb-8Y_FRD6Lr-lriz0suks5tjO_ngaJpZM4S6Y5a .

monteirogustavo commented 6 years ago

Hi, @cdshikida1 Could you please test the function now? I've made some changes and it must work now.

cdshikida1 commented 6 years ago

Hi, I have to update it first. Let me see. Answering you soon.

Obrigado / Thanks for your time and attention.

Claudio D. Shikida

Esta mensagem pode conter informação confidencial e/ou privilegiada. Se você não for o destinatário ou a pessoa autorizada a receber esta mensagem, não poderá usar, copiar ou divulgar as informações nela contidas ou tomar qualquer ação baseada nessas informações. Se você recebeu esta mensagem por engano, por favor avise imediatamente o remetente, respondendo o presente e-mail e apague-o em seguida. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message.

On Mon, Apr 2, 2018 at 3:49 PM, Gustavo Monteiro notifications@github.com wrote:

Hi, @cdshikida1 https://github.com/cdshikida1 Could you please test the function now? I've made some changes and it must work now.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lucasmation/microdadosBrasil/issues/164#issuecomment-378008496, or mute the thread https://github.com/notifications/unsubscribe-auth/AGtlLBNAyjwsiKpqpucXD5mm82jj0RsIks5tknKegaJpZM4S6Y5a .

cdshikida1 commented 6 years ago

Hi, Just tried all again, following the example (below). Well, new error and stopped talking nonsense about some of my personal files.

download_sourceData("RAIS", i = "2000") Error in download_sourceData("RAIS", i = "2000") : This data was already downloaded. Check:

  • ./Meus Documentos/Meus Documentos/directory1/nameofonepdf.
  • ./Meus Documentos/Meus Documentos/directory2/nameofoneppt.

and almost more 10 similar strange messages. I almost thought it would work...

install.packages("devtools") install.packages("stringi") devtools::install_github("lucasmation/microdadosBrasil") library('microdadosBrasil')

##############

RAIS

It will download files for all states and the selected year

download_sourceData("RAIS", i = "2000")

To import data from all UFs in a single data.frame

d<- read_RAIS('vinculos', i = 2000)

To import data from a selected group of UFs

d<- read_RAIS('vinculos', i = 2000, UF = c("DF","GO"))

cdshikida1 commented 6 years ago

Hi, Just tried all again, following the example (below). Well, new error and stopped talking nonsense about some of my personal files.

download_sourceData("RAIS", i = "2000") Error in download_sourceData("RAIS", i = "2000") : This data was already downloaded. Check:

  • ./Meus Documentos/Meus Documentos/directory1/nameofonepdf.
  • ./Meus Documentos/Meus Documentos/directory2/nameofoneppt.

and almost more 10 similar strange messages. I almost thought it would work...

install.packages("devtools") install.packages("stringi") devtools::install_github("lucasmation/microdadosBrasil") library('microdadosBrasil')

##############

RAIS

It will download files for all states and the selected year

download_sourceData("RAIS", i = "2000")

To import data from all UFs in a single data.frame

d<- read_RAIS('vinculos', i = 2000)

To import data from a selected group of UFs

d<- read_RAIS('vinculos', i = 2000, UF = c("DF","GO"))

cdshikida1 commented 6 years ago

Hi, good news here. I've tried my old example and it seems to be working now (downloads are in progress). I didn't update "microdadosBrasil" since the last message. I only repeated the commands below. The final step is still running but I think it would be appropriate to say "thank you, issue solved"...

library(microdadosBrasil) setwd("C:/Users/cdshi_000/Documents/Meus Documentos/Meus Documentos/")

RAIS

It will download files for all states and the selected year

download_sourceData("RAIS", i="2013") Error in function (type, msg, asError = TRUE) : Failed to connect to ftp.mtps.gov.br port 21: Timed out library(microdadosBrasil) setwd("C:/Users/cdshi_000/Documents/Meus Documentos/Meus Documentos/")

RAIS

It will download files for all states and the selected year

download_sourceData("RAIS", i="2013") [1] "2013/AC2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/AC2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/AC2013.7z' downloaded 3.3 MB

[1] "2013/AL2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/AL2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/AL2013.7z' downloaded 12.9 MB

[1] "2013/AM2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/AM2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/AM2013.7z' downloaded 17.8 MB

[1] "2013/AP2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/AP2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/AP2013.7z' downloaded 3.3 MB

[1] "2013/BA2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/BA2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/BA2013.7z' downloaded 63.7 MB

[1] "2013/CE2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/CE2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/CE2013.7z' downloaded 40.2 MB

[1] "2013/DF2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/DF2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/DF2013.7z' downloaded 33.6 MB

[1] "2013/ES2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/ES2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/ES2013.7z' downloaded 30.9 MB

[1] "2013/ESTB2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/ESTB2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/ESTB2013.7z' downloaded 59.8 MB

[1] "2013/GO2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/GO2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/GO2013.7z' downloaded 48.9 MB

[1] "2013/MA2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/MA2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/MA2013.7z' downloaded 17.8 MB

[1] "2013/MG2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/MG2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/MG2013.7z' downloaded 163.2 MB

[1] "2013/MS2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/MS2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/MS2013.7z' downloaded 21.2 MB

[1] "2013/MT2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/MT2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/MT2013.7z' downloaded 28.4 MB

[1] "2013/PA2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/PA2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/PA2013.7z' downloaded 31.0 MB

[1] "2013/PB2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/PB2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/PB2013.7z' downloaded 15.3 MB

[1] "2013/PE2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/PE2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/PE2013.7z' downloaded 47.4 MB

[1] "2013/PI2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/PI2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/PI2013.7z' downloaded 10.5 MB

[1] "2013/PR2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/PR2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/PR2013.7z' downloaded 102.7 MB

[1] "2013/RJ2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/RJ2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/RJ2013.7z' downloaded 138.6 MB

[1] "2013/RN2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/RN2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/RN2013.7z' downloaded 16.1 MB

[1] "2013/RO2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/RO2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/RO2013.7z' downloaded 11.0 MB

[1] "2013/RR2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/RR2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/RR2013.7z' downloaded 2.3 MB

[1] "2013/RS2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/RS2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/RS2013.7z' downloaded 101.6 MB

[1] "2013/SC2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/SC2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/SC2013.7z' downloaded 75.8 MB

[1] "2013/SE2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/SE2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/SE2013.7z' downloaded 10.5 MB

[1] "2013/SP2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/SP2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/SP2013.7z' downloaded 470.0 MB

[1] "2013/TO2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/TO2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/TO2013.7z' downloaded 7.2 MB

There are files in .7z format inside the main folder, please unzip manually or use: unzip_all_7z_rar() name link sucess 1 2013 ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/ TRUE size 1 1585.3 Mb

To import data from all UFs in a single data.frame

d<- read_RAIS('vinculos', i = 2013) You haven't specified neither the 'root_path' nor ther 'file' parameters to the function. in this case we will assume that data is in your working directory and the files are named exactly as they have been downloaded from the source.

lucasmation commented 6 years ago

Great.

Cláudio, please try to download again (from the same working directory). The download function should tell you the data has already been downloaded and not do anything.

Em seg, 2 de abr de 2018 23:42, cdshikida1 notifications@github.com escreveu:

Hi, good news here. I've tried my old example and it seems to be working now (downloads are in progress). I didn't update "microdadosBrasil" since the last message. I only repeated the commands below. The final step is still running but I think it would be appropriate to say "thank you, issue solved"...

library(microdadosBrasil) setwd("C:/Users/cdshi_000/Documents/Meus Documentos/Meus Documentos/")

RAIS

It will download files for all states and the selected year

download_sourceData("RAIS", i="2013") Error in function (type, msg, asError = TRUE) : Failed to connect to ftp.mtps.gov.br port 21: Timed out library(microdadosBrasil) setwd("C:/Users/cdshi_000/Documents/Meus Documentos/Meus Documentos/")

RAIS

It will download files for all states and the selected year

download_sourceData("RAIS", i="2013") [1] "2013/AC2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/AC2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/AC2013.7z' downloaded 3.3 MB

[1] "2013/AL2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/AL2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/AL2013.7z' downloaded 12.9 MB

[1] "2013/AM2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/AM2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/AM2013.7z' downloaded 17.8 MB

[1] "2013/AP2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/AP2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/AP2013.7z' downloaded 3.3 MB

[1] "2013/BA2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/BA2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/BA2013.7z' downloaded 63.7 MB

[1] "2013/CE2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/CE2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/CE2013.7z' downloaded 40.2 MB

[1] "2013/DF2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/DF2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/DF2013.7z' downloaded 33.6 MB

[1] "2013/ES2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/ES2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/ES2013.7z' downloaded 30.9 MB

[1] "2013/ESTB2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/ESTB2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/ESTB2013.7z' downloaded 59.8 MB

[1] "2013/GO2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/GO2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/GO2013.7z' downloaded 48.9 MB

[1] "2013/MA2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/MA2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/MA2013.7z' downloaded 17.8 MB

[1] "2013/MG2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/MG2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/MG2013.7z' downloaded 163.2 MB

[1] "2013/MS2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/MS2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/MS2013.7z' downloaded 21.2 MB

[1] "2013/MT2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/MT2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/MT2013.7z' downloaded 28.4 MB

[1] "2013/PA2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/PA2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/PA2013.7z' downloaded 31.0 MB

[1] "2013/PB2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/PB2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/PB2013.7z' downloaded 15.3 MB

[1] "2013/PE2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/PE2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/PE2013.7z' downloaded 47.4 MB

[1] "2013/PI2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/PI2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/PI2013.7z' downloaded 10.5 MB

[1] "2013/PR2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/PR2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/PR2013.7z' downloaded 102.7 MB

[1] "2013/RJ2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/RJ2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/RJ2013.7z' downloaded 138.6 MB

[1] "2013/RN2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/RN2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/RN2013.7z' downloaded 16.1 MB

[1] "2013/RO2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/RO2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/RO2013.7z' downloaded 11.0 MB

[1] "2013/RR2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/RR2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/RR2013.7z' downloaded 2.3 MB

[1] "2013/RS2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/RS2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/RS2013.7z' downloaded 101.6 MB

[1] "2013/SC2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/SC2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/SC2013.7z' downloaded 75.8 MB

[1] "2013/SE2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/SE2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/SE2013.7z' downloaded 10.5 MB

[1] "2013/SP2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/SP2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/SP2013.7z' downloaded 470.0 MB

[1] "2013/TO2013.7z" [1] "ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/TO2013.7z" trying URL 'ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/TO2013.7z' downloaded 7.2 MB

There are files in .7z format inside the main folder, please unzip manually or use: unzip_all_7z_rar() name link sucess 1 2013 ftp://ftp.mtps.gov.br/pdet/microdados/RAIS/2013/ TRUE size 1 1585.3 Mb

To import data from all UFs in a single data.frame

d<- read_RAIS('vinculos', i = 2013) You haven't specified neither the 'root_path' nor ther 'file' parameters to the function. in this case we will assume that data is in your working directory and the files are named exactly as they have been downloaded from the source.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lucasmation/microdadosBrasil/issues/164#issuecomment-378110314, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXDiM48_qIhqjJz1_A3EIaguTHGNzQhks5tkuGAgaJpZM4S6Y5a .

lucasmation commented 6 years ago

Housekeeping: The commits that solved this issue: 750bbc446ff79ebdec9e61dd5852d9c1edb52abd and 9cc05f1f3f56bc66db261223a0b1586dab69228b

@monteirogustavo , remember that the commit messages should make reference to the issue they are fixing (or related)

raphael-gouvea commented 6 years ago

@lucasmation it got worse. Now, the package only finds RAIS under get_available_datasets().

devtools::install_github("lucasmation/microdadosBrasil")

library('microdadosBrasil')

install.packages("reprex")

library("reprex")

Download PNAD

download_sourceData("PNAD", 2014, unzip = T, root_path = "~/Desktop/MicroBrasil_teste", replace = T)

> Error in download_sourceData("PNAD", 2014, unzip = T, root_path = "~/Desktop/MicroBrasil_teste", : Invalid dataset. Must be one of the following: RAIS

Check available datasets

get_available_datasets()

> [1] "RAIS"

sessionInfo()

> R version 3.4.4 (2018-03-15)

> Platform: x86_64-pc-linux-gnu (64-bit)

> Running under: Ubuntu 16.04.4 LTS

>

> Matrix products: default

> BLAS: /usr/lib/libblas/libblas.so.3.6.0

> LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

>

> locale:

> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C

> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8

> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8

> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C

> [9] LC_ADDRESS=C LC_TELEPHONE=C

> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

>

> attached base packages:

> [1] stats graphics grDevices utils datasets methods base

>

> other attached packages:

> [1] reprex_0.1.2 microdadosBrasil_0.0.0.9000

>

> loaded via a namespace (and not attached):

> [1] Rcpp_0.12.16 knitr_1.19 bindr_0.1

> [4] magrittr_1.5 hms_0.4.2 R6_2.2.2

> [7] rlang_0.2.0 stringr_1.3.0 dplyr_0.7.4

> [10] tools_3.4.4 data.table_1.10.4-3 htmltools_0.3.6

> [13] yaml_2.1.16 rprojroot_1.3-2 digest_0.6.15

> [16] assertthat_0.2.0 tibble_1.4.2 bindrcpp_0.2

> [19] readr_1.1.1 bitops_1.0-6 RCurl_1.95-4.10

> [22] glue_1.2.0 evaluate_0.10.1 rmarkdown_1.8

> [25] stringi_1.1.7 compiler_3.4.4 pillar_1.1.0

> [28] backports_1.1.2 pkgconfig_2.0.1

raphael-gouvea commented 6 years ago

just a small correction. It did not get worse. Before was not getting any datasets. Now, it only finds RAIS...

raphael-gouvea commented 6 years ago

@lucasmation any reason why running the package for RAIS from an IPEA server would not work? I tried it before using server sr as I cannot use it from the US due to the MTE ftp problem, but I was not successful. I get a port 21 error message....

lucasmation commented 6 years ago

no, that should have worked fine.

if you open this tread on github you will see a previousmessage in which @cdshikida1 describes the same problem. But when he tried it a second time it worked.

2018-04-03 10:37 GMT-03:00 Raphael Gouvea notifications@github.com:

@lucasmation https://github.com/lucasmation any reason why running the package for RAIS from an IPEA server would not work? I tried it before using server sr as I cannot use it from the US due to the MTE ftp problem, but I was not successful. I get a port 21 error message....

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lucasmation/microdadosBrasil/issues/164#issuecomment-378252698, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXDiLmIyt6j_4YjigiR9-9sn5fbAnviks5tk3sxgaJpZM4S6Y5a .

monteirogustavo commented 6 years ago

I think it's solved now. @raphael-gouvea could you please test if the error still happens?

cdshikida1 commented 6 years ago

Let me tell you. It worked. I would only suggest to warn the user to unzip files before applying read_rais in the example.

On Tue, Apr 3, 2018, 11:05 Gustavo Monteiro notifications@github.com wrote:

I think it's solved now. @raphael-gouvea https://github.com/raphael-gouvea could you please test if the error still happens?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lucasmation/microdadosBrasil/issues/164#issuecomment-378261725, or mute the thread https://github.com/notifications/unsubscribe-auth/AGtlLAUUoZ5hskIXULoRW2um5SNl_LF3ks5tk4GUgaJpZM4S6Y5a .

raphael-gouvea commented 6 years ago

@monteirogustavo it worked.

devtools::install_github("lucasmation/microdadosBrasil")

library('microdadosBrasil')

install.packages("reprex")

library("reprex")

Check available datasets

get_available_datasets()

> [1] "CAGED" "CensoEducacaoSuperior"

> [3] "CensoEscolar" "CENSO"

> [5] "ENEM" "PME"

> [7] "PnadContinua" "PNAD"

> [9] "PNS" "POF"

> [11] "RAIS"

lucasmation commented 6 years ago

great,tks