Skip to content

Commit 959c49d

Browse files
Fixed image sources
1 parent f5e3f77 commit 959c49d

File tree

1 file changed

+5
-5
lines changed
  • R-Data Visualization/Visualizing-distributions

1 file changed

+5
-5
lines changed

R-Data Visualization/Visualizing-distributions/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ggplot(data=df_covid, aes(x=confirmed_change)) +
2626
geom_histogram()
2727
```
2828
This produces an output like this
29-
![Confirmed histogram]https://github.com/Vidushi-Gupta/Data-Science-For-Beginners/blob/main/R-Data%20Visualization/Visualizing-distributions/Graphs/confirmed_histogram.png()
29+
![Confirmed histogram](Graphs/confirmed_histogram.png)
3030

3131
Let's make the histogram more presentable for easy interpretation. Using the `scales` package, we would alter the number of axes ticks/points. Along with this a change in the axes titles and addition of the plot title would help in easy interpretation.
3232

@@ -40,7 +40,7 @@ ggplot(data=df_covid, aes(x=confirmed_change)) +
4040
ggtitle("Distribution of change in confirmed COVID-19 cases")
4141
```
4242
You have successfully added ticks on the x-axis ranging from 0 to 2000000 with a gap of 100000 between two consecutive ticks. Similarly added ticks on the y-axis ranging from 0 to 200 with a gap of 20 between two consecutive ticks. Along with this you have now given an appropriate x-axis label and chart title. The `bins` tells `ggplot2` how many bars or bins do we want in our histogram. In this chart, the number of bins are 16 but you can customize them to as many bins as you like. This plot shows us that the change of about 300000 was the most frequent for the confirmed COVID-19 cases
43-
![Confirmed Histogram improved](https://github.com/Vidushi-Gupta/Data-Science-For-Beginners/blob/main/R-Data%20Visualization/Visualizing-distributions/Graphs/confirmed_histogram1.png)
43+
![Confirmed Histogram improved](Graphs/confirmed_histogram1.png)
4444

4545
Similarly, try plotting the histograms for change in the number of recovered and deceased cases.
4646

@@ -55,13 +55,13 @@ ggplot(data = df_covid, aes(x = confirmed_change)) +
5555
xlab("Change in confirmed cases") +
5656
ggtitle("Distribution of change in confirmed COVID-19 cases")
5757
```
58-
![comparison](https://github.com/Vidushi-Gupta/Data-Science-For-Beginners/blob/main/R-Data%20Visualization/Visualizing-distributions/Graphs/comparison.png)
58+
![comparison](Graphs/comparison.png)
5959

6060
The density plot is clearly a smoothened form of the histogram.
6161
Let's also plot density plots for change in recovered and deceased cases.
6262

63-
![recovered density plot](https://github.com/Vidushi-Gupta/Data-Science-For-Beginners/blob/main/R-Data%20Visualization/Visualizing-distributions/Graphs/recovered_density.png)
64-
![deceased density plot](https://github.com/Vidushi-Gupta/Data-Science-For-Beginners/blob/main/R-Data%20Visualization/Visualizing-distributions/Graphs/deceased_density.png)
63+
![recovered density plot](Graphs/recovered_density.png)
64+
![deceased density plot](Graphs/deceased_density.png)
6565

6666
## 🚀 Challenge
6767

0 commit comments

Comments
 (0)