[R-bloggers] Covid-19 interactive map (using R with shiny, leaflet and dplyr) (and 8 more aRticles) | |
- Covid-19 interactive map (using R with shiny, leaflet and dplyr)
- Keep Calm and Use vtreat (in R and in Python)
- Corona in Belgium
- Dear Data Scientists – how to ease your job!
- All you need to know on clustering with Factoshiny…
- Top 5 R resources on COVID-19 Coronavirus
- Persistent config and data for R packages
- one or two?
- AsioHeaders 1.12.2-1
Covid-19 interactive map (using R with shiny, leaflet and dplyr) Posted: 12 Mar 2020 12:29 PM PDT [This article was first published on R-posts.com, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. The departement of Public Health of the Strasbourg University Hospital (GMRC, Prof. Meyer) and the Laboratory of Biostatistics and Medical Informatics of the Strasbourg Medicine Faculty (Prof. Sauleau), to the extent of their means and expertise, are contributing to the fight against Covid-19 infection. Doctor Fabacher has produced an interactive map for global monitoring of the infection, accessible at : https://thibautfabacher.shinyapps.io/covid-19/ This map, which complements the Johns Hopkins University tool (Coronavirus COVID-19 Global Cases by Johns Hopkins CSSE), focuses on the evolution of the number of cases per country and for a given period, but in terms of incidence and prevalence. It is updated daily.
This map is made using R with shiny, leaflet and dplyr packages. Code available here : https://github.com/DrFabach/Corona/blob/master/shiny.r Reference To leave a comment for the author, please follow the link and comment on their blog: R-posts.com. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Keep Calm and Use vtreat (in R and in Python) Posted: 12 Mar 2020 11:56 AM PDT [This article was first published on R – Win-Vector Blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. A big thank you to Dmytro Perepolkin for sharing a "Keep Calm and Use vtreat" poster! Also, we have translated the Python vtreat steps from our recent "Cross-Methods are a Leak/Variance Trade-Off" article into R vtreat steps here. This R-port demonstrates the new to R fit/prepare notation! We want vtreat to be a platform agnostic (works in R, works in Python, works elsewhere) well documented standard methodology. To this end: Nina and I have re-organized the basic vtreat use documentation as follows:
To leave a comment for the author, please follow the link and comment on their blog: R – Win-Vector Blog. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. This posting includes an audio/video/photo media file: Download Now | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Posted: 12 Mar 2020 07:14 AM PDT [This article was first published on bnosac :: open analytical helpers - bnosac :: open analytical helpers, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. I lost a few hours this afternoon when digging into the Corona virus data mainly caused by reading this article at this website which gives a nice view on how to be aware of potential issues which can arise when collecting data and to be aware of hidden factors and it also shows Belgium. As a Belgian, I was interested to see how Corona might impact our lives in the next weeks and out of curiosity I was interested to see how we are doing compared to other countries regarding containment of the Corona virus outspread – especially since we still do not have a government in Belgium after elections 1 year ago. In what follows, I'll be showing some graphs using data available at https://github.com/CSSEGISandData/COVID-19 (it provides up-to-date statistics on Corona cases). If you want to reproduce this, pull the repository and just execute the following R code shown. DataLet's see first if the data is exactly what is shown at our National Television.
Yes, the data from https://github.com/CSSEGISandData/COVID-19 looks correct indeed. Same numbers as reported on the Belgian Television.
Exponential number of cases of CoronaNow is the outbreak really exponential. Let's make some graphs. What is clear when looking at the plots is that indeed infections happen at a exponential scale except in Singapore where the government managed to completely isolate the Corona cases, while in Belgium and other European countries the government lacked the opportunity to isolate the Corona cases and we are now in a phase of trying to slow down to reduce the impact. You can reproduce the plot as follows trellis.par.set(strip.background = list(col = "lightgrey")) Compare to other countries – onsetIt is clear that the onset of Corona is different in each country. Let's define the day 0 as the day where 75 persons had Corona in the country. That will allow us to compare different countries. In Belgium we started to have more than 75 patients with Corona on Friday 2020-03-06. In the Netherlands that was one day earlier.
Reproduce as follows: x <- x[order(x$date, x$area, decreasing = TRUE), ] Compare to other countries – what can we expect?Now are we doing better than other countries in the EU. Following plot shows the log of the number of people diagnosed as having Corona since the onset date shown above. It looks like Belgium has learned from the issues in Italy but it still hasn't learned the way to deal with the virus outbreak the same as e.g. Singapore has done. Based on the blue line, we can expect Belgium to have next week between roughly 1100 confirmed cases (log(1100)=7) or if we follow the trend of France that would be roughly 3000 (log(3000)=8) patients with Corona. We hope that it is only the first.
Reproduce as follows: xyplot(log(confirmed) ~ days_since_case_onset | "Log(confirmed cases) of Corona since onset of sick person nr 75", Compared to the NetherlandsNow, are we doing better than The Netherlands? Currently it looks like we are. But time will tell for the future. Give the above trend shown above, I can only hope everyone in Belgium follows the government guidelines as strict as possible.
Reproduce as follows: xyplot(newly_confirmed ~ date | "Newly confirmed cases of Corona", groups = area, To leave a comment for the author, please follow the link and comment on their blog: bnosac :: open analytical helpers - bnosac :: open analytical helpers. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. This posting includes an audio/video/photo media file: Download Now | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Dear Data Scientists – how to ease your job! Posted: 12 Mar 2020 01:37 AM PDT [This article was first published on R-Bloggers – eoda GmbH, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. You are the modern Indiana Jones of digitalization! Always on the lookout to increase knowledge, show relations and take your organization to the next level. Just like the great discoverers like Leif Eriksson, Vasco da Gama and Lewis and Clark, you never let yourself be stopped from pursuing an idea and discovering new possibilities. As Margaret Hamilton, Katherine Johnson or Marie Curie you recognize structures, patterns and find ways to solve problems or make processes more efficient. And just like these people you have a huge pool of methods, tools and knowledge that you use every day. With your skills you can simplify the daily work of your colleagues, relieve them and get things straight concerning the data jungle. Your own work is often difficult and inconvenient. Every day you are faced with a multitude of challenges in your projects: How do you get feedback from the departments, how do you share your scripts with other data scientists or how do you distribute your scripts quickly and easil? You quickly want to connect and access data? Performance and compliance are less interesting for you than making your results available to different groups? Wouldn't it be great if you also had a solution that would make your work easier? YUNA – The data science platform from data scientists for data scientistsLet's consider the common data science languages R, Python and Julia. Maybe you were involved in projects where analysis scripts were available in different languages. A platform that would be able to use all these languages, regardless of the language, but still fully, with all their (connectivity) packages and libraries – that would be something, wouldn't it? If you could continue using your usual IDEs, you wouldn't even have to change your work. Imagine you could run the scripts you develop in a scalable environment. In an environment where you wouldn't have to worry about data retrieval, user queries and data sources. And when all agents work together, thanks to dynamic load balancing, you and your analysis deserve the „big" in „big data". Pair the above examples with advanced script execution logging, so you'll know exactly what your scripts are always outputting. Imagine a platform where parameterized, automated, sequential script execution is standard. Imagine being able to evaluate and optimize your scripts before, after and during production? Or in short: Would it be exciting to work in a software solution that was developed in collaboration with you? By people who experience exactly the same things as you do every day. With this idea YUNA was developed – The data science platform by data scientists for data scientists Data Science is a team sportIn data science projects, you are rarely a lone fighter – even if you are the only person who is really involved in the field. Be it in the conception of the use case , the presentation of results and the planning of the next project. You often work together with different people who have their very own requirements – and you often have to be the translator so that the others understand your complex work. With YUNA, many questions can be answered by tracing results back to the actual data source, such as machine sensors. Business users can set business questions to which you will find the answers. Coordination paths are greatly reduced, and you can concentrate on the essential – data science, your passion, your job. Find more information about YUNA at: https://www.eoda.de/en/leistungen/yuna To leave a comment for the author, please follow the link and comment on their blog: R-Bloggers – eoda GmbH. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. This posting includes an audio/video/photo media file: Download Now | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
All you need to know on clustering with Factoshiny… Posted: 11 Mar 2020 09:56 PM PDT [This article was first published on François Husson, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. The function Factoshiny of the package Factoshiny proposes a complete clustering strategy that allows you:
Implementation with R softwareSee this video and the audio transcription of this video: Course videosTheorectical and practical informations on clustering are available in these 4 course videos (here are the slides and the audio transcription of the courses):
MaterialsHere is the material used in the videos:
To leave a comment for the author, please follow the link and comment on their blog: François Husson. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Top 5 R resources on COVID-19 Coronavirus Posted: 11 Mar 2020 05:00 PM PDT [This article was first published on R on Stats and R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. ![]() Photo by CDC The Coronavirus is a serious concern around the globe. With its expansion, there are also more and more online resources about it. This article presents a selection of the best R resources on the COVID-19 virus. This list is by no means exhaustive. I am not aware of all R resources available online about the Coronavirus, so please feel free to let me know in the comments or by contacting me if you believe that another resource (R package, Shiny app, R code, data, etc.) deserves to be on this list. R Shiny appsCOVID-19 outbreakDeveloped by the department of Public Health of the Strasbourg University Hospital and the Laboratory of Biostatistics and Medical Informatics of the Strasbourg Medicine Faculty, this Shiny app shows an interactive map for global monitoring of the infection. It focuses on the evolution of the number of cases per country and for a given period in terms of incidence and prevalence. The code is available on GitHub. R packages | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Persistent config and data for R packages Posted: 11 Mar 2020 05:00 PM PDT [This article was first published on Posts on R-hub blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. Does your R package work best with some configuration? Preface: standard locations on the user's machineThroughout this post we'll often refer to standard locations on the user's machine. On top of these non-R specific standard locations, we'll also mention the standard homes of R options and environment variables, .Rprofile and .Renviron. User preferencesAs written in Android developer guidance and probably every customer service guide ever, "Everyone likes it when you remember their name". Using optionsIn R,
Users can use a project-level or more global user-level .Rprofile. For more startup tweaks, the user could adopt the As a package developer in your code you can retrieve options by using The use of options in the .Rprofile startup file is great for workflow packages like Using environment variablesEnvironment variables, found via Similar to using As a package developer, you probably want to at least document how to set persistent variables or provide a link to such documentation; and you could even provide helper functions like what Using credential stores for secretsAlthough say API keys are often stored in in their scripts. Using a config fileThe The A good default experienceObviously, on top of letting users set their own preferences, you probably want your package functions to have sensible defaults. Asking or guessing?For basic information such as username, email, GitHub username, the In particular, for the email address, if the R environment variable In these cases where packages guess something, their guessing is based on the use of standard locations for such information on different operating systems. Not so temporary files3To quote Android developers guide again, "Persist as much relevant and fresh data as possible.". A package that exemplifies doing so is The When using If you hesitate to use e.g. rappdirs or notTo use an app directory from within your package you can use
More or less temporary solutionsThis section presents solutions for caching results very temporarily, or less temporarily. Caching results within an R sessionTo cache results within an R session, you could use a temporary directory for data. Only the first call to Providing a ready-to-use dataset in a non-CRAN packageIf your package depends on the use of a huge dataset, the same for all users, that is by definition too huge for CRAN, you can use a setup like the one presented by Brooke Anderson and Dirk Eddelbuettel in which the data is packaged up in a separate package not on CRAN, that the user will install therefore saving the data on disk somewhere where you can find it easily.5 ConclusionIn this blog post we presented ways of saving configuration options and data in a not so temporary way in R packages. Many thanks to Christophe Dervieux for useful feedback on this post!
To leave a comment for the author, please follow the link and comment on their blog: Posts on R-hub blog. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. This posting includes an audio/video/photo media file: Download Now | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Posted: 11 Mar 2020 04:20 PM PDT [This article was first published on R – Xi'an's Og, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. A superposition of two random walks from The Riddler:
Although the optimal path is not necessarily made of moves that optimise the probability of ending up positive after the remaining steps, I chose to follow a dynamic programming approach by picking between ±1 and ±2 at each step based on that probability: bs=matrix(0,405,101) #best stategy with value i-203 at time j-1 bs[204:405,101]=1 for (t in 100:1){ tt=2*t bs[203+(-tt:tt),t]=.5*apply(cbind( bs[204+(-tt:tt),t+1]+bs[202+(-tt:tt),t+1], bs[201+(-tt:tt),t+1]+bs[205+(-tt:tt),t+1]),1,max)} resulting in the probability > bs[203,1] [1] 0.6403174 Just checking that a simple strategy of picking ±1 above zero and ±2 below leads to the same value ga=rep(0,T) for(v in 1:100) ga=ga+(1+(ga<1))*sample(c(-1,1),T,rep=TRUE) or sort of > mean(ga>0) [1] 0.6403494 With highly similar probabilities when switching at ga<2 > mean(ga>0) [1] 0.6403183 or ga<0 > mean(ga>0) [1] 0.6403008 and too little difference to spot a significant improvement between the three boundaries. To leave a comment for the author, please follow the link and comment on their blog: R – Xi'an's Og. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. This posting includes an audio/video/photo media file: Download Now | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Posted: 11 Mar 2020 03:48 PM PDT [This article was first published on Thinking inside the box , and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. An updated minor version of the AsioHeaders package arrived on CRAN today. Asio provides a cross-platform C++ library for network and low-level I/O programming. It is also included in Boost – but requires linking when used as part of Boost. This standalone version of Asio is a header-only C++ library which can be used without linking (just like our BH package with parts of Boost). This release corresponds to a minor upstream update, and is only the second update ever. It may help overcome one santizer warning which David Hall brought to my attention. We tested this version against all reverse depends (which was easy enough as there are only three).The NEWS entry follows.
Via CRANberries, there is a Comments and suggestions about AsioHeaders are welcome via the issue tracker at the GitHub GitHub repo. This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
To leave a comment for the author, please follow the link and comment on their blog: Thinking inside the box . R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. This posting includes an audio/video/photo media file: Download Now |
You are subscribed to email updates from R-bloggers. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
Hi, thanks for sharing this post but the text isn't readable and background color is very dark which makes it more difficult to read. It would be better if you make these changes.
ReplyDeletear integration for quickBooks