Giter Club home page Giter Club logo

covid's Introduction

covid's People

Contributors

jennybc avatar kjhealy avatar yimingli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

covid's Issues

Easier way to achieve the small multiples effect

Hi Kieran,

The gghighlight package makes the plotting of all the other countries in gray on the same plot much easier.

For example, I plot death tracks from the JHU data (Twitter: @corona_dt), and created a data frame deaths_after_10 to keep all countries with at least 10 deaths. To plot the small multiples:

library(tidyverse)
library(gghighlight)
ggplot(deaths_after_10, aes(x=days, y=deaths))+
  geom_line(aes(group=country_region), color='firebrick')+ 
  gghighlight() + 
  facet_wrap(~country_region) + 
  theme_classic() + 
  labs(x = 'Days since 10th death', y = 'Cumulative number of deaths')

gets you the following plot
image

Writing here since I figured this would be easiest way to get feedback to you. Happy plotting, and love your book

Specify which package union() should come from

Thanks for sharing this code!

A lot of calls are already namespaced. Would you do same for union() so it's always clear which package you intend?

> covid <- coalesce_join(covid, cname_xwalk, 
+                        by = "geo_id", join = dplyr::left_join)
Error: [conflicted] `union` found in 2 packages.
Either pick the one you want with `::` 
* lubridate::union
* dplyr::union
Or declare a preference with `conflict_prefer()`
* conflict_prefer("union", "lubridate")
* conflict_prefer("union", "dplyr")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.