Python Data Visualization Coursera Quiz Answers

All Weeks Python Data Visualization Coursera Quiz Answers

Python Data Visualization Coursera Quiz Answers

Week 1: Introduction to Data Visualization Tools

Q1. Matplotlib was created by John Hunter, an American neurobiologist, and was originally developed as an EEG/ECoG visualization tool.

  • True.
  • False.

Q2. Using the notebook backend, you cannot modify a figure after it is rendered.

  • True.
  • False.

Q3. %matplotlib inline is an example of Matplotlib magic functions.

  • True.
  • False.

Week 2: Basic Visualization Tools

Q1. Area plots are unstacked by default.

  • True.
  • False.

Q2. The following code will create a histogram of a pandas series, series_data, and align the bin edges with the horizontal tick marks.

1 count, bin_edges = np.histogram(series_data)
2 series_data.plot(kind='hist', xticks = count, bin_edges)
  • True.
  • False.

Q3. The following code will create a horizontal bar chart of the data in a pandas dataframe, question.

1 question.plot(type='bar', rot=90)
  • True.
  • False.

Week 3: Python Data Visualization

Quiz 1: Advanced Visualization Tools

Q1. Seaborn is a Python visualization library that provides a high-level interface for drawing attractive statistical graphics, such as regression plots and box plots.

  • True.
  • False.

Q2. The following code

1 import seaborn as sns
2 ax = sns.regplot(x="year", y="total", data=data_df, color="green", marker="+")
3


creates the following regression plot.

Python Data Visualization Coursera Quiz Answers
  • True.
  • False.

Q3. The easiest way to create a waffle chart in Python is using the Python package, PyWaffle.

  • True.
  • False.

Quiz 2: Visualizing Geospatial Data

Q1. You cluster markers, superimposed onto a map in Folium, using a marker cluster object.

  • True.
  • False.

Q2. If you are interested in generating a map of Spain to visualize its hill shading and natural vegetation, which of the following lines of code will create the right map for you? (Try and code yourself before answering this question.)

  • folium.Map(location=[40.4637, -3.7492], zoom_start=6, tiles=’Stamen Terrain’)
  • folium.Map(location=[-40.4637, -3.7492], zoom_start=6, tiles=’Stamen Toner’)
  • folium.Map(location=[40.4637, 3.7492], zoom_start=6)
  • folium.Map(location=[40.4637, 3.7492], zoom_start=6, tiles=’Stamen Terrain’)
  • folium.Map(location=[40.4637, 3.7492], zoom_start=6, tiles=’Stamen Toner’)

Q3. In choropleth maps, the higher the measurement of the statistical variable being displayed on the map, the lighter the color.

  • True.
  • False.

Week 4: Python Data Visualization

Quiz 1: Practice Quiz

Q1. Dashboards can provide real-time visuals.

  • True
  • False

Quiz 2: Graded Quiz

Q1. Plotly express is a ________ wrapper

Low-level

High-level

Q2. @app_callback is the callback decorator.

  • True
  • False

Q3. Choose correct way of adding callback decorator

  • @app.callback[Output(component_id=’bar-plot’, component_property=’figure’), Input(component_id=’input-yr’, component_property=’value’)]
  • @app.callback( Output{component_id=’bar-plot’, component_property=’figure’}, Input{component_id=’input-yr’, component_property=’value’})
  • @app.callback( Output(component_id=’bar-plot’, component_property=’figure’), Input(component_id=’input-yr’, component_property=’value’))

Week 5: Final Exam

Q1. According to the author in the video, what does Dark Horse Analytics state are the 3 best practices for creating a visual?

  • Less is more effective; Less is not attractive; Less is more impactive.
  • Less is not effective; Less is not attractive; Less is not impactive.
  • None of the above.
  • Less is more effective; Less is more attractive; Less is more impactive.

Q2. Which of the following is a layer in the Matplotlib architecture?

  • FigureCanvas Layer
  • Figure Layer
  • Backend Layer
  • Backend_Bases Layer

Q3. The following code uses what layer to create a stacked area plot of the data in the pandas dataframe, area_df?

  • ax = area_df.plot(kind=’area’, figsize=(20, 10)) ax.set_title(‘Plot Title’) ax.set_ylabel(‘Vertical Axis Label’) ax.set_xlabel(‘Horizontal Axis Label’)
  • Scripting layer
  • Backend Layer
  • Artist layer
  • None of the above

Q4. Which of the following code will create a stacked area plot of the data in the pandas dataframe, area_df, with a transparency value of 0.75?

  • import matplotlib.pyplot as plt transparency = 0.75 area_df.plot(kind=’area’, alpha=transparency, figsize=(20, 10)) plt.title(‘Plot Title’) plt.ylabel(‘Vertical Axis Label’) plt.xlabel(‘Horizontal Axis Label’) plt.show()
  • import matplotlib.pyplot as plt transparency = 1 – 0.75 area_df.plot(kind=’area’, alpha=transparency, stacked=False, figsize=(20, 10)) plt.title(‘Plot Title’) plt.ylabel(‘Vertical Axis Label’) plt.xlabel(‘Horizontal Axis Label’) plt.show()
  • transparency = 0.75 ax = area_df.plot(kind=’area’, alpha=transparency, stacked=False, figsize=(20, 10)) ax.set_title(‘Plot Title’) ax.set_ylabel(‘Vertical Axis Label’) ax.set_xlabel(‘Horizontal Axis Label’)
  • import matplotlib.pyplot as plt transparency = 0.35 area_df.plot(kind=’area’, alpha=transparency, figsize=(20, 10)) plt.title(‘Plot Title’) plt.ylabel(‘Vertical Axis Label’) plt.xlabel(‘Horizontal Axis Label’) plt.show()

Q5. What is a circular graphic that displays numeric proportions by dividing a circle into proportional slices?

  • Pie chart
  • Radial column chart
  • Table chart
  • Bar chart

Q6. A _ is a variation of the scatter plot that displays three dimensions of data.

  • Bubble plot
  • Heatmap
  • Scatter map
  • Bar chart

Q7. A waffle chart is a great way to visualize data in relation to a whole, or to highlight progress against a given threshold.

  • True.
  • False.

Q8. Which of the following is NOT TRUE regarding a word cloud?

  • A Word Cloud is a depiction of the frequency of different words in some textual data.
  • None of the above.
  • A Word Cloud is a depiction of the frequency of the stopwords, such as a, the, and, in some textual data.
  • A Word Cloud can be generated in Python using the word_cloud package that was developed by Andreas Mueller.

Q9. Which of the following are tile styles of Folium maps?

  • OpenStreetMap
  • Mapbox Control Room
  • All of the above
  • Stamen Terrain
  • Stamen Watercolor

Q10. What is the correct tile style for maps that are high contrast black and white, that are perfect for data mashups and exploring river meanders and coastal zones?

  • Stamen Toner
  • Mapbox Control Room
  • Stamen Terrain
  • Stamen Watercolor

Q11. Plotly visualizations cannot be displayed in which of the following ways

  • Displayed in Jupyter notebook
  • Saved to HTML files
  • Served as a pure python-build applications using Dash
  • None of the above

Q12. Which of the following statements is true for Dash?

  • Rendered in web browser and can be deployed to servers.
  • Declarative and Reactive.
  • Easy to build GUI.
  • All of the above
  • An open-source user interface Python library from Plotly.

Get All Course Quiz Answers of Introduction to Scripting in Python Specialization

Python Programming Essentials Coursera Quiz Answers

Python Data Representations Coursera Quiz Answers

Python Data Analysis Coursera Quiz Answers

Python Data Visualization Coursera Quiz Answers

Share your love

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

Your email address will not be published. Required fields are marked *