**question2

library(leaflet)
my_map<-addMarkers(addTiles(leaflet()),lat=33.72148,lng=73.0433,popup="Islamabad!!")
my_map

**q#2(b and e) ####b.1 data=mpg,asethetic mapping between cty and hwy and layers used geon _point for scatter plot.

b.2

data =diamonds,asethetic mapping between carat and price and layers used geon _point for scatter plot.

b.3

data =economics,asethetic mapping only city and layers used geon _line for line plot.

b.4

data =mpg,asethetic mapping only city and layers used geon _histograme for making histogram.

library(ggplot2)
ggplot(mpg,aes(cty,hwy))+geom_point()

data shows upward trend in scatter plots. ### graph shows upward linear trend.

ggplot(diamonds,aes(carat,price))+geom_point()

### scatter plot showsd upward trend between the variables but shows overpoltting.

ggplot(economics,aes(date,unemploy))+geom_line()

line plot shows linear trend between date and unemploy.

ggplot(mpg,aes(cty))+geom_histogram()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

### histogram tell counts of city for but dont show accurate distribution of data due to inappropriate binwidth.

question2 partc

### if we map a continuous variable to shape we cannot get the appropriate results.because it must be catagorical.

### part d By using the facet _wrap() to control no of rows and column we should mention it in the facet _wrap (30:5) means 30 rows and 5 coulmns.

##questionno 1 there are alots of clutters in the stacked bar chart . 1.no need to grid line. 2. x-axises is labelled in horizenittlay which hard to read. 3.no need to y axies due data labels inside the stacked bar. 4.legend and title should be placed on right left top. work in excel.