Skip to content

Instantly share code, notes, and snippets.

@HarryStevens
Last active May 28, 2019
Embed
What would you like to do?
Swarmplot
license: gpl-3.0
height: 620

This is a rebuild of Lazaro Gamio's What to know about all of the men facing sexual misconduct allegations published in Axios. It's what seaborn calls a "swarmplot" – a beeswarm faceted by a property of the data.

Just as I was finishing this, I realized that the original chart is made of absolutely positioned HTML divs. My version is SVG. I also didn't go all out on the tooltips, but the basic idea is there.

I downloaded the data from https://graphics.axios.com/2017-12-12-sexual-misconduct-cases/data/data.json on 4 February, 2018.

{
"include": [
{
"name": "Harvey Weinstein",
"industry": "Entertainment",
"accuse_date": "10-05-2017",
"news_outlet": "The New York Times",
"article_link": "https://www.nytimes.com/2017/10/05/us/harvey-weinstein-harassment-allegations.html",
"image_url": "weinstein.png",
"title": "Hollywood producer",
"accusation": "More than 50 women have leveled accusations against him, including rape, sexual assault, and sexual harassment ",
"result": "Dropped from his film studio and under investigation by authorities in NY and LA."
},
{
"name": "Andy Signore",
"industry": "Media",
"accuse_date": "10-06-2017",
"news_outlet": "April Dawn on Twitter",
"article_link": "https://twitter.com/April13Dawn/status/916321623279493120",
"image_url": "signore.png",
"title": "Media executive ",
"accusation": "Accused of harassment by several women, and attempted assault by one.",
"result": "Fired by Defy Media. "
},
{
"name": "Ben Affleck",
"industry": "Entertainment",
"accuse_date": "10-10-2017",
"news_outlet": "Hilarie Burton on Twitter",
"article_link": "https://twitter.com/HilarieBurton/status/917898877663096832",
"image_url": "affleck.png",
"title": "Hollywood actor",
"accusation": "Multiple women accused the actor of inappropriate touching and harassment. ",
"result": "Apologized to Hilarie Burton via Twitter. "
},
{
"name": "Roy Price",
"industry": "Business",
"accuse_date": "10-12-2017",
"news_outlet": "The Hollywood Reporter",
"article_link": "https://www.hollywoodreporter.com/news/amazon-tv-producer-goes-public-harassment-claim-top-exec-roy-price-1048060",
"image_url": "price.png",
"title": "Amazon Studios president",
"accusation": "Accused of sexually harassing a producer of \"The Man in the High Castle.\"",
"result": "Resigned."
},
{
"name": "Oliver Stone",
"industry": "Entertainment",
"accuse_date": "10-13-2017",
"news_outlet": "The Hollywood Reporter",
"article_link": "https://www.hollywoodreporter.com/news/oliver-stone-accused-groping-tv-actress-early-1990s-1048468",
"image_url": "stone.png",
"title": "Hollywood filmmaker ",
"accusation": "Accused of groping a woman, and embarassing another women in a \"horrid\" audition. ",
"result": "Stone denied wrongdoing in the audition, and hasn't spoken on the groping. "
},
{
"name": "Bob Weinstein",
"industry": "Entertainment",
"accuse_date": "10-17-2017",
"news_outlet": "Variety",
"article_link": "http://variety.com/2017/tv/news/bob-weinstein-sexual-harassment-1202592165/",
"image_url": "weinstein-bob.png",
"title": "Hollywood producer ",
"accusation": "Executive producer of \"The Mist\" accused him of harassment. ",
"result": "Weinstein denied the allegation. "
},
{
"name": "Lockhart Steele",
"industry": "Media",
"accuse_date": "10-19-2017",
"news_outlet": "The Awl",
"article_link": "https://www.theawl.com/2017/10/lockhart-steele-fired-from-vox-media/",
"image_url": "steele.png",
"title": "Vox Media editorial director",
"accusation": "Eden Rohatensky, a former Vox web developer, accused \"one of the company's VPs\" of sexual misconduct. Vox said Steele, their editorial director,admitted to it.\")",
"result": "Fired. "
},
{
"name": "Robert Scoble",
"industry": "Tech",
"accuse_date": "10-19-2017",
"news_outlet": "Quinn Norton on Medium",
"article_link": "https://medium.com/@quinnnorton/robert-scoble-and-me-9b14ee92fffb",
"image_url": "scoble.png",
"title": "Tech blogger ",
"accusation": "Accused by multiple women of sexual misconduct. ",
"result": "Resigned. "
},
{
"name": "David Blaine",
"industry": "Entertainment",
"accuse_date": "10-19-2017",
"news_outlet": "The Daily Beast",
"article_link": "https://www.thedailybeast.com/exclusive-former-model-accuses-david-blaine-of-rape",
"image_url": "blaine.png",
"title": "Magician ",
"accusation": "Accused by one woman of rape, and another for sexual assault.",
"result": "He has denied the allegations. "
},
{
"name": "Gilbert Rozon",
"industry": "Business",
"accuse_date": "10-19-2017",
"news_outlet": "Le Devoir",
"article_link": "http://www.ledevoir.com/societe/actualites-en-societe/510755/gilbert-rozon-demission",
"image_url": "rozon.png",
"title": "Comedy festival founder ",
"accusation": "Several women accuse Rozon of sexual misconduct and aggression.",
"result": "Rozon steps down as head of the Just for Laughs festival. "
},
{
"name": "Chris Savino",
"industry": "Entertainment",
"accuse_date": "10-19-2017",
"news_outlet": "The Hollywood Reporter",
"article_link": "https://www.hollywoodreporter.com/live-feed/nickelodeon-fires-loud-house-creator-sexual-harassment-allegations-1050485",
"image_url": "savino.png",
"title": "Television show creator",
"accusation": "At least 12 women allege sexual harassment and inappropriate behavior.",
"result": "Fired from Nickelodeon."
},
{
"name": "Twiggy Ramirez",
"industry": "Music",
"accuse_date": "10-20-2017",
"news_outlet": "Jessicka Addams via Facebook",
"article_link": "https://www.facebook.com/MissJessickaAddams/posts/10155413298828005",
"image_url": "ramirez.png",
"title": "Bassist and guitarist for Marilyn Manson ",
"accusation": "Accused of rape and abuse by former girlfriend, Jessicka Adams. ",
"result": "Dropped by Marilyn Manson. "
},
{
"name": "Zain Jaffer",
"industry": "Tech",
"accuse_date": "10-20-2017",
"news_outlet": "San Francisco Chronicle",
"article_link": "http://www.sfgate.com/bayarea/article/San-Francisco-startup-CEO-charged-with-attempted-12294490.php",
"image_url": "jaffer.png",
"title": "CEO of the startup, Vungle",
"accusation": "Arrested for assaulting and sexually abusing his 3-year-old son.",
"result": "Fired, charged with several felony counts. "
},
{
"name": "James Toback",
"industry": "Entertainment",
"accuse_date": "10-22-2017",
"news_outlet": "The Los Angeles Times",
"article_link": "http://www.latimes.com/entertainment/la-et-mn-james-toback-sexual-harassment-allegations-20171018-story.html",
"image_url": "toback.png",
"title": "Director",
"accusation": "Accused by more than 300 women for sexual harassment.",
"result": "Toback denied the allegations to the L.A. Times."
},
{
"name": "Terry Richardson",
"industry": "Media",
"accuse_date": "10-23-2017",
"news_outlet": "The Telegraph",
"article_link": "http://www.telegraph.co.uk/news/2017/10/23/exclusive-terry-richardson-banned-working-vogue-leading-mags/",
"image_url": "richardson.png",
"title": "Fashion photographer ",
"accusation": "Accused of sexual misconduct and sexual exploitation of models. ",
"result": "Denied the allegations, was dropped by Condé Nast International. "
},
{
"name": "Leon Wieseltier ",
"industry": "Media",
"accuse_date": "10-24-2017",
"news_outlet": "Politico",
"article_link": "https://www.politico.com/story/2017/10/24/leon-wieseltier-new-republic-emerson-collective-workplace-conduct-244120",
"image_url": "wieseltier.png",
"title": "Former literary editor at The New Republic",
"accusation": "Several former New Republic employees allege sexual harassment.",
"result": "Backers pulled the plug on his new magazine."
},
{
"name": "Ethan Kath",
"industry": "Music",
"accuse_date": "10-24-2017",
"news_outlet": "Alice Glass via Twitter",
"article_link": "https://twitter.com/ALICEGLASS/status/922875671021436928?ref_src=twsrc%5Etfw&ref_url=http%3A%2F%2Fwww.complex.com%2Fmusic%2F2017%2F10%2Falice-glass-crystal-castles-ethan-kath-sexual-abuse",
"image_url": "kath.png",
"title": "Co-founder of the band Crystal Castles ",
"accusation": "Former singer, Alice Glass, accused him of rape and abuse.",
"result": "Suing Glass for defamation. "
},
{
"name": "Knight Landesman",
"industry": "Media",
"accuse_date": "10-25-2017",
"news_outlet": "The New York Times",
"article_link": "https://www.nytimes.com/2017/10/25/nyregion/knight-landesman-artforum-sexual-harassment-lawsuit.html",
"image_url": "landesman.png",
"title": "Publisher of Artforum magazine ",
"accusation": "Sued by at least 9 women for sexual harassment.",
"result": "Resigned."
},
{
"name": "George H.W. Bush",
"industry": "Politics",
"accuse_date": "10-25-2017",
"news_outlet": "Heather Lind via instagram",
"article_link": "http://www.businessinsider.com/george-h-w-bush-apologises-to-heather-lind-over-sexual-assault-claim-2017-10",
"image_url": "bush.png",
"title": "41st President of the United States",
"accusation": "Accused of inappropriate touching by several women. ",
"result": "Apologized through his spokesman."
},
{
"name": "Mark Halperin",
"industry": "Media",
"accuse_date": "10-26-2017",
"news_outlet": "CNN",
"article_link": "http://money.cnn.com/2017/10/25/media/mark-halperin-sexual-harassment-allegations/index.html",
"image_url": "halperin.png",
"title": "Political journalist, \"Game Change\" co-author",
"accusation": "Accused of sexual harassment while political director of ABC News by 5 women.",
"result": "Dropped by NBC and MSNBC, book deal cancelled, HBO miniseries scrapped."
},
{
"name": "John Besh",
"industry": "Business",
"accuse_date": "10-26-2017",
"news_outlet": "The Times-Picayune",
"article_link": "http://www.nola.com/business/index.ssf/2017/10/john_besh_restaurants_fostered.html",
"image_url": "besh.png",
"title": "Chef",
"accusation": "25 women alleged that the chef fostered a culture of sexual harassment.",
"result": "Stepped down from restaurant company."
},
{
"name": "Ken Baker",
"industry": "Media",
"accuse_date": "10-26-2017",
"news_outlet": "The Wrap",
"article_link": "http://variety.com/2017/tv/news/ken-baker-e-sexual-harassment-allegations-1202600640/",
"image_url": "baker.png",
"title": "Senior E! News correspondent ",
"accusation": "2 women allege sexual harassment.",
"result": "Under investigation by NBCUniversal. "
},
{
"name": "Rick Najera",
"industry": "Media",
"accuse_date": "10-26-2017",
"news_outlet": "Variety",
"article_link": "http://variety.com/2017/tv/news/cbs-diversity-showcase-director-rick-najera-exits-harassment-allegations-1202600365/",
"image_url": "najera.png",
"title": "Writer and producer ",
"accusation": "Accused of making inappropriate comments.",
"result": "Fired."
},
{
"name": "Kirt Webster",
"industry": "Music",
"accuse_date": "10-27-2017",
"news_outlet": "Austin Rick on Facebook",
"article_link": "https://www.nashvillescene.com/news/article/20981170/former-country-singer-accuses-pr-exec-kirt-webster-of-sexual-misconduct",
"image_url": "webster.png",
"title": "Country music producer",
"accusation": "Several men accused the country music producer of sexual assault and harassment.",
"result": "Dropped by famous clients and his namesake PR firm, which changed its name"
},
{
"name": "Kevin Spacey",
"industry": "Entertainment",
"accuse_date": "10-29-2017",
"news_outlet": "BuzzFeed",
"article_link": "https://www.buzzfeed.com/adambvary/anthony-rapp-kevin-spacey-made-sexual-advance-when-i-was-14",
"image_url": "spacey.png",
"title": "House of Cards star",
"accusation": "Multple men accused the House of Cards star of making unwanted sexual advances.",
"result": "Dropped by House of Cards, replaced in upcoming film he already completed."
},
{
"name": "Michael Fallon",
"industry": "Politics",
"accuse_date": "10-30-2017",
"news_outlet": "The Sun",
"article_link": "https://www.thesun.co.uk/news/4804165/michael-fallon-julia-hartely-brewer-westminster-sexual-allegations/",
"image_url": "fallon.png",
"title": "U.K. Defense Minister",
"accusation": "A British journalist accused him of inappropriately touching her knee.",
"result": "Resigned. "
},
{
"name": "Jeremy Piven",
"industry": "Entertainment",
"accuse_date": "10-30-2017",
"news_outlet": "Arienne Bellamar on Twitter",
"article_link": "https://twitter.com/ArianeBellamar/status/925104391748837377",
"image_url": "piven.png",
"title": "Entourage star",
"accusation": "3 women accused the Entourage star of sexual assault. ",
"result": "His pre-taped interview with Stephen Colbert was pulled."
},
{
"name": "Hamilton Fish",
"industry": "Media",
"accuse_date": "10-30-2017",
"news_outlet": "The Associated Press",
"article_link": "https://wtop.com/national/2017/10/ap-news-in-brief-at-604-a-m-edt-26/",
"image_url": "fish.png",
"title": "Publisher and President of New Republic",
"accusation": "Accused of several woman for inappropriate behavior and touching.",
"result": "Resigned. "
},
{
"name": "Michael Oreskes",
"industry": "Media",
"accuse_date": "10-31-2017",
"news_outlet": "The Washington Post",
"article_link": "https://www.washingtonpost.com/lifestyle/style/nprs-top-editor-accused-of-sexual-harassment-by-two-women/2017/10/31/a2078bea-bdf7-11e7-959c-fe2b598d8c00_story.html",
"image_url": "oreskes.png",
"title": "Senior Vice President of News at NPR",
"accusation": "2 women accused the NPR news chief of unwanted physical contact.",
"result": "Resigned. "
},
{
"name": "Andy Dick",
"industry": "Entertainment",
"accuse_date": "10-31-2017",
"news_outlet": "The Hollywood Reporter",
"article_link": "https://www.hollywoodreporter.com/rambling-reporter/andy-dick-fired-movie-sexual-harassment-claims-1053162",
"image_url": "dick.png",
"title": "Comedian and actor",
"accusation": "Multiple accusations of groping, unwanted kissing, licking, and sexual propositions.",
"result": "Dropped from two films."
},
{
"name": "Brett Ratner",
"industry": "Entertainment",
"accuse_date": "11-01-2017",
"news_outlet": "The Los Angeles Times",
"article_link": "http://www.latimes.com/business/hollywood/la-fi-ct-brett-ratner-allegations-20171101-htmlstory.html",
"image_url": "ratner.png",
"title": "Hollywood filmmaker ",
"accusation": "6 accusations of sexual assault and misconduct. ",
"result": "Denied by his lawyer. "
},
{
"name": "Dustin Hoffman",
"industry": "Entertainment",
"accuse_date": "11-01-2017",
"news_outlet": "The Hollywood Reporter",
"article_link": "https://www.hollywoodreporter.com/features/dustin-hoffman-sexually-harassed-me-i-was-17-guest-column-1053466",
"image_url": "hoffman.png",
"title": "Oscar winning actor",
"accusation": "Accused of groping one woman and sexually harassing another.",
"result": "Hoffman apologized. "
},
{
"name": "Jeff Hoover",
"industry": "Politics",
"accuse_date": "11-01-2017",
"news_outlet": "The Courier-Journal",
"article_link": "https://www.courier-journal.com/story/news/2017/11/01/jeff-hoover-sexual-harassment-claim/821468001/",
"image_url": "hoover.png",
"title": "Kentucky House Speaker",
"accusation": "Former staffer alleged sexual harassment, which he settled. ",
"result": "Resigned. "
},
{
"name": "Danny Jordaan",
"industry": "Sports",
"accuse_date": "11-01-2017",
"news_outlet": "Jennifer Ferguson via Facebook and personal website",
"article_link": "http://jenniferkestisferguson.blogspot.co.za/2017/11/now-we-are-three_1.html",
"image_url": "jordaan.png",
"title": "President of South African Football Association",
"accusation": "Former member of parliament in the ANC accused him of rape. ",
"result": "He denied the allegation. "
},
{
"name": "Nick Carter",
"industry": "Music",
"accuse_date": "11-02-2017",
"news_outlet": "Melissa Schuman via her personal blog",
"article_link": "https://melissaexplainsitall.wordpress.com/2017/11/02/__trashed/",
"image_url": "carter.png",
"title": "Singer in the Backstreet Boys.",
"accusation": "Accused of raping Melissa Schuman. ",
"result": "Carter denied it."
},
{
"name": "David Guillod",
"industry": "Business",
"accuse_date": "11-03-2017",
"news_outlet": "The Wrap",
"article_link": "https://www.thewrap.com/jessica-barth-ted-david-guillod-atomic-blonde-producer-drugged-assaulted-exclusive/",
"image_url": "guillod.png",
"title": "CEO of Primary Wave Entertainment.",
"accusation": "Actress accused him of drugging and sexually assaulting her.",
"result": "Took a leave of absence. "
},
{
"name": "Jack Latvala",
"industry": "Politics",
"accuse_date": "11-03-2017",
"news_outlet": "Politico",
"article_link": "https://www.politico.com/states/florida/story/2017/11/03/six-women-accuse-florida-senate-budget-chair-of-groping-sexual-harassment-115479",
"image_url": "latvala.png",
"title": "Florida Senate budget chair",
"accusation": "Allegedly sexually harassed a senate aide. ",
"result": "Denied the allegations, is being urged by colleagues to resign. "
},
{
"name": "Ed Westwick",
"industry": "Entertainment",
"accuse_date": "11-07-2017",
"news_outlet": "Variety",
"article_link": "http://variety.com/2017/tv/news/ed-westwick-rape-kristina-cohen-1202608732/",
"image_url": "westwick.png",
"title": "Gossip Girl star",
"accusation": "2 women allege rape.",
"result": "He said he's cooperating with authorities to be exonerated"
},
{
"name": "Alex Gilady",
"industry": "Sports",
"accuse_date": "11-07-2017",
"news_outlet": "Haaretz ",
"article_link": "https://www.haaretz.com/israel-news/1.821327",
"image_url": "gilady.png",
"title": "President of Israelie broadcasting company",
"accusation": "2 allegations of inappropriate advances, and three allegations of rape.",
"result": "Denied the allegations, but is stepping down."
},
{
"name": "Jeffrey Tambor",
"industry": "Entertainment",
"accuse_date": "11-08-2017",
"news_outlet": "Deadline Hollywoods",
"article_link": "http://deadline.com/2017/11/jeffrey-tambor-leaving-transparent-sexual-harassment-allegations-amazon-jill-soloway-1202211711/",
"image_url": "tambor.png",
"title": "Hollywood actor ",
"accusation": "2 \"Transparent\" coworkers accused him of sexual harassment.",
"result": "He resigned from the show. "
},
{
"name": "Benjamin Genocchio",
"industry": "Business",
"accuse_date": "11-08-2017",
"news_outlet": "The New York Times",
"article_link": "https://www.nytimes.com/2017/11/08/arts/design/ben-genocchio-armory-show-artnet.html",
"image_url": "genocchio.png",
"title": "Art critic and major art fair director ",
"accusation": "8 women allege inappropriate comments, 5 allege unwanted touching.",
"result": "Replaced as executive director of the Armory Show."
},
{
"name": "Steven Seagal",
"industry": "Entertainment",
"accuse_date": "11-08-2017",
"news_outlet": "Portia de Rossi via Twitter",
"article_link": "https://twitter.com/portiaderossi/status/928393978080358404",
"image_url": "seagal.png",
"title": "Actor",
"accusation": "Multiple allegations of sexual harassment.",
"result": "He's denied the allegations. "
},
{
"name": "Robert Knepper",
"industry": "Entertainment",
"accuse_date": "11-08-2017",
"news_outlet": "The Hollywood Reporter",
"article_link": "https://www.hollywoodreporter.com/news/robert-knepper-accused-sexual-assault-by-veteran-costume-designer-1055914",
"image_url": "knepper.png",
"title": "Prison Break star ",
"accusation": "5 allegations of sexual assault ",
"result": "Denied the allegations. "
},
{
"name": "Roy Moore",
"industry": "Politics",
"accuse_date": "11-09-2017",
"news_outlet": "The Washington Post",
"article_link": "https://www.washingtonpost.com/investigations/woman-says-roy-moore-initiated-sexual-encounter-when-she-was-14-he-was-32/2017/11/09/1f495878-c293-11e7-afe9-4f60b5a6c4a0_story.html",
"image_url": "moore.png",
"title": "GOP nominee for Alabama U.S. Senate seat",
"accusation": "9 accusations including sexual harassment and abuse. ",
"result": "He has denied the allegations, and lost the election."
},
{
"name": "Louis C.K.",
"industry": "Entertainment",
"accuse_date": "11-09-2017",
"news_outlet": "The New York Times",
"article_link": "https://www.nytimes.com/2017/11/09/arts/television/louis-ck-sexual-misconduct.html",
"image_url": "ck.png",
"title": "Comedian and actor",
"accusation": "5 women accused the comedian of sexual misconduct.",
"result": "His film premiere was canceled."
},
{
"name": "Matthew Weiner",
"industry": "Entertainment",
"accuse_date": "11-09-2017",
"news_outlet": "The Information",
"article_link": "https://www.theinformation.com/former-mad-men-writer-starts-nonprofit-after-alleged-harassment",
"image_url": "weiner.png",
"title": "Mad Men creator ",
"accusation": "Accused of sexual harassment by a former writer on Mad Men. ",
"result": "Denied the allegation. "
},
{
"name": "André Balazs",
"industry": "Business",
"accuse_date": "11-09-2017",
"news_outlet": "The New York Times",
"article_link": "https://www.nytimes.com/2017/11/09/style/andre-balazs-accused-of-groping-standard-chateau-marmont.html",
"image_url": "balazs.png",
"title": "Celebrity hotelier ",
"accusation": "Several accusations of groping women. ",
"result": "He has not yet spoken out about the allegations."
},
{
"name": "Eddie Berganza",
"industry": "Entertainment",
"accuse_date": "11-10-2017",
"news_outlet": "BuzzFeed",
"article_link": "https://www.buzzfeed.com/jtes/dc-comics-editor-eddie-berganza-sexual-harassment",
"image_url": "berganza.png",
"title": "DC Comics editor ",
"accusation": "Accused by 2 coworkers of sexual assault. ",
"result": "Fired. "
},
{
"name": "Andrew Kreisberg",
"industry": "Entertainment",
"accuse_date": "11-10-2017",
"news_outlet": "Variety",
"article_link": "http://variety.com/2017/tv/news/warner-bros-sexual-harassment-andrew-kreisberg-1202612522/",
"image_url": "kreisberg.png",
"title": "TV producer ",
"accusation": "15 women and 4 men allege harassment and inappropriate contact. ",
"result": "Fired by Warner Bros. TV Group"
},
{
"name": "George Takei",
"industry": "Entertainment",
"accuse_date": "11-10-2017",
"news_outlet": "The Hollywood Reporter",
"article_link": "https://www.hollywoodreporter.com/news/george-takei-accused-sexually-assaulting-model-1981-1056698",
"image_url": "takei.png",
"title": "Star Trek star ",
"accusation": "Accused of sexual assault by former male model. ",
"result": "He's denied the allegation."
},
{
"name": "Gary Goddard",
"industry": "Entertainment",
"accuse_date": "11-10-2017",
"news_outlet": "Anthony Edwards via Medium",
"article_link": "https://medium.com/@anthonyedwards/yes-mom-there-is-something-wrong-f2bcf56434b9",
"image_url": "goddard.png",
"title": "Hollywood director and producer ",
"accusation": "Two men accused him of assaulting them when they were underage. ",
"result": "Denied the allegations. "
},
{
"name": "Peter Aalbaek Jensen",
"industry": "Entertainment",
"accuse_date": "11-10-2017",
"news_outlet": "Politiken",
"article_link": "http://politiken.dk/kultur/art6201944/%C2%BBJeg-bruger-min-dominans-vel-vidende-at-det-er-en-tangent-p%C3%A5-mit-klaviatur%C2%AB",
"image_url": "jensen.png",
"title": "Danish film producer ",
"accusation": "9 women allege sexual misconduct, harassment, and bullying in the workplace.",
"result": "Sidelined by production company Zentropa. "
},
{
"name": "Richard Dreyfuss",
"industry": "Entertainment",
"accuse_date": "11-10-2017",
"news_outlet": "Vulture",
"article_link": "http://www.vulture.com/2017/11/richard-dreyfuss-accused-of-exposing-himself-to-woman.html",
"image_url": "dreyfuss.png",
"title": "Hollywood actor ",
"accusation": "Former coworker accused him of harassment and exposing himself to her.",
"result": "He's denied the allegations. "
},
{
"name": "Sepp Blatter",
"industry": "Sports",
"accuse_date": "11-10-2017",
"news_outlet": "Tribuna Espresso",
"article_link": "http://tribunaexpresso.pt/entrevistas-tribuna/2017-11-10-Hope-Solo-Sepp-Blatter-grabbed-my-ass.-Can-I-talk-about-that-",
"image_url": "blatter.png",
"title": "Former FIFA President",
"accusation": "Hope Solo accused him of groping her.",
"result": "Blatter's spokesman called the allegation \"ridiculous.\" "
},
{
"name": "Mark Schwahn",
"industry": "Entertainment",
"accuse_date": "11-13-2017",
"news_outlet": "Variety",
"article_link": "http://variety.com/2017/tv/news/one-tree-hill-3-1202614198/",
"image_url": "schwahn.png",
"title": "One Tree Hill creator and showrunner ",
"accusation": "Accused by dozens of female cast and crew members of sexual harassment.",
"result": "Schwahn was suspended and is being investigated. "
},
{
"name": "Tom Sizemore",
"industry": "Entertainment",
"accuse_date": "11-13-2017",
"news_outlet": "The Hollywood Reporter",
"article_link": "https://www.hollywoodreporter.com/news/tom-sizemore-was-removed-movie-set-allegedly-violating-11-year-old-girl-1057629",
"image_url": "sizemore.png",
"title": "Hollywood actor ",
"accusation": "Accused of molesting an 11-year-old girl in 2003.",
"result": "He denied the allegation. "
},
{
"name": "Giuseppe Castellano",
"industry": "Media",
"accuse_date": "11-14-2017",
"news_outlet": "Charlyne Yi via Twitter",
"article_link": "https://twitter.com/charlyne_yi/status/930478085027258368",
"image_url": "castellano.png",
"title": "Exec. art director at Penguin Random House",
"accusation": "Accused of sexual harassment. ",
"result": "Resigned."
},
{
"name": "Andy Henry",
"industry": "Entertainment",
"accuse_date": "11-15-2017",
"news_outlet": "The Hollywood Reporter",
"article_link": "https://www.hollywoodreporter.com/news/women-say-veteran-csi-casting-employee-coerced-disrobing-1058398",
"image_url": "henry.png",
"title": "Casting director ",
"accusation": "5 women accused him of pressuring them to disrobe at audition classes. ",
"result": "Fired from CSI in 2008, went on to work on several other films."
},
{
"name": "Al Franken",
"industry": "Politics",
"accuse_date": "11-16-2017",
"news_outlet": "Leeann Tweeden",
"article_link": "http://www.kabc.com/2017/11/16/leeann-tweeden-on-senator-al-franken/",
"image_url": "franken.png",
"title": "U.S. Senator ",
"accusation": "8 women accused Franken of sexual misconduct. ",
"result": "Plans to resign. "
},
{
"name": "Matt Zimmerman",
"industry": "Media",
"accuse_date": "11-16-2017",
"news_outlet": "Variety",
"article_link": "http://variety.com/2017/tv/news/nbc-news-booker-sexual-harassment-fired-severance-1202617053/",
"image_url": "zimmerman.png",
"title": "Senior VP of NBC News Talent Booking ",
"accusation": "Reportedly pursued inappropriate relationships with coworkers and sent inappropriate texts. ",
"result": "Fired, negotiating a severance package. "
},
{
"name": "Stephen Bittel",
"industry": "Politics",
"accuse_date": "11-16-2017",
"news_outlet": "Politico",
"article_link": "https://www.politico.com/states/florida/story/2017/11/16/florida-democratic-party-chair-apologizes-after-6-women-complain-of-demeaning-behavior-118364",
"image_url": "bittel.png",
"title": "Florida Democratic Party Chairman",
"accusation": "6 former staffers accused him of sexual harassment.",
"result": "Resigned. "
},
{
"name": "Russell Simmons",
"industry": "Music",
"accuse_date": "11-19-2017",
"news_outlet": "The Los Angeles Times",
"article_link": "http://www.latimes.com/business/hollywood/la-fi-brett-ratner-russell-simmons-20171119-htmlstory.html",
"image_url": "simmons.png",
"title": "Co-founder of music label Def Jam Recordings",
"accusation": "Accused by three women of rape, and two of sexual assault. ",
"result": "Simmons denied everything, stepped down from his companies."
},
{
"name": "Charlie Rose ",
"industry": "Media",
"accuse_date": "11-20-2017",
"news_outlet": "The Washington Post",
"article_link": "https://www.washingtonpost.com/investigations/eight-women-say-charlie-rose-sexually-harassed-them--with-nudity-groping-and-lewd-calls/2017/11/20/9b168de8-caec-11e7-8321-481fd63f174d_story.html",
"image_url": "rose.png",
"title": "Host of PBS' \"Charlie Rose,\" and co-host of \"CBS This Morning\"",
"accusation": "A total of 11 women have accused Rose of sexual misconduct. ",
"result": "Rose was dropped by CBS, PBS, and Bloomberg TV. "
},
{
"name": "Glenn Thrush",
"industry": "Media",
"accuse_date": "11-20-2017",
"news_outlet": "Vox",
"article_link": "https://www.vox.com/policy-and-politics/2017/11/20/16678094/glenn-thrush-new-york-times",
"image_url": "thrush.png",
"title": "NYT White House correspondent",
"accusation": "3 women accuse Thrush of making unwanted contact or advances.",
"result": "Suspended by the Times."
},
{
"name": "John Conyers",
"industry": "Politics",
"accuse_date": "11-21-2017",
"news_outlet": "BuzzFeed",
"article_link": "https://www.buzzfeed.com/paulmcleod/she-complained-that-a-powerful-congressman-harassed-her",
"image_url": "conyers.png",
"title": "U.S. Congressman",
"accusation": "Former staffers accused him of harassment and unwanted touching. ",
"result": "Resigned. "
},
{
"name": "John Lasseter",
"industry": "Business",
"accuse_date": "11-21-2017",
"news_outlet": "The Hollywood Reporter",
"article_link": "https://www.hollywoodreporter.com/news/john-lasseters-pattern-alleged-misconduct-detailed-by-disney-pixar-insiders-1059594",
"image_url": "lasseter.png",
"title": "Head of Pixar and Walt Disney Animation",
"accusation": "Accused by multiple women for unwanted touching. ",
"result": "Taking a 6 month sabbatical from Disney. "
},
{
"name": "Richard Branson",
"industry": "Business",
"accuse_date": "11-26-2017",
"news_outlet": "The Sun",
"article_link": "https://www.thesun.co.uk/news/4995275/richard-branson-motorboating-singer-claims/",
"image_url": "branson.png",
"title": "Founder of the Virgin Group",
"accusation": "Accused of sexually assaulting a woman in 2010. ",
"result": "Says he has no recollection of the event. "
},
{
"name": "Garrison Keillor",
"industry": "Media",
"accuse_date": "11-29-2017",
"news_outlet": "Minnesota Public Radio",
"article_link": "https://www.mpr.org/press/2017/11/29/statement-from-minnesota-public-radio-regarding-garrison-keillor-and-a-prairie-home-compa?date=2010/10/14",
"image_url": "keillor.png",
"title": "Public radio personality",
"accusation": "Multiple allegations of inappropriate behavior.",
"result": "Fired."
},
{
"name": "Johnny Iuzzini",
"industry": "Business",
"accuse_date": "11-29-2017",
"news_outlet": "Mic",
"article_link": "https://mic.com/articles/186356/4-former-employees-accuse-celebrity-chef-johnny-iuzzini-of-sexual-harassment-and-abuse",
"image_url": "iuzzini.png",
"title": "Celebrity chef ",
"accusation": "4 former employees accused him of sexual harassment and assault. ",
"result": "He denied the allegations."
},
{
"name": "Matt Lauer",
"industry": "Media",
"accuse_date": "11-29-2017",
"news_outlet": "NBC News",
"article_link": "https://www.nbcnews.com/storyline/sexual-misconduct/transcript-today-anchor-matt-lauer-fired-nbc-news-n825011",
"image_url": "lauer.png",
"title": "Today' anchor ",
"accusation": "3 women accused him of sexual harassment and misconduct. ",
"result": "Fired."
},
{
"name": "Israel Horovitz",
"industry": "Entertainment",
"accuse_date": "11-30-2017",
"news_outlet": "The New York Times",
"article_link": "https://www.nytimes.com/2017/11/30/theater/israel-horovitz-sexual-misconduct.html",
"image_url": "horovitz.png",
"title": "Playwright ",
"accusation": "9 accusations including rape, assault, or harassment. ",
"result": "Dropped by Gloucester Stage Company, which he co-founded."
},
{
"name": "Shervin Pishevar",
"industry": "Tech",
"accuse_date": "11-30-2017",
"news_outlet": "Bloomberg",
"article_link": "https://www.bloomberg.com/news/articles/2017-12-01/uber-investor-shervin-pishevar-accused-of-sexual-misconduct-by-multiple-women",
"image_url": "pishevar.png",
"title": "Venture capitalist ",
"accusation": "6 women accused him of sexual assault or harassment. ",
"result": "He left the firm he co-founded; denied allegations."
},
{
"name": "Blake Farenthold",
"industry": "Politics",
"accuse_date": "12-01-2017",
"news_outlet": "Politico",
"article_link": "https://www.politico.com/story/2017/12/01/blake-farenthold-taxpayer-funds-sexual-harassment-274458",
"image_url": "farenthold.png",
"title": "U.S. Congressman",
"accusation": "Settled a sexual harassment claim in 2014. ",
"result": "Under investigation from House Ethics Committee. "
},
{
"name": "Dylan Howard",
"industry": "Media",
"accuse_date": "12-05-2017",
"news_outlet": "The Associated Press",
"article_link": "https://www.apnews.com/61ec808965414abb810a6e2d84f06a79/AP-Exclusive:-Top-gossip-editor-accused-of-sexual-misconduct",
"image_url": "howard.png",
"title": "Top gossip magazine editor ",
"accusation": "Several accusations of harassment and inappropriate comments. ",
"result": "He told the AP the allegations were \"baseless.\" "
},
{
"name": "Trent Franks ",
"industry": "Politics",
"accuse_date": "12-08-2017",
"news_outlet": "Politico",
"article_link": "https://www.politico.com/story/2017/12/08/trent-franks-sex-surrogacy-impregnate-287808",
"image_url": "franks.png",
"title": "U.S. Congressman",
"accusation": "Accused of making unwanted advances towards female staffers. ",
"result": "Resigned. "
},
{
"name": "Alex Kozinski ",
"industry": "Politics",
"accuse_date": "12-08-2017",
"news_outlet": "Washington Post ",
"article_link": "https://www.washingtonpost.com/world/national-security/prominent-appeals-court-judge-alex-kozinski-accused-of-sexual-misconduct/2017/12/08/1763e2b8-d913-11e7-a841-2066faf731ef_story.html?utm_term=.c362f36c442d",
"image_url": "kozinski.png",
"title": "Judge for U.S. Court of Appeals for the 9th Circuit",
"accusation": "At least 15 women accused him of sexual harassment.",
"result": "Resigned. "
},
{
"name": "Mario Batali ",
"industry": "Business",
"accuse_date": "12-11-2017",
"news_outlet": "NY Eater",
"article_link": "https://ny.eater.com/2017/12/11/16759540/mario-batali-sexual-misconduct-allegations",
"image_url": "batali.png",
"title": "Chef ",
"accusation": "Four women allege inappropriate touching.",
"result": "He's stepped away from his company and ABCs \"The Chew.\""
},
{
"name": "Ryan Lizza",
"industry": "Media",
"accuse_date": "12-11-2017",
"news_outlet": "New Yorker statement",
"article_link": "https://twitter.com/mlcalderone/status/940326477446381569",
"image_url": "lizza.png",
"title": "New Yorker politics reporter ",
"accusation": "Alleged \"improper sexual misconduct.\" ",
"result": "Lizza denied the allegations, but was dropped by the New Yorker."
},
{
"name": "Tavis Smiley",
"industry": "Media",
"accuse_date": "12-13-2017",
"news_outlet": "Variety",
"article_link": "http://variety.com/2017/tv/news/tavis-smiley-pbs-1202639424/",
"image_url": "smiley.png",
"title": "PBS talk-show host ",
"accusation": "Multiple sexual msiconduct allegations.",
"result": "Suspended. "
},
{
"name": "Jerry Richardson",
"industry": "Sports",
"accuse_date": "12-17-2017",
"news_outlet": "Sports Illustrated",
"article_link": "https://www.si.com/jerry-richardson-carolina-panthers-settlements-workplace-misconduct-sexual-harassment-racial-slur?utm_campaign=sinow&utm_source=twitter.com&utm_medium=social&xid=socialflow_twitter_si",
"image_url": "j-richardson.png",
"title": "Carolina Panthers owner ",
"accusation": "At least 4 former employees have received settlements for \"inappropriate workplace comments\"",
"result": "He is selling the team at the end of the 2017 season."
},
{
"name": "T.J. Miller",
"industry": "Entertainment",
"accuse_date": "12-19-2017",
"news_outlet": "The Daily Beast",
"article_link": "https://www.thedailybeast.com/silicon-valley-star-tj-miller-accused-of-sexually-assaulting-and-punching-a-woman",
"image_url": "miller.png",
"title": "Silicon Valley actor ",
"accusation": "Accused of sexually assaulting and punching a woman while in college, and harassing another.",
"result": "Denied the assault allegations, hasn't responded on the harassment. "
},
{
"name": "Jordan Vogt-Roberts",
"industry": "Entertainment",
"accuse_date": "12-19-2017",
"news_outlet": "Huffington Post",
"article_link": "https://www.huffingtonpost.com/entry/adult-film-star-accuses-tj-and-jordan-vogt-roberts-of-sexual-harassment_us_5a398b10e4b0b0e5a79e025b",
"image_url": "roberts.png",
"title": "Director ",
"accusation": "Adult film star accused him of forcefully kissing her, and harassing her with T.J. Miller",
"result": "He has not yet responded. "
},
{
"name": "Andrea Ramsey ",
"industry": "Politics",
"accuse_date": "12-15-2017",
"news_outlet": "The Kansas City Star",
"article_link": "http://www.kansascity.com/news/politics-government/article189931704.html",
"image_url": "ramsey.png",
"title": "Kansas Democratic candidate ",
"accusation": "Accused of sexually harassing and then firing a male suboordinate. ",
"result": "She has dropped out of the race."
},
{
"name": "Mike Germano ",
"industry": "Media",
"accuse_date": "12-23-2017",
"news_outlet": "The New York Times",
"article_link": "https://www.nytimes.com/2017/12/23/business/media/vice-sexual-harassment.html",
"image_url": "germano.png",
"title": "Chief Digital Officer at Vice Media",
"accusation": "Two women accused him of harassment. ",
"result": "He was fired in January. "
},
{
"name": "Charlie Walk",
"industry": "Music",
"accuse_date": "1-1-2018",
"news_outlet": "Billboard",
"article_link": "https://www.billboard.com/articles/news/8097342/charlie-walk-republic-two-women-accuse-sexual-harassment",
"image_url": "walk.png",
"title": "President of Republic Records Group",
"accusation": "Accused by three women of harassment. ",
"result": "Fired from the Fox network show The Four. "
},
{
"name": "James Franco",
"industry": "Entertainment",
"accuse_date": "1-11-2018",
"news_outlet": "The Los Angeles Times",
"article_link": "http://www.latimes.com/business/hollywood/la-fi-ct-james-franco-allegations-20180111-htmlstory.html",
"image_url": "franco.png",
"title": "Actor ",
"accusation": "Five women accuse Franco of inappropriate and exploitative sexual behavior.",
"result": "He denied the allegations, and was removed from Vanity Fair's Hollywood cover."
},
{
"name": "Aziz Ansari",
"industry": "Entertainment",
"accuse_date": "1-13-2018",
"news_outlet": "Babe",
"article_link": "https://babe.net/2018/01/13/aziz-ansari-28355",
"image_url": "ansari.png",
"title": "Commedian/Actor ",
"accusation": "Accused of sexual assaulting a woman he went on a date with.",
"result": "He said he believed the encounter was consensual, and apologized at the time. "
},
{
"name": "Michael Douglas",
"industry": "Entertainment",
"accuse_date": "1-18-2018",
"news_outlet": "The Hollywood Reporter",
"article_link": "https://www.hollywoodreporter.com/features/michael-douglas-alleged-harassment-media-metoo-moment-1075609",
"image_url": "douglas.png",
"title": "Actor",
"accusation": "Writer Susan Braudy accused him of repeated sexual harassment.",
"result": "He preemptively denied it before it was published. "
},
{
"name": "Patrick Meehan",
"industry": "Politics",
"accuse_date": "1-20-2018",
"news_outlet": "The New York Times",
"article_link": "https://www.nytimes.com/2018/01/20/us/politics/patrick-meehan-sexual-harassment.html",
"image_url": "meehan.png",
"title": "Congressman",
"accusation": "Settled a sexual harassment claim last year with a former aide. ",
"result": "He is no longer running for re-election. "
},
{
"name": "Robert Moore",
"industry": "Media",
"accuse_date": "1-22-2018",
"news_outlet": "NPR",
"article_link": "https://www.npr.org/sections/thetwo-way/2018/01/22/579840869/new-york-daily-news-exec-investigated-after-harassment-complaint",
"image_url": "moore.png",
"title": "Top editor at New York Daily News",
"accusation": "Accused by several women of sexual harassment.",
"result": "Fired. "
},
{
"name": "David Copperfield ",
"industry": "Media",
"accuse_date": "1-25-2018",
"news_outlet": "The Wrap ",
"article_link": "https://www.thewrap.com/david-copperfield-accused-drugging-assaulting-17-year-old-model-1988/",
"image_url": "copperfield.png",
"title": "Magician ",
"accusation": "A woman says he drugged and assaulted her when she was 17.",
"result": "He denied the allegations in a statement. "
},
{
"name": "Alexander \"Doc\" Jones",
"industry": "Media",
"accuse_date": "1-25-2018",
"news_outlet": "The New York Post",
"article_link": "https://nypost.com/2018/01/25/another-daily-news-editor-accused-of-sexual-misconduct/",
"image_url": "doc-jones.png",
"title": "New York Daily News editor ",
"accusation": "Accused of forcefully kissing younger staffers. ",
"result": "Fired."
},
{
"name": "Steve Wynn",
"industry": "Business",
"accuse_date": "1-26-2018",
"news_outlet": "The Wall Street Journal",
"article_link": "https://www.wsj.com/articles/dozens-of-people-recount-pattern-of-sexual-misconduct-by-las-vegas-mogul-steve-wynn-1516985953?mg=prod/accounts-wsj",
"image_url": "wynn.png",
"title": "Casino mogul ",
"accusation": "Dozens of women accuse him of decades of sexual misconduct. ",
"result": "He denied the allegations. "
},
{
"name": "Wayne Pacelle",
"industry": "Business",
"accuse_date": "1-29-2018",
"news_outlet": "The Washington Post ",
"article_link": "https://www.washingtonpost.com/business/economy/humane-society-ceo-is-subject-of-sexual-harassment-complaints-from-three-women-according-to-internal-investigation/2018/01/29/12c8961e-053b-11e8-94e8-e8b8600ade23_story.html?utm_term=.78be4033ab0a",
"image_url": "pacelle.png",
"title": "Humane Society CEO",
"accusation": "Three complaints of sexual harassment were filed against him.",
"result": "He resigned. "
},
{
"name": "Patrick Witty",
"industry": "Media",
"accuse_date": "1-31-2018",
"news_outlet": "Vox",
"article_link": "https://www.vox.com/2018/1/29/16934552/exclusive-national-geographic-sexual-misconduct",
"image_url": "witty.png",
"title": "National Geographic photo editor ",
"accusation": "Accused by several women of sexual misconduct and unwanted advances.",
"result": "He was fired after an HR investigation. "
},
{
"name": "Don Shooter",
"industry": "Politics",
"accuse_date": "1-31-2018",
"news_outlet": "Arizona Capitol Times",
"article_link": "https://azcapitoltimes.com/news/2017/11/08/arizona-don-shooter-sexual-harassment-capitol-michellle-ugenti-rita-athena-salman/",
"image_url": "shooter.png",
"title": "Republican Arizona State Congressman",
"accusation": "Accused of sexual harassment and unwanted touching by several women.",
"result": "Expelled from the House."
},
{
"name": "Vincent Cirrincione",
"industry": "Entertainment",
"accuse_date": "2-2-2018",
"news_outlet": "The Washington Post",
"article_link": "https://www.washingtonpost.com/business/economy/he-helped-halle-berry-and-taraji-henson-to-stardom-now-9-minority-women-are-accusing-him-of-sexual-harassment/2018/02/02/259e8196-f590-11e7-b34a-b85626af34ef_story.html?utm_term=.bd3e4ecb7568",
"image_url": "cirrincione.png",
"title": "Hollywood manager",
"accusation": "Several minority women accused him of sexual misconduct. ",
"result": "He denied seeking sexual favors for representation."
}
]
}
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
body {
font-family: "Helvetica Neue", sans-serif;
margin: 0;
}
#wrapper {
max-width: 900px;
margin: 0 auto;
}
.circle {
pointer-events: none;
}
.circle-bg {
stroke: steelblue;
fill: steelblue;
fill-opacity: .3;
pointer-events: none;
}
.circle-hover {
opacity: 0;
}
.axis .domain {
display: none;
}
.axis text {
font-size: 1.2em;
}
.axis.y.right .tick text {
fill: steelblue;
}
.axis.y .tick line {
stroke: #eee;
stroke-width: 10px;
}
.axis.x .tick line {
stroke: #ccc;
}
.tip {
position: absolute;
font-size: .8em;
text-align: center;
text-shadow: -1px -1px 1px #ffffff, -1px 0px 1px #ffffff, -1px 1px 1px #ffffff, 0px -1px 1px #ffffff, 0px 1px 1px #ffffff, 1px -1px 1px #ffffff, 1px 0px 1px #ffffff, 1px 1px 1px #ffffff;
}
</style>
</head>
<body>
<div id="wrapper"></div>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://unpkg.com/d3-moveto@0.0.3/build/d3-moveto.min.js"></script>
<script src="https://unpkg.com/jeezy@1.12.13/lib/jeezy.min.js"></script>
<script>
var radius = 12;
var margin = {top: radius * 2.5 + 10, left: 90, bottom: radius, right: 30},
width = +jz.str.keepNumber(d3.select("#wrapper").style("width")) - margin.left - margin.right,
height = 600 - margin.top - margin.bottom,
svg = d3.select("#wrapper").append("svg")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + ", " + margin.top + ")");
var x = d3.scaleTime()
.rangeRound([0, width]);
var y = d3.scaleBand()
.rangeRound([0, height]);
var curr_month = "";
var x_axis = d3.axisBottom(x)
.tickSizeOuter(0)
.ticks(d3.timeDay.every(1))
.tickFormat(function(d){
var s = d.toString().split(" ");
var m = s[1];
if (m !== curr_month){
curr_month = m;
return m + ".";
} else {
return null;
}
});
var y_axis_left = d3.axisLeft(y)
.tickSize(0)
var y_axis_right = d3.axisRight(y)
.tickSizeOuter(0)
.tickSizeInner(-width);
var v = d3.voronoi()
.extent([[0, 0], [width, height]])
.x(function(d) { return d.x; })
.y(function(d) { return d.y; });
var parseDate = function(x){
var s = x.split("-");
var d = [s[2], s[0], s[1]].join("-");
return new Date(d);
}
// defs for images
var defs = d3.select("svg").append("defs");
// append the tip
var tip = d3.select("#wrapper").append("div")
.attr("class", "tip");
d3.json("data.json", function(error, data){
if (error) throw error;
data = data.include;
data.forEach(function(d){
d.accuse_date = parseDate(d.accuse_date);
d.slug = jz.str.toSlugCase(d.name);
return d;
});
x.domain([new Date(2017, 9, 1), data[data.length - 1].accuse_date]);
var industries = jz.arr.sortBy(jz.arr.pivot(data, "industry"), "count", "desc");
y.domain(industries.map(function(d){ return d.value; }));
x_axis.tickSizeInner(-height + y.bandwidth() / 2 - 3)
svg.append("g")
.attr("class", "axis y left")
.call(y_axis_left)
.selectAll(".tick text")
.attr("dx", -radius);
svg.append("g")
.attr("class", "axis y right")
.attr("transform", "translate(" + width + ", 0)")
.call(y_axis_right.tickFormat(function(d){ return industries.filter(function(c){ return c.value == d })[0].count; }))
.selectAll(".tick text")
.attr("dx", radius);
svg.append("g")
.attr("class", "axis x")
.attr("transform", "translate(0, " + height + ")")
.call(x_axis)
.selectAll(".tick line")
.style("display", function(d){
var s = d.toString().split(" ");
var m = s[1];
if (m !== curr_month){
curr_month = m;
return "block";
} else {
return "none";
}
});
// images
var img = defs.selectAll("pattern")
.data(data, function(d){ return d.slug; })
.enter().append("pattern")
.attr("id", function(d){ return "img-" + d.slug; })
.attr("x", "0%")
.attr("y", "0%")
.attr("height", "100%")
.attr("width", "100%")
.attr("viewBox", "0 0 " + radius + " " + radius)
.append("image")
.attr("x", "0%")
.attr("y", "0%")
.attr("width", radius)
.attr("height", radius)
.attr("xlink:href", function(d){ return "https://graphics.axios.com/2017-12-12-sexual-misconduct-cases/img/" + d.image_url; })
forceSim();
draw();
window.addEventListener("resize", function(){
// all of these things need to be updated on resize
width = +jz.str.keepNumber(d3.select("#wrapper").style("width")) - margin.left - margin.right;
d3.select(".axis.y.right").attr("transform", "translate(" + width + ", 0)").call(y_axis_right.tickSizeInner(-width));
x.rangeRound([0, width]);
forceSim();
d3.select(".x.axis")
.call(x_axis);
draw();
});
function draw(){
// circle
var circle = svg.selectAll(".circle")
.data(v.polygons(data), function(d){ return d.data.slug; });
circle.enter().append("circle")
.attr("class", function(d) { return "circle circle-" + d.data.slug; })
.attr("r", radius)
.style("fill", function(d){ return "url(#img-" + d.data.slug + ")"; })
.merge(circle)
.attr("cx", function(d) { return d ? d.data.x : null; })
.attr("cy", function(d) { return d ? d.data.y : null; });
// background
var bg_circle = svg.selectAll(".circle-bg")
.data(v.polygons(data), function(d){ return d.data.slug; });
bg_circle.enter().append("circle")
.attr("class", function(d) { return "circle-bg circle-bg-" + d.data.slug; })
.attr("r", radius)
.merge(bg_circle)
.attr("cx", function(d) { return d ? d.data.x : null; })
.attr("cy", function(d) { return d ? d.data.y : null; });
// hover
var hover_circle = svg.selectAll(".circle-hover")
.data(v.polygons(data), function(d){ return d.data.slug; });
hover_circle.enter().append("circle")
.attr("class", function(d) { return "circle-hover circle-hover-" + d.data.slug; })
.attr("r", radius)
.merge(hover_circle)
.attr("cx", function(d) { return d ? d.data.x : null; })
.attr("cy", function(d) { return d ? d.data.y : null; });
svg.selectAll(".circle-hover").on("mouseover", function(d){
tip.html(d.data.name);
d3.select(".circle-" + d.data.slug).attr("r", radius * 2.5).moveToFront();
d3.select(".circle-bg-" + d.data.slug).style("fill-opacity", 0).attr("r", radius * 2.5).style("stroke-width", 3).moveToFront();
var tip_width = +jz.str.keepNumber(tip.style("width"));
var tip_height = +jz.str.keepNumber(tip.style("height"));
var circle_node = d3.select(this).node().getBoundingClientRect();
var circle_left = circle_node.left;
var circle_top = circle_node.top;
var tip_left = circle_left - tip_width / 2 + radius;
var tip_top = circle_top - radius * 1.5 - tip_height;
tip
.style("left", tip_left + "px")
.style("top", tip_top + "px");
}).on("mouseout", function(d){
d3.select(".circle-" + d.data.slug).attr("r", radius);
d3.select(".circle-bg-" + d.data.slug).style("fill-opacity", .3).attr("r", radius).style("stroke-width", 1);
tip
.style("left", "-1000px")
.style("top", "-1000px");
});
}
function forceSim(){
var simulation = d3.forceSimulation(data)
.force("y", d3.forceY(function(d){ return y(d.industry) + y.bandwidth() / 2; }).strength(1))
.force("x", d3.forceX(function(d){ return x(d.accuse_date); }).strength(1))
.force("collide", d3.forceCollide(radius + 1))
.stop();
for (var i = 0; i < 200; ++i) simulation.tick();
}
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment