10.10. Alloy Datasets

10.10.1. Broader context: Material properties

10.10.2. Aluminum Alloys

from grama.data import df_stang
df_stang
thick alloy E mu ang
0 0.022 al_24st 10600 0.321 0
1 0.022 al_24st 10600 0.323 0
2 0.032 al_24st 10400 0.329 0
3 0.032 al_24st 10300 0.319 0
4 0.064 al_24st 10500 0.323 0
... ... ... ... ... ...
71 0.064 al_24st 10400 0.327 90
72 0.064 al_24st 10500 0.320 90
73 0.081 al_24st 9900 0.314 90
74 0.081 al_24st 10000 0.316 90
75 0.081 al_24st 9900 0.314 90

76 rows × 5 columns

10.10.2.1. Context

(
    df_stang
    >> gr.tf_mutate(thick=gr.as_factor(DF.thick))
    >> pt.ggplot(pt.aes("E", "mu"))
    + pt.geom_point(pt.aes(shape="thick"), size=2)
)
Warning: is_categorical is deprecated and will be removed in a future version.  Use is_categorical_dtype instead
Warning: Using shapes for an ordinal variable is not advised.
../_images/alloys_6_1.png
<ggplot: (8766320771969)>
(
    df_stang
    >> gr.tf_filter(DF.thick < 0.081)
    >> gr.tf_mutate(thick=gr.as_factor(DF.thick))
    >> pt.ggplot(pt.aes("E", "mu"))
    + pt.geom_point(pt.aes(shape="thick"), size=2)
)
Warning: is_categorical is deprecated and will be removed in a future version.  Use is_categorical_dtype instead
Warning: Using shapes for an ordinal variable is not advised.
../_images/alloys_8_1.png
<ggplot: (8766320781789)>

10.10.3. Steel Alloys

from grama.data import df_ruff
df_ruff
part TYS TUS thickness
0 aa 157.0 164.7 0.485
1 ab 159.6 168.2 0.625
2 ac 155.6 165.4 0.625
3 ha 165.8 174.0 0.375
4 hb 157.4 163.8 1.000
5 hc 158.4 164.6 0.500
6 hd 157.6 167.3 0.150
7 ba 156.4 161.7 3.000
8 bb 157.7 162.7 3.000
9 ga 155.7 164.4 0.500
10 gb 158.8 163.6 0.500
11 gc 158.1 165.1 0.500
12 gd 157.0 165.8 0.500
13 ge 154.8 164.1 0.500
14 gf 156.1 163.2 0.375