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

create docdir= in the catalog not a lodown_* function parameter #29

Closed
ajdamico opened this issue Jan 16, 2017 · 7 comments
Closed

create docdir= in the catalog not a lodown_* function parameter #29

ajdamico opened this issue Jan 16, 2017 · 7 comments
Assignees
Milestone

Comments

@ajdamico
Copy link
Owner

it should be another column in the data frame that get_catalog_* makes. that way, it defaults to something nicely, but users can change it the same way they can change other output names. you will also need to add this to the dir.create() line within lodown.R so the directory gets built. make sense? thanks

@ajdamico
Copy link
Owner Author

hi, sorry for being a standardization troll.

pof does what i am describing here:

lodown/R/pof.R

Lines 41 to 45 in 5120a5f

cachaca( catalog[ i , "full_urls" ] , tf , mode = 'wb' )
unzipped_files <- unzip_warn_fail( tf , exdir = paste0( tempdir() , "/unzips" ) )
cachaca( catalog[ i , "documentation" ] , tf , mode = 'wb' )

you can see the documentation column in the catalog..

# example where documentation files are downloaded alongside each microdata file
head( get_catalog( "pof" , output_dir = tempdir() ) )

or, here's an alternative configuration if there isn't a one-to-one correspondence between data files and documentation files. just put the documents directly into their own records in the catalog.

ess_cat <- get_catalog( "ess" , output_dir = tempdir() )

head( ess_cat , 20 )

@guilhermejacob
Copy link
Contributor

Sure. You're the boss (:

@ajdamico
Copy link
Owner Author

haha nah, i am still figuring this stuff out as well

@ajdamico ajdamico modified the milestone: v0.1.0 Jan 26, 2017
@guilhermejacob
Copy link
Contributor

I think we closed this one, right? Reopen otherwise.

@ajdamico
Copy link
Owner Author

sia.R still has this mistake

@guilhermejacob
Copy link
Contributor

Last commit solves it

@ajdamico
Copy link
Owner Author

ajdamico commented Jan 28, 2017 via email

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