Hacker News new | past | comments | ask | show | jobs | submit login
Google Flu Trends (google.org)
158 points by sethbannon on Jan 10, 2013 | hide | past | favorite | 25 comments



In case it's of any interest, below is code in the R language that produces time-series graphs for two provinces in Canada.

    fluPlot <- function(country="ca", regions="Nova.Scotia")
    {
        url <- sprintf("http://www.google.org/flutrends/intl/en_us/%s/data.txt", country)
        d <- read.csv(url, skip=11, header=TRUE)
        n <- length(regions)
        t <- as.POSIXct(d[["Date"]])
        for (i in 1:n) {
            if (i == 1) {
                plot(t, d[[regions[i]]], xlab="", ylab=regions[i], type='l', col=i)
                grid()
            } else {
                lines(t, d[[regions[i]]], col=i)
            }
        }
        legend("top", col=1:n, lwd=par('lwd'), legend=regions, bg='white')
    }
    par(mar=c(2, 2, 2, 2), mgp=c(2, 0.7, 0))
    fluPlot("ca", c("Ontario", "Nova.Scotia"))


Nice! I've adapted your code and made a version that uses ggplot2. It also uses memoise() so that each data set only needs to be downloaded once per R session.

    # Memoize read.csv so each data set only needs to be downloaded once
    require(memoise)
    readcsv <- memoise(read.csv)

    fluPlot2 <- function(country="ca", regions="Nova.Scotia") {
      require(ggplot2)
      require(reshape2)

      url <- sprintf("http://www.google.org/flutrends/intl/en_us/%s/data.txt", country)
      d <- readcsv(url, skip=11, header=TRUE)
      d$Date <- as.Date(d$Date)

      # Convert to long format
      dl <- melt(d, id.vars = "Date", variable.name = "region")

      # Select regions of interest
      dlsub <- subset(dl, region %in% regions)

      ggplot(dlsub, aes(x=Date, y=value, colour=region)) + geom_line() +
        theme_bw()
    }

    fluPlot2("us", c("Minnesota", "California"))


I made a year-by-year line overlay for the Japanese data.

You can probably plug in any other area's data. the JS is just in the index.html.

http://poyo.co/d3stuff/flu/


I'm a fan of the CDC flu map with "horrible outbreak" being represented by a dull default beige color: http://www.cdc.gov/flu/weekly/usmap.htm


And showing data for the week ending Jan 11 2014. CDC staying one step (year) ahead of Google.


It's interesting to compare that graph with the delayed graph at the CDC:

http://www.cdc.gov/flu/weekly/index.htm#OISmap

In particular, limit the Past Years on the Google graph to 2009-10 (pandemic year) or 2007-2008 (moderately severe season). It correlates pretty well. Using the axis on the CDC graph and guesstimating based on relative size of peak vs those previous years, it looks like we're approaching about 12% of visits for influenza-like illness. Hopefully we peak in the next few weeks.

I'd also be curious how well this season's vaccine targeted the current mix of viruses.


According to NYT this morning, most people are getting H3N2 (which is a nasty one), but the vaccine is very effective against it. Note that it takes two weeks after the shot for immunity to build up.

http://www.nytimes.com/2013/01/10/health/flu-widespread-lead...


According to one of the leading experts on influenza (Tom Jefferson) there's no good scientific evidence that flu vaccines are of much use [1].

Jefferson has also concluded the same regarding Tamiflu. Forbes covered this dearth of supportive data in a piece a few days ago [2].

A few months ago the NYT ran an article reporting on the Center for Infectious Disease Research and Policy at the University of Minnesota announcing the same opinion on flu vaccine effectiveness, (which the article states is apparently heresy in the public health world) [3].

Fascinating that a significant, widely-supported health policy appears to be faith-based medicine masquerading as science-based medicine.

I would emphasize that Jefferson doesn't say the vaccine is harmful or that it doesn't work. He merely points out there's no good scientific evidence indicating it's of much use. If The Atlantic's article is to be believed, that was enough to get him ostracized from the medical establishment:

“Tom Jefferson has taken a lot of heat just for saying, ‘Here’s the evidence: it’s not very good,’” says Majumdar. “The reaction has been so dogmatic and even hysterical that you’d think he was advocating stealing babies.”

Such classic groupthink in an apparently science-driven community is rather troubling, considering the significant social impact of professionals preferring consensus over hard data.

[1] http://www.theatlantic.com/magazine/archive/2009/11/does-the...

[2] http://www.forbes.com/sites/harlankrumholz/2013/01/08/the-my...

[3] http://well.blogs.nytimes.com/2012/11/05/reassessing-flu-sho...


Some things about what you said weren't entirely clear (to me at least), but having read through 1, 3 and some of the relevant parts of the report referenced in 3 here are some comments I'd like to add. For any HNer interested I would say the report is more interesting [0]

If you are between 18-65 and got the flu vaccine this year, eli's comment is correct and it is unlikely that you will get the flu.

The key point behind the articles is that flu vaccines very well might not help reduce flu related mortality. So as an issue of public policy are not as effective as preached. One guess as to why this is, is because the vaccine doesn't produce antibodies well in the at risk population with weakened immune systems.

The rest of the research says what I think most HNers probably know, if you're 18-65 the efficacy of the vaccine is dependent on the strains in the vaccine, and what strain of flu is going around. Even well matched vacines don't always work as well as hoped.

In the general case, if you're 18-65 and healthy, the vaccine is about 60% effective, and in the case of h3n2 is about 88% effective. All of this comes from [0]

[0] http://www.cidrap.umn.edu/cidrap/files/80/ccivi%20report.pdf


The flu shot is excellent this year; a near perfect match [0]. In other words, the vaccine is very reliable for protecting immunocompetent individuals capable of producing antibodies.

Re: the vaccine not protecting the immunocompromised. It's important for caregivers of young children, the elderly, etc. to get vaccinated to reduce the probability of transmitting the virus to susceptible people in their care. You can interrupt the chain of transmission.

And an open letter to the three people I heard yesterday claim that they once got the flu after getting vaccinated: no, you didn't. The flu shot is a killed vaccine, which means it is incapable of causing infection. After getting vaccinated it takes two weeks for your body to finish producing antibodies, so it's possible you were infected with the virus from a regular, environmental source. Basically, it was a fluke that you got sick, and that experience should not dissuade you from getting vaccinated. The intranasal vaccine is live attenuated, which means the virus is hypothetically capable of reproducing, but according to the CDC, it does not cause the flu [2].

Please get vaccinated. Check http://flushot.healthmap.org/ for providers in your area.

[0] http://www.cdc.gov/flu/weekly/ (see Antigenic Characterization)

[1] http://www.cdc.gov/flu/protect/keyfacts.htm

[2] http://www.cdc.gov/flu/about/qa/nasalspray.htm#give-you-the-...


I looked for United Kingdom, wasn't there. I looked for Britain, wasn't there, I looked for England, still nothing.

I was disappointed.


You can also check out the GPU database I've been working on at http://worldmap.harvard.edu/tweetmap. Its VERY beta but if you move the start date back to early December and the end of Decemberand you'll see a spike, particularly in the south. Sample size is ~ 175 million tweets.


It would be nice if they would somehow show the delta versus the actual CDC data when it's released 2 weeks later. I would like to understand how good the correlation is for each year and time point.


Is this what you mean (under Historical estimates)? http://www.google.org/flutrends/about/how.html


Yes, fantastic. That's perfect.


Imagine the cool data you could visualize if you had access to this kind of info from Facebook. You trace who had the flu before you and who had it before them, all the way back to patient zero.

Obviously this would be a tremendous privacy violation, so they would never do it, but it would still be interesting.


Here you go:

contest: https://www.facebook.com/pages/CDC-Flu-App-Challenge/1463487...

app: https://www.facebook.com/helpremedies/app_177924539013408

The app seems to have gotten a lot of coverage in popular media. I haven't used it, so have no idea if it works at all, or well.

The flu virus is naturally recombinant among species, so patient zero for a given strain is likely to be a farm pond populated by ducks and pigs, very likely in China.


If you look at Canada[1], there was a larger spike (than the current trend in Canada) around October 2009. [Under "Past Years" select "2009-2010" to see just that plot.]

[1] http://www.google.org/flutrends/ca/#CA


That spike seems to exist in a lot of countries, including the US, France, etc.. My guess is that it has more to do with the swine flu panic than actual cases of flu.


Yeah, you might recall that there was a huge push by public health officials to get folks to take the H1N1 vaccine.

The actual flu that year was not that bad, so the spike was a bit of an anomaly.



Why is it so high this year ?


I'm sure Larry Page will be looking at this data after personally paying for free flu shots to bay area kids. In his article he mentions "...flu shots can have a big effect in preventing flu in the whole region...", so I wouldn't be surprised if this page was directly related to him providing free shots. https://plus.google.com/+LarryPage/posts/32xY3Z1zckL


False, they are not related. Google has been predicting flu severity (based on search data) since 2006.


False. My assertion was that Larry will be looking at this data based on him providing flu shots. I then posited that there is a connection between this page and Larry's flu shot charity -- not that one caused the other, but implied that within Google there was a discussion on the relationship between Larry's activity and this page.

In addition, the comment was intended to draw attention to Larry's assertion that flu shots can reduce flu severity in a region...and then provoke readers to investigate whether they find that to be the case. I came to no conclusions about the Bay Area's severity being particularly worse or better than other regions and assumed others may have commentary.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: