Vous êtes sur la page 1sur 8

Worksheet 2.

6
DS100-1
DATA VISUALIZATION IN PYTHON
APPLIED DATA SCIENCE
Name:

John Joshua O. Gutierrez Page 1 of 1

Write codes in Jupyter notebook as required by the problems. Copy both code and output as screen grab or screen shot and paste
them here. Be sure to apply the necessary customizations.

1 Import gdp_usa.csv. Use matplotlib to show the increase in GDP each year.
Code and Output

This study source was downloaded by 100000869050689 from CourseHero.com on 07-13-2023 04:13:49 GMT -05:00 Page 1 of 8

https://www.coursehero.com/file/142885740/DS100-1-WS-26-Gutierrez-JJpdf/
2 Use the previous import to prepare another plot (in red) showing only the years 2001 to 2010.
Code and Output

This study source was downloaded by 100000869050689 from CourseHero.com on 07-13-2023 04:13:49 GMT -05:00 Page 2 of 8

https://www.coursehero.com/file/142885740/DS100-1-WS-26-Gutierrez-JJpdf/
3 Import ‘degrees-women-usa.csv’. Prepare a 2x2 subplot to visualize the % degrees awarded to women yearly in
Agriculture (red), Business (blue), Education (yellow) and Psychology (green).
Code and Output

This study source was downloaded by 100000869050689 from CourseHero.com on 07-13-2023 04:13:49 GMT -05:00 Page 3 of 8

https://www.coursehero.com/file/142885740/DS100-1-WS-26-Gutierrez-JJpdf/
4 Import gapminder.csv. Use matplotlib to show how life expectancy varies with gdp_cap.
Code and Output

This study source was downloaded by 100000869050689 from CourseHero.com on 07-13-2023 04:13:49 GMT -05:00 Page 4 of 8

https://www.coursehero.com/file/142885740/DS100-1-WS-26-Gutierrez-JJpdf/
5 Improve the previous visualization by including population.
Code and Output

This study source was downloaded by 100000869050689 from CourseHero.com on 07-13-2023 04:13:49 GMT -05:00 Page 5 of 8

https://www.coursehero.com/file/142885740/DS100-1-WS-26-Gutierrez-JJpdf/
6 Refer to the gapminder import. Use seaborn to show the relationship among all numeric data. Group the data according to
continent.
Code and Output

This study source was downloaded by 100000869050689 from CourseHero.com on 07-13-2023 04:13:49 GMT -05:00 Page 6 of 8

https://www.coursehero.com/file/142885740/DS100-1-WS-26-Gutierrez-JJpdf/
7 Import auto.csv. Use seaborn to show how horsepower varies with acceleration. We also want to see the distribution of
both variables in the same plot.
Code and Output

This study source was downloaded by 100000869050689 from CourseHero.com on 07-13-2023 04:13:49 GMT -05:00 Page 7 of 8

https://www.coursehero.com/file/142885740/DS100-1-WS-26-Gutierrez-JJpdf/
8 Using the auto dataset, prepare side-by-side plots showing the distribution of the number of cylinders. Use a swarm plot on
the left side and a strip plot on the right side.
Code and Output

This study source was downloaded by 100000869050689 from CourseHero.com on 07-13-2023 04:13:49 GMT -05:00 Page 8 of 8

https://www.coursehero.com/file/142885740/DS100-1-WS-26-Gutierrez-JJpdf/
Powered by TCPDF (www.tcpdf.org)

Vous aimerez peut-être aussi