首页 >
> 详细

代写数据分析作业的第三部分，根据数据用numpy绘制统计图，供分析使用。

In this section, you’re going to create some plots to visualize the country data. Make sure you’ve read the relevant notes we’ve provided:

- Pie and Scatter
- Line and Bar
- Axes

Be careful about trusting the results of test.py for this part. The tests can only detect whether you produced a plot; they cannot evaluate the contents of the plot. TAs will evaluate the plots manually, deducting points for plots not matching the specifications. For each plot, we give an example of what a solution might look like. Consider these examples minimal acceptable answers (they are sufficient to receive full credit). You are free to improve the aesthetic aspects of the plots (e.g., colors, size, labels, ticks, legend, etc) if you like.

Before you start, make sure you re-download the latest test.py, expected.json, and expected.html files. Remember to download the RAW versions (not the preview pages from GitHub). For example:

Some questions may be nearly identical to ones we’ve already asked you, but now you must answer with a plot instead of with a table.

Answer with a bar plot. Put continents on the x-axis and average populations on the y-axis. The continents should be sorted along the x-axis alphabetically by name, ascending.

Answer with a bar plot. Put continents on the x-axis and number of countries on the y-axis. The continents should be sorted along the x-axis alphabetically by name, ascending.

Answer with a bar plot. Put countries on the x-axis and distance to nearest neighbor on the y-axis. The coutries should be sorted along the x-axis alphabetically by name, ascending.

Use the growth formula we used for predictPopulation back in Project 2.

Answer with a line plot. Show three lines to represent these growth rates: 0.01, 0.05, and 0.1. The x-axis will indicate elapsed years (relative to the time when the data in countries.json was collected). The projection should be over 10 years. The y-axis will indicate the anticipated population.

This is the only one in stage 3 requiring a table instead of a plot.

If you have a DataFrame df, then calling df.corr() will present a table showing the Pearson correlation between every pair of columns in df, so this should be a very easy question (more details here).

We won’t talk about the math behind the Pearson correlation, but spend some time looking at the numbers to gain an intuition for this metric. A correlation of 1 is the max (so, for example, every column is correlated perfectly with itself).

A high correlation between columns X and Y means that large X values tend to coincide with large Y values and small X values tend to coincide with small Y values. In some of the cells, you’ll observe negative correlations (-1 being the smallest). This means that large X values tend to coincide with small Y values and vice versa.

Create a scatter plot with literacy on the x-axis and phones on the y-axis. The Pearson correlation between these two numbers was positive (0.594322). Do you observe a pattern of more phones when literacy is greater?

Create a scatter plot with literacy on the x-axis and birth-rate on the y-axis. The Pearson correlation between these two numbers was negative (-0.792272). Do you observe a pattern of fewer babies when literacy is greater?

Create a scatter plot with literacy on the x-axis and area on the y-axis. Use a log scale for the y-axis by passing logy=True to scatter. The Pearson correlation between these two numbers was close to zero (-0.108139). Is the relationship in this scatter plot less striking than those for phones and birth-rate?

Create a scatter plot with literacy on the x-axis and area on the y-axis. Imagine we wanted to fit a straight line to this data. Even though the two metrics are clearly related, a straight fit line will not work well here, unless we find another way of looking at the data.

This is the same as Q29, with two differences:

- instead of plotting mortality on the y-axis, plot 1/mortality (for infants)
- draw a fit line over the data

For the fit line, first try copy/pasting this code into a notebook cell and running it to see what happens:

1 |
import numpy as np |

Then adapt the above code so that it uses your DataFrame (instead of df) and replaces “x” with GDP-per-capita and “y” with the inverse of infant mortality.

联系我们

- QQ：99515681
- 邮箱：99515681@qq.com
- 工作时间：8:00-23:00
- 微信：codinghelp

- 95-712留学生作业代做、代写java编程设计作业、代做polymorph 2019-10-18
- 代做ols留学生作业、代写r程序语言作业、代做r编程设计作业、代写linea 2019-10-18
- Sdgb 7844作业代做、R编程设计作业代做、代写markdown留学生作 2019-10-18
- 代写math4/68091作业、代做statistical Computin 2019-10-18
- Analytics留学生作业代做、代写data Visualisation作 2019-10-18
- 代写frt留学生作业、代写r语言作业、代做datasets课程作业、R编程设 2019-10-18
- 代做sta 442课程作业、代写effects Models作业、Pytho 2019-10-17
- Se 3316A作业代做、代写web Technologies作业、Java 2019-10-17
- 代写csi213留学生作业、代做data Structures作业、代写ja 2019-10-17
- Cse 325作业代写、C/C++编程设计作业调试、Program留学生作业 2019-10-17
- 代做fit2014留学生作业、代做c++课程设计作业、Information 2019-10-17
- Scm 460课程作业代做、代写r编程设计作业、代做r实验作业、代写data 2019-10-17
- 代写rad留学生作业、代做r, Matlab/C++编程语言作业、代写r课程 2019-10-17
- Comp5338作业代写、Sql程序语言作业调试、代写schema Desi 2019-10-17
- 代做159.20留学生作业、代写rle课程作业、Java编程设计作业调试、P 2019-10-17
- 代做gu4206/Gr5206作业、代写r程序语言作业、代写data留学生作 2019-10-16
- Fit2104留学生作业代做、代写sql语言作业、Sql编程语言作业调试、代 2019-10-16
- 代写glfrustum课程作业、代做python程序语言作业、代写java， 2019-10-15
- 代写software留学生作业、代做information Technolo 2019-10-15
- 31927留学生作业代做、Net Applications作业代写、C++程 2019-10-15