This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
summary(cars)
## speed dist
## Min. : 4.0 Min. : 2.00
## 1st Qu.:12.0 1st Qu.: 26.00
## Median :15.0 Median : 36.00
## Mean :15.4 Mean : 42.98
## 3rd Qu.:19.0 3rd Qu.: 56.00
## Max. :25.0 Max. :120.00
You can also embed plots, for example:
Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.
import pandas as pd
df=pd.read_excel("CA_VMP_1.xlsx")
df.info()
## <class 'pandas.core.frame.DataFrame'>
## RangeIndex: 76 entries, 0 to 75
## Data columns (total 46 columns):
## # Column Non-Null Count Dtype
## --- ------ -------------- -----
## 0 PM10 76 non-null int64
## 1 PM10_INC 76 non-null int64
## 2 Al 76 non-null int64
## 3 Al_INC 76 non-null int64
## 4 Ba 76 non-null int64
## 5 Ba_INC 76 non-null float64
## 6 B 76 non-null float64
## 7 B_INC 76 non-null float64
## 8 Ca 76 non-null int64
## 9 Ca_INC 76 non-null int64
## 10 Cd 76 non-null float64
## 11 Cd_INC 76 non-null float64
## 12 Cr 76 non-null float64
## 13 Cr_INC 76 non-null float64
## 14 Cu 76 non-null int64
## 15 Cu_INC 76 non-null int64
## 16 Fe 76 non-null int64
## 17 Fe_INC 76 non-null int64
## 18 K 76 non-null int64
## 19 K_INC 76 non-null int64
## 20 Mg 76 non-null int64
## 21 Mg_INC 76 non-null int64
## 22 Mn 76 non-null int64
## 23 Mn_INC 76 non-null float64
## 24 Mo 76 non-null float64
## 25 Mo_INC 76 non-null float64
## 26 Na 76 non-null int64
## 27 Na_INC 76 non-null int64
## 28 Ni 76 non-null float64
## 29 Ni_INC 76 non-null float64
## 30 P 76 non-null float64
## 31 P_INC 76 non-null float64
## 32 Pb 76 non-null int64
## 33 Pb_INC 76 non-null int64
## 34 Sb 76 non-null float64
## 35 Sb_INC 76 non-null float64
## 36 Si 76 non-null int64
## 37 Si_INC 76 non-null int64
## 38 Sr 76 non-null float64
## 39 Sr_INC 76 non-null float64
## 40 Ti 76 non-null int64
## 41 Ti_INC 76 non-null float64
## 42 V 76 non-null float64
## 43 V_INC 76 non-null float64
## 44 Zn 76 non-null int64
## 45 Zn_INC 76 non-null int64
## dtypes: float64(21), int64(25)
## memory usage: 27.4 KB
Graficos python
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
df.plot("PM10", "PM10_INC", kind="scatter",color='green')
sns.set(color_codes=True)
sns.set_style('white')
sns.displot(df['PM10'], color='g',kde = True)
import plotly.express as px
fig = px.scatter(df, x="PM10", y="Ca", marginal_y="violin",
marginal_x="box", trendline="ols", template="simple_white")
fig.show()
import plotly.express as px
df = px.data.gapminder()
fig = px.scatter(df, x="gdpPercap", y="lifeExp", animation_frame="year", animation_group="country",
size="pop", color="continent", hover_name="country", facet_col="continent",
log_x=True, size_max=45, range_x=[100,100000], range_y=[25,90])
fig.show()