please see questions in the documents 1.5 Problem 1.5 (5 points) For the next problem, we would
Fantastic news! We've Found the answer you've been seeking!
Question:
please see questions in the documents
1.5
Transcribed Image Text:
Problem 1.5 (5 points) For the next problem, we would like to draw a "dumbbell plot" (sometimes called a ranged dot plot). Our version will allow us to compare the difference between certain actor categories by gender (with a hint as to whether the movie passed the Bechdel Test in the color of the range line). It will look something like this when we're done: Moana- The Jungle Book Captain America: Civil War Star Trek Beyond The Secret Life of Pets- Jason Bourne Rogue One Doctor Strange Finding Dory Suicide Squad Kung Fu Panda 3- Zootopia Deadpool Trolls Sing Fantastic Beasts and Where to Find T... X-Men: Apocalypse La La Land Hidden Figures Batman v Superman: Dawn of Justice 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 typeCount passed Bechdel, gender Female Male failed passed Creating this requires layering a range line (specified using the 'Line' mark) and the dots (using 'Circle'). As you can see below, our first attempt failed because the mark_line tries to connect all the points. Modify one line to generate the example above. Hint: find the documentation for the mark type on the vega-lite site. [] # modify the following function by adding one line of code def problem15 (indf, movieOrder, typeString): IIIIII input: base -- 'base' chart as defined above HAH-H # grab a subset of the data for M/F and for the type described in the type string subset indf [(indf. roleType== typeString) & (indf.gender = "Unknown")] # create the dot plot typeDots alt. Chart (subset).mark_circle(size=200, opacity=1).encode( ) color='gender', y=alt. Y('movieName: N', sort='x'), x=alt.x('typeCount: Q') # Add *one line* so that the rangeLine will draw a line between the male and female dots rangeLine typeDots.mark_line(strokeWidth=5).encode( color='passedBechdel:N' ) # YOUR CODE HERE raise NotImplementedError() Problem 1.5 (5 points) For the next problem, we would like to draw a "dumbbell plot" (sometimes called a ranged dot plot). Our version will allow us to compare the difference between certain actor categories by gender (with a hint as to whether the movie passed the Bechdel Test in the color of the range line). It will look something like this when we're done: Moana- The Jungle Book Captain America: Civil War Star Trek Beyond The Secret Life of Pets- Jason Bourne Rogue One Doctor Strange Finding Dory Suicide Squad Kung Fu Panda 3- Zootopia Deadpool Trolls Sing Fantastic Beasts and Where to Find T... X-Men: Apocalypse La La Land Hidden Figures Batman v Superman: Dawn of Justice 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 typeCount passed Bechdel, gender Female Male failed passed Creating this requires layering a range line (specified using the 'Line' mark) and the dots (using 'Circle'). As you can see below, our first attempt failed because the mark_line tries to connect all the points. Modify one line to generate the example above. Hint: find the documentation for the mark type on the vega-lite site. [] # modify the following function by adding one line of code def problem15 (indf, movieOrder, typeString): IIIIII input: base -- 'base' chart as defined above HAH-H # grab a subset of the data for M/F and for the type described in the type string subset indf [(indf. roleType== typeString) & (indf.gender = "Unknown")] # create the dot plot typeDots alt. Chart (subset).mark_circle(size=200, opacity=1).encode( ) color='gender', y=alt. Y('movieName: N', sort='x'), x=alt.x('typeCount: Q') # Add *one line* so that the rangeLine will draw a line between the male and female dots rangeLine typeDots.mark_line(strokeWidth=5).encode( color='passedBechdel:N' ) # YOUR CODE HERE raise NotImplementedError()
Expert Answer:
Related Book For
Essentials of business communication
ISBN: 978-1111821227
8th Edition
Authors: Mary Ellen guffey, Dana loewy
Posted Date:
Students also viewed these programming questions
-
On graph paper, draw the ATC, AVC, and MC curves for a competitive firm. 1. Why are they not straight lines? That is why do they first slope down and then increase? 2. Why does the ATC decline over a...
-
This horizontal bar graph shows the top ten states for traveler spending in a recent year. Use this graph to answer in below Exercises. See Sections 1.2 and 1.3. 1. For the states shown, which states...
-
Use a software package such as Matlab or Mathematica to program the example described in section 7.3. (a) Assume the environmental regulator ignores the impact on the labor market and sets an...
-
An ideal refrigeration cycle uses R134a as the working fluid. The known properties are: State 1: 160 kPa State 3: 608C. If the mass flux is 0.8 kg/s. calculate: (i) The lowest temperature in. the...
-
During a subsoil exploration program, undisturbed normally consolidated silty clay samples were collected in Shelby tubes from location A as shown in Figure 13.62. Following are the results of four...
-
Christopher Boling was seriously injured in 2008 when vapors escaping from a gas can ignited. He filed a products liability claim against the manufacturer. To fund the litigation, Boling entered into...
-
On January 1, 2012, the ledger of Kindt Company contained these liability accounts. Accounts Payable .........$42,500 Sales Taxes Payable .........6,600 Unearned Service Revenue .....19,000 During...
-
What are the reasons to use a relational database? What data does not fit well in the relational model?
-
A man lends 6,000 for four years at 6.05 simple interest. At the end of this period, he invests the full sum at 5.01% compounded annually for a period of 12 years. How much money will he have at the...
-
The frequency table for a small advertising campaign looks like this: 1 exposures: 28% of population 2 exposures: 25% of population 3 exposures: 11% of population The rest of the population was not...
-
Simplify the following Boolean expressions to a minimum number of literals. a) (A'+C)(AD+AD') + AC+C b) A'BC+ABC' + ABC + A'B'C c) (AB)'(A+B)(B'+B) 2. (5 points) Find the complement of the following...
-
7 7 x x5 If F(x) is the antiderivative of f(x) satisfying F(1) = 0, find F(x). F(x) = Let f(x) be the function f(x) = -
-
Create an ER diagram for a hospital management system. Define entities such as patients, doctors, nurses, and appointments, and illustrate their relationships.
-
Communicate Mathematical Ideas - The Moore's monthly income increases by $500, but the mortgage expense stays the same. Explain how to find what percent of the budget the mortgage payment would now...
-
Suppose there's an appliance store that sells refrigerators. It could set its price high and sell very few refrigerators, or it could set its price low and sell many more refrigerators. The following...
-
Medi-Exam Health Services, Inc. (MEHS), located in a major metropolitan area, provides annual physical screening examinations, including a routine physical, EKG, and blood and urine tests. MEUS's...
-
Ethical Issue: Should companies automatically grant adjustments? For example, some customers buy a video camera or a dress for a special event and return the product afterward. What safeguards could...
-
Recall a time when you experienced a problem as a result of poor communication. What were the causes of and possible remedies for the problem?
-
How can the three-phase writing process help the writer of a business report as well as the writer of an oral presentation?
-
A 17 g audio compact disk has a diameter of 12 cm. The disk spins under a laser that reads encoded data. The first track to be read is 2.3 cm from the axis; as the disk plays, the laser scans tracks...
-
A spin bike is an indoor bike that is designed to duplicate the feeling of regular road cycling. A typical spin bike has a very heavy flywheel. A friction pad or other brake provides damping that...
-
A trap-jaw ant has mandibles that can snap shut with some force, as you might expect from its name. The formidable snap is good for more than capturing prey. When an ant snaps its jaws against the...
Study smarter with the SolutionInn App