library(knitr)
library(rjson)
suppressMessages(library(jsonlite))
suppressWarnings(library(ggplot2))
booklists<- fromJSON("http://api.nytimes.com/svc/books/v3/lists/names.json?api-key=56fec8351d568355fb3e456191f01316:13:29126896")
kable(booklists)
|
|
fictionhardcover <- fromJSON("http://api.nytimes.com/svc/books/v3/lists.json?list=hardcover-fiction&api-key=56fec8351d568355fb3e456191f01316:13:29126896")
fhbooks<- fictionhardcover$results
dffh<- as.data.frame(fhbooks)
# Attempt to make a plot of book title vs. weeks on list. Not sure why this didn't work.
#dffh$weeks_on_list<-as.numeric(dffh$weeks_on_list)
#ggplot(dffh, aes(x=title, y=weeks_on_list, fill=title)) + geom_bar(stat="identity") + ggtitle("Fiction Hardcover Weeks on List")+ theme(axis.text=element_text(angle=60))+ labs(x="Book",y="Weeks On List")
dffh<- subset(dffh[,c(1:7,12)])
kable(dffh)
| list_name | display_name | bestsellers_date | published_date | rank | rank_last_week | weeks_on_list | book_details |
|---|---|---|---|---|---|---|---|
| Hardcover Fiction | Hardcover Fiction | 2016-03-26 | 2016-04-10 | 1 | 0 | 1 | FOOL ME ONCE, A retired Army helicopter pilot faces combat-related nightmares and mysteries concerning the deaths of her husband and sister., by Harlan Coben, Harlan Coben, , 0, , Dutton, 9780525955092, 0525955097 |
| Hardcover Fiction | Hardcover Fiction | 2016-03-26 | 2016-04-10 | 2 | 1 | 2 | PRIVATE PARIS, Jack Morgan, the head of the Private global investigative agency, probes the murders of members of the French cultural elite., by James Patterson and Mark Sullivan, James Patterson and Mark Sullivan, , 0, , Little, Brown, 9780316407052, 0316407054 |
| Hardcover Fiction | Hardcover Fiction | 2016-03-26 | 2016-04-10 | 3 | 0 | 1 | THE NEST, Siblings in a dysfunctional New York family must grapple with a reduced inheritance., by Cynthia D’Aprix Sweeney, Cynthia D’Aprix Sweeney, , 0, , Ecco/HarperCollins, 9780062414212, 0062414216 |
| Hardcover Fiction | Hardcover Fiction | 2016-03-26 | 2016-04-10 | 4 | 2 | 2 | PROPERTY OF A NOBLEWOMAN, Two New Yorkers reconstruct the history of a young woman and a love affair at the time of World War II., by Danielle Steel, Danielle Steel, , 0, , Delacorte, 9780345531063, 034553106X |
| Hardcover Fiction | Hardcover Fiction | 2016-03-26 | 2016-04-10 | 5 | 3 | 99 | ALL THE LIGHT WE CANNOT SEE, The lives of a blind French girl and a gadget-obsessed German boy before and during World War II. , by Anthony Doerr, Anthony Doerr, , 0, , Scribner, 9781476746586, 1476746583 |
| Hardcover Fiction | Hardcover Fiction | 2016-03-26 | 2016-04-10 | 6 | 6 | 63 | THE GIRL ON THE TRAIN, A psychological thriller set in the environs of London., by Paula Hawkins, Paula Hawkins, , 0, , Riverhead, 9781594633669, 1594633665 |
| Hardcover Fiction | Hardcover Fiction | 2016-03-26 | 2016-04-10 | 7 | 0 | 1 | THE SUMMER BEFORE THE WAR, Life in Sussex, England, at the beginning of World War I., by Helen Simonson, Helen Simonson, , 0, , Random House, 9780812993103, 0812993101 |
| Hardcover Fiction | Hardcover Fiction | 2016-03-26 | 2016-04-10 | 8 | 4 | 56 | THE NIGHTINGALE, Two sisters in World War II France: one struggling to survive in the countryside, the other joining the Resistance in Paris., by Kristin Hannah, Kristin Hannah, , 0, , St. Martin’s, 9780312577223, 0312577222 |
| Hardcover Fiction | Hardcover Fiction | 2016-03-26 | 2016-04-10 | 9 | 5 | 3 | OFF THE GRID, The 16th Joe Pickett novel features Nate Romanowski and a search for a domestic terror cell., by C. J. Box, C J Box, , 0, , Putnam, 9780399176609, 0399176608 |
| Hardcover Fiction | Hardcover Fiction | 2016-03-26 | 2016-04-10 | 10 | 8 | 4 | THE GANGSTER, In 1906, the New York detective Isaac Bell contends with a crime boss., by Clive Cussler and Justin Scott, Clive Cussler and Justin Scott, , 0, , Putnam, 9780399175954, 0399175954 |
| Hardcover Fiction | Hardcover Fiction | 2016-03-26 | 2016-04-10 | 11 | 13 | 8 | AFTER YOU, In a sequel to “Me Before You,” Louisa Clark tries to put her life back together after the death of Will Traynor, and joins a grief support group that may lead her to new love., by Jojo Moyes, Jojo Moyes, , 0, , Pamela Dorman/Viking, 9780525426592, 0525426590 |
| Hardcover Fiction | Hardcover Fiction | 2016-03-26 | 2016-04-10 | 12 | 12 | 35 | GO SET A WATCHMAN, In the mid-1950s, a grown-up Jean Louise Finch returns home to find that her adored father is not as perfect as she believed., by Harper Lee, Harper Lee, , 0, , Harper, 9780062409850, 0062409859 |
| Hardcover Fiction | Hardcover Fiction | 2016-03-26 | 2016-04-10 | 13 | 0 | 10 | MY NAME IS LUCY BARTON, A woman struggles with memories of her impoverished and disturbing childhood., by Elizabeth Strout, Elizabeth Strout, , 0, , Random House, 9781400067695, 1400067693 |
| Hardcover Fiction | Hardcover Fiction | 2016-03-26 | 2016-04-10 | 14 | 10 | 3 | THE STEEL KISS, Lincoln Rhyme and his new assistant, also a paraplegic, investigate a domestic terrorist who sabotages equipment., by Jeffery Deaver, Jeffery Deaver, , 0, , Grand Central, 9781455536344, 1455536342 |
| Hardcover Fiction | Hardcover Fiction | 2016-03-26 | 2016-04-10 | 15 | 7 | 2 | DEEP BLUE, Doc Ford, a Florida marine biologist and former government agent, tracks an American who is working with ISIS. The 23rd book in a series., by Randy Wayne White, Randy Wayne White, , 0, , Putnam, 9780399173516, 039917351X |
| Hardcover Fiction | Hardcover Fiction | 2016-03-26 | 2016-04-10 | 16 | 15 | 6 | THE WIDOW, When a suspect in a missing-child case dies, reporters and the police wrongly think they’ll get the real story from his widow., by Fiona Barton, Fiona Barton, , 0, , New American Library, 9781101990261, 1101990260 |
| Hardcover Fiction | Hardcover Fiction | 2016-03-26 | 2016-04-10 | 17 | 0 | 0 | A FEW OF THE GIRLS, A collection of the stories that spans the career of the Irish writer, who died in 2012., by Maeve Binchy, Maeve Binchy, , 0, , Knopf, 9781101947418, 1101947411 |
| Hardcover Fiction | Hardcover Fiction | 2016-03-26 | 2016-04-10 | 18 | 0 | 0 | THE SWANS OF FIFTH AVENUE, A novel based on the friendship between Truman Capote and Babe Paley and her coterie, which began in the 1950s and ended 20 years later in scandal., by Melanie Benjamin, Melanie Benjamin, , 0, , Delacorte, 9780345528698, 0345528697 |
| Hardcover Fiction | Hardcover Fiction | 2016-03-26 | 2016-04-10 | 19 | 0 | 0 | AT THE EDGE OF THE ORCHARD, Two generations of 19th-century American pioneer life unfold in Chevalier’s eighth novel., by Tracy Chevalier, Tracy Chevalier, , 0, , Viking, 9780525953005, 0525953000 |
| Hardcover Fiction | Hardcover Fiction | 2016-03-26 | 2016-04-10 | 20 | 0 | 0 | FIRE TOUCHED, The shape-shifter Mercy Thompson and her Alpha werewolf mate, Adam, protect a stolen human child., by Patricia Briggs, Patricia Briggs, , 0, , Ace, 9780425256763, 0425256766 |
fictionpaperback<- fromJSON("http://api.nytimes.com/svc/books/v3/lists.json?list=trade-fiction-paperback&api-key=56fec8351d568355fb3e456191f01316:13:29126896")
fpbooks<- fictionpaperback$results
dffp<- as.data.frame(fpbooks)
dffp<- subset(dffp[,c(1:7,12)])
kable(dffp)
| list_name | display_name | bestsellers_date | published_date | rank | rank_last_week | weeks_on_list | book_details |
|---|---|---|---|---|---|---|---|
| Trade Fiction Paperback | Paperback Trade Fiction | 2016-03-26 | 2016-04-10 | 1 | 0 | 68 | ME BEFORE YOU, A young woman who has barely been farther afield than her English village finds herself while caring for a wealthy, embittered quadriplegic., by Jojo Moyes, Jojo Moyes, , 0, , Penguin, 9780143124542, 0143124544 |
| Trade Fiction Paperback | Paperback Trade Fiction | 2016-03-26 | 2016-04-10 | 2 | 0 | 1 | THE GUILTY, Will Robie, the government’s ace assassin, learns that his estranged father is charged with murder, but his investigation is unwelcome., by David Baldacci, David Baldacci, , 0, , Grand Central, 9781455586431, 1455586439 |
| Trade Fiction Paperback | Paperback Trade Fiction | 2016-03-26 | 2016-04-10 | 3 | 0 | 50 | ROOM, The world of the 5-year-old boy who narrates this novel is the 11-by-11-foot room in which his mother is being held. The basis of the movie., by Emma Donoghue, Emma Donoghue, , 0, , Back Bay/Little, Brown, 9780316098328, 0316098329 |
| Trade Fiction Paperback | Paperback Trade Fiction | 2016-03-26 | 2016-04-10 | 4 | 0 | 22 | BROOKLYN, An unsophisticated young Irishwoman leaves her home for New York in the 1950s. The basis of the movie., by Colm Toibin, Colm Toibin, , 0, , Scribner, 9781501106477, 1501106473 |
| Trade Fiction Paperback | Paperback Trade Fiction | 2016-03-26 | 2016-04-10 | 5 | 0 | 30 | MY BRILLIANT FRIEND, The first installment in the author’s Neapolitan series, about the lifelong friendship between two women., by Elena Ferrante, Elena Ferrante, , 0, , Europa, 9781609450786, 1609450787 |
| Trade Fiction Paperback | Paperback Trade Fiction | 2016-03-26 | 2016-04-10 | 6 | 0 | 13 | A MAN CALLED OVE, An angry old curmudgeon gets new next-door neighbors, and things are about to change for all of them., by Fredrik Backman, Fredrik Backman, , 0, , Washington Square, 9781476738024, 1476738025 |
| Trade Fiction Paperback | Paperback Trade Fiction | 2016-03-26 | 2016-04-10 | 7 | 0 | 74 | THE MARTIAN, Separated from his crew, an astronaut embarks on a quest to stay alive on Mars. The basis of the movie., by Andy Weir, Andy Weir, , 0, , Broadway, 9780553418026, 0553418025 |
| Trade Fiction Paperback | Paperback Trade Fiction | 2016-03-26 | 2016-04-10 | 8 | 0 | 14 | THE REVENANT, Left for dead after a mauling, the master tracker Hugh Glass is consumed by a singular desire for revenge; an inspiration for the 2015 film., by Michael Punke, Michael Punke, , 0, , Picador, 9781250072689, 1250072689 |
| Trade Fiction Paperback | Paperback Trade Fiction | 2016-03-26 | 2016-04-10 | 9 | 0 | 8 | A LITTLE LIFE, Four college friends, one with a traumatic past, move to New York seeking fame and fortune., by Hanya Yanagihara, Hanya Yanagihara, , 0, , Anchor, 9780804172707, 0804172706 |
| Trade Fiction Paperback | Paperback Trade Fiction | 2016-03-26 | 2016-04-10 | 10 | 0 | 1 | THE LITTLE PARIS BOOKSHOP, Monsieur Perdu dispenses books to help mend broken hearts and decides to finally confront his own long-ago heartbreak., by Nina George, Nina George, , 0, , Broadway, 9780553418798, 0553418793 |
| Trade Fiction Paperback | Paperback Trade Fiction | 2016-03-26 | 2016-04-10 | 11 | 0 | 0 | THE ALCHEMIST, A Spanish shepherd boy ventures to Egypt in search of treasure., by Paulo Coelho, Paulo Coelho, , 0, , HarperOne/HarperCollins, 9780062315007, 0062315005 |
| Trade Fiction Paperback | Paperback Trade Fiction | 2016-03-26 | 2016-04-10 | 12 | 0 | 0 | READY PLAYER ONE, It’s 2044, life on a resource-depleted Earth has grown increasingly grim, and the key to a vast fortune is hidden in a virtual-reality world., by Ernest Cline, Ernest Cline, , 0, , Broadway, 9780307887443, 0307887448 |
| Trade Fiction Paperback | Paperback Trade Fiction | 2016-03-26 | 2016-04-10 | 13 | 0 | 0 | BIG LITTLE LIES, A death at an elementary school’s trivia night reveals the rivalries among the parents and raises questions of murder., by Liane Moriarty, Liane Moriarty, , 0, , Berkley, 9780425274866, 0425274861 |
| Trade Fiction Paperback | Paperback Trade Fiction | 2016-03-26 | 2016-04-10 | 14 | 0 | 0 | THE STORY OF A NEW NAME, Book 2 of the Neapolitan series continues the story of two women and their lifelong friendship., by Elena Ferrante, Elena Ferrante, , 0, , Europa, 9781609451349, 1609451341 |
| Trade Fiction Paperback | Paperback Trade Fiction | 2016-03-26 | 2016-04-10 | 15 | 0 | 0 | EVERY FIFTEEN MINUTES, A psychiatrist becomes the target of a sociopath., by Lisa Scottoline, Lisa Scottoline, , 0, , St. Martin’s Griffin, 9781250010124, 1250010128 |