ropensci / roweb

:no_entry: [DEPRECATED] Active at https://github.com/ropensci/roweb2
https://legacy.ropensci.org
Other
18 stars 29 forks source link

Create 2017-02-21-ropenaq.Rmd #287

Closed maelle closed 7 years ago

maelle commented 7 years ago

@sckott can you check you can knit it and whether I have to replace the knitr::kable() with something?

karthik commented 7 years ago

When trying to knit, I get

Arrrr> allthedata <- (1:ceiling(count/10000)) %>%
+   purrr::map(function(page){
+     aq_measurements(city = "Hyderabad",
+                    date_from = "2016-01-01", 
+                    date_to = "2016-12-31",
+                    parameter = "pm25",
+                    page = page, 
+                    limit = 10000)
+     }) %>%
+   bind_rows()
Error: limit cannot be more than 1000
Arrrr>
maelle commented 7 years ago

Stupid me, I need to add installation instructions because this uses ropenaq development version (that I intend to submit to CRAN once I'm sure I've solved another problem that arises from time to time).

karthik commented 7 years ago

I also found a few issues with gganimate further down but I'll wait for an update

maelle commented 7 years ago

@karthik what are the gganimate issues? Thanks for your patience!

karthik commented 7 years ago

There appears to be no function called gg_animate in the package unless I missed something.

maelle commented 7 years ago

Oh! I see, the function was renamed in gganimate latest version, let me update this. :woman_facepalming:

maelle commented 7 years ago

Bad news, it seems that emojifont and gganimate are no longer compatible, I'll try again and update you.

maelle commented 7 years ago

It works! :surfing_man: Not sure how to embed the video though

karthik commented 7 years ago

Cool! Will check it out. For me I always have the problem where filter defaults to base::filter. So I have to use Stefan's package to run import::from(dplyr, filter) somewhere after my dplyr load to make it all work.

karthik commented 7 years ago

See this thread for adding some markup to render video: http://stackoverflow.com/questions/4279611/how-to-embed-a-video-into-github-readme-md

maelle commented 7 years ago

@karthik should I replace filter with dplyr::filter in the whole .Rmd?

maelle commented 7 years ago

@karthik Thanks for the link reg. videos. I finally decided to ropenscize the whole post by replacing gganimate with magick so now there are only .gif in the post! :tada:

maelle commented 7 years ago

Note that knitting can take a while now + creates a lot of .png. If you create a figs folder where you knit the document I could add "figs/" to the filenames and thus avoid making the folder messy. :wink:

maelle commented 7 years ago

@karthik @sckott was one of you able to knit tomorrow's post? Just asking in case I need to fix something last minute 😇

karthik commented 7 years ago

The package albersusa is missing!

maelle commented 7 years ago

I hadn't written it was only avaliable on Github, now it should work?

karthik commented 7 years ago

ok, all works for me locally. One suggestion, my filter is always broken. So I always add this

import::from(dplyr, filter)

from Stefan Bache's import package to make things work. Can you please move this to _posts and then knit so we can test the render?

thanks.

maelle commented 7 years ago

Sorry @karthik I don't see what you mean. I could knit my Rmd but then I wouldn't get the images in the right folder and with the right path in the .md compared to older posts (assets/ etc). There is no way to get this automatically right? I naively thought you would do the knitting ;-) I'm happy to add options to my .Rmd but I need some guidance :-)

karthik commented 7 years ago

I get it. But I'm off email now till next week so punting this to @sckott and @stefaniebutland

Sorry!

sckott commented 7 years ago

@masalmon works now, but a few problems

screen shot 2017-02-20 at 7 41 24 am

and

screen shot 2017-02-20 at 7 42 17 am
maelle commented 7 years ago

Thanks!