promaterialpy 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- promaterialpy-0.1.0/CHANGELOG.md +18 -0
- promaterialpy-0.1.0/LICENSE +21 -0
- promaterialpy-0.1.0/MANIFEST.in +22 -0
- promaterialpy-0.1.0/PKG-INFO +117 -0
- promaterialpy-0.1.0/README.md +58 -0
- promaterialpy-0.1.0/docs/examples.md +78 -0
- promaterialpy-0.1.0/docs/index.md +108 -0
- promaterialpy-0.1.0/examples/basic_usage.py +41 -0
- promaterialpy-0.1.0/promaterialpy/__init__.py +18 -0
- promaterialpy-0.1.0/promaterialpy/core.py +63 -0
- promaterialpy-0.1.0/promaterialpy/data/3d_printer_plastics.csv +26 -0
- promaterialpy-0.1.0/promaterialpy/data/aerospace_structural_design.csv +301 -0
- promaterialpy-0.1.0/promaterialpy/data/building_energy.csv +769 -0
- promaterialpy-0.1.0/promaterialpy/data/commercial_properties.csv +1553 -0
- promaterialpy-0.1.0/promaterialpy/data/commercial_regulations.csv +1553 -0
- promaterialpy-0.1.0/promaterialpy/data/composite_material_strength.csv +10001 -0
- promaterialpy-0.1.0/promaterialpy/data/concrete_strength.csv +1031 -0
- promaterialpy-0.1.0/promaterialpy/data/conveyor_faults.csv +1210 -0
- promaterialpy-0.1.0/promaterialpy/data/crystal_hardness.csv +53 -0
- promaterialpy-0.1.0/promaterialpy/data/crystal_properties.csv +1001 -0
- promaterialpy-0.1.0/promaterialpy/data/fdm_3d_printing.csv +51 -0
- promaterialpy-0.1.0/promaterialpy/data/glass_classification.csv +215 -0
- promaterialpy-0.1.0/promaterialpy/data/industrial_iot_faults.csv +1001 -0
- promaterialpy-0.1.0/promaterialpy/data/mineral_hardness.csv +623 -0
- promaterialpy-0.1.0/promaterialpy/data/nasa_battery_degradation.csv +1416 -0
- promaterialpy-0.1.0/promaterialpy/data/predictive_maintenance.csv +10001 -0
- promaterialpy-0.1.0/promaterialpy/data/pure_metals.csv +51 -0
- promaterialpy-0.1.0/promaterialpy/data/solar_generation.csv +5001 -0
- promaterialpy-0.1.0/promaterialpy/data/steel_fatigue.csv +438 -0
- promaterialpy-0.1.0/promaterialpy/data/turbine_efficiency.csv +9569 -0
- promaterialpy-0.1.0/promaterialpy/datasets.py +186 -0
- promaterialpy-0.1.0/promaterialpy.egg-info/PKG-INFO +117 -0
- promaterialpy-0.1.0/promaterialpy.egg-info/SOURCES.txt +42 -0
- promaterialpy-0.1.0/promaterialpy.egg-info/dependency_links.txt +1 -0
- promaterialpy-0.1.0/promaterialpy.egg-info/not-zip-safe +1 -0
- promaterialpy-0.1.0/promaterialpy.egg-info/requires.txt +1 -0
- promaterialpy-0.1.0/promaterialpy.egg-info/top_level.txt +2 -0
- promaterialpy-0.1.0/pyproject.toml +67 -0
- promaterialpy-0.1.0/setup.cfg +114 -0
- promaterialpy-0.1.0/setup.py +93 -0
- promaterialpy-0.1.0/tests/__init__.py +0 -0
- promaterialpy-0.1.0/tests/test_core.py +54 -0
- promaterialpy-0.1.0/tests/test_datasets.py +14 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `promaterialpy` will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2026-03-09
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Initial release of `promaterialpy`
|
|
12
|
+
- Integration of a curated collection of materials engineering datasets, including:
|
|
13
|
+
- Commercial material specifications and international design codes (ANSI, DIN, ISO, GOST).
|
|
14
|
+
- Fundamental elastic properties for mechanical calculations (Poisson's ratio, density, moduli).
|
|
15
|
+
- Scientific reference profiles for pure metals (Young's modulus baselines).
|
|
16
|
+
- Physics-inspired manufacturing parameters for fiber-reinforced composites.
|
|
17
|
+
- Implementation of standardized data access functions for research and computational modeling.
|
|
18
|
+
- Comprehensive documentation, usage examples, and licensing (MIT).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jorge Núñez López
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Main Documentation
|
|
2
|
+
include README.md
|
|
3
|
+
include LICENSE
|
|
4
|
+
include CHANGELOG.md
|
|
5
|
+
|
|
6
|
+
# Setup / build config
|
|
7
|
+
include pyproject.toml
|
|
8
|
+
include setup.cfg
|
|
9
|
+
|
|
10
|
+
# Datasets (inside the Python package)
|
|
11
|
+
recursive-include legaldatasets/data *.csv
|
|
12
|
+
|
|
13
|
+
# Additional documentation
|
|
14
|
+
recursive-include docs *.md
|
|
15
|
+
|
|
16
|
+
# Examples
|
|
17
|
+
recursive-include examples *.py
|
|
18
|
+
|
|
19
|
+
# Do not include
|
|
20
|
+
global-exclude __pycache__
|
|
21
|
+
global-exclude *.py[cod]
|
|
22
|
+
global-exclude .DS_Store
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: promaterialpy
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A curated collection of mechanical, structural, and materials engineering datasets for mechanical-electrical design, computational modeling, and research. Includes standard commercial specifications, international design codes (ANSI, DIN, ISO, GOST), heat treatment metadata, pure element stiffness profiles, and fiber-reinforced composite manufacturing parameters from physics-inspired simulation and industrial databases.
|
|
5
|
+
Home-page: https://github.com/Jornulo/promaterialpy
|
|
6
|
+
Author: Jorge Rolando Aarón Núñez López
|
|
7
|
+
Author-email: Jorge Nunez Lopez <jorgearon1905@gmail.com>
|
|
8
|
+
Maintainer-email: Jorge Nunez Lopez <jorgearon1905@gmail.com>
|
|
9
|
+
License: MIT License
|
|
10
|
+
|
|
11
|
+
Copyright (c) 2026 Jorge Núñez López
|
|
12
|
+
|
|
13
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
15
|
+
in the Software without restriction, including without limitation the rights
|
|
16
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
17
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
18
|
+
furnished to do so, subject to the following conditions:
|
|
19
|
+
|
|
20
|
+
The above copyright notice and this permission notice shall be included in all
|
|
21
|
+
copies or substantial portions of the Software.
|
|
22
|
+
|
|
23
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
24
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
25
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
26
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
29
|
+
SOFTWARE.
|
|
30
|
+
|
|
31
|
+
Keywords: materials,engineering,mechanical,electrical,structural,materials science,datasets,youngs modulus,elastic parameters,poisson ratio,yield strength,tensile strength,hardness,steel,alloy,composite materials,manufacturing,simulation,standard standards,ansi,din,iso,data science,research
|
|
32
|
+
Classifier: Development Status :: 4 - Beta
|
|
33
|
+
Classifier: Intended Audience :: Developers
|
|
34
|
+
Classifier: Intended Audience :: Education
|
|
35
|
+
Classifier: Intended Audience :: Science/Research
|
|
36
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
37
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
38
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
39
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
40
|
+
Classifier: Programming Language :: Python :: 3
|
|
41
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
42
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
43
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
44
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
45
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
46
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
47
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
48
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
49
|
+
Classifier: Operating System :: OS Independent
|
|
50
|
+
Classifier: Natural Language :: English
|
|
51
|
+
Requires-Python: >=3.8
|
|
52
|
+
Description-Content-Type: text/markdown
|
|
53
|
+
License-File: LICENSE
|
|
54
|
+
Requires-Dist: pandas>=1.5
|
|
55
|
+
Dynamic: author
|
|
56
|
+
Dynamic: home-page
|
|
57
|
+
Dynamic: license-file
|
|
58
|
+
Dynamic: requires-python
|
|
59
|
+
|
|
60
|
+
# promaterialpy
|
|
61
|
+
|
|
62
|
+
[](https://opensource.org/licenses/MIT)
|
|
63
|
+
[](https://www.python.org/downloads/)
|
|
64
|
+
|
|
65
|
+
The `promaterialpy` package provides a curated collection of mechanical, structural, and materials engineering datasets for mechanical-electrical design, computational modeling, and research. Includes standard commercial specifications, international design codes (ANSI, DIN, ISO, GOST), heat treatment metadata, pure element stiffness profiles, and fiber-reinforced composite manufacturing parameters from physics-inspired simulation and industrial databases.
|
|
66
|
+
|
|
67
|
+
## Installation
|
|
68
|
+
You can install the `promaterialpy` package from PyPI:
|
|
69
|
+
```bash
|
|
70
|
+
pip install promaterialpy
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Usage
|
|
74
|
+
```python
|
|
75
|
+
|
|
76
|
+
import promaterialpy as pmp
|
|
77
|
+
|
|
78
|
+
# List all available datasets
|
|
79
|
+
datasets = pmp.list_datasets()
|
|
80
|
+
print(datasets)
|
|
81
|
+
|
|
82
|
+
# Load a specific dataset
|
|
83
|
+
df = pmp.load_dataset('commercial_properties')
|
|
84
|
+
print(df.head())
|
|
85
|
+
|
|
86
|
+
# Describe dataset
|
|
87
|
+
df_01 = pmp.describe_dataset('composite_material_strength')
|
|
88
|
+
print(df_01)
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## 📊 Some Available Datasets
|
|
93
|
+
|
|
94
|
+
| Dataset | Domain | Description |
|
|
95
|
+
|---------|--------|-------------|
|
|
96
|
+
| `commercial_normas` | Materials & Standards | Contains detailed specifications, heat treatments, and international standards (ANSI, DIN, ISO, GOST) for standard design materials.|
|
|
97
|
+
| `commercial_properties` | Mechanical Design | Includes fundamental elastic properties (such as Young's modulus $E$, shear modulus $G$, Poisson's ratio, and density) optimized for direct mechanical calculations.|
|
|
98
|
+
| `pure_metals` | Materials Science | A scientific reference dataset recording the Young's modulus (in GPa) for 50 pure metals from the periodic table, providing an elemental baseline of stiffness.|
|
|
99
|
+
| `solar_generation` | Renewable Energy | Hourly time-series from a photovoltaic solar plant tracking solar irradiance (W/m^2), panel temperatures, and active power output (kW).|
|
|
100
|
+
| `building_energy` | Thermal Systems | Thermodynamic simulation data tracking the heating and cooling load requirements (kWh/m^2) based on 12 distinct building geometries.|
|
|
101
|
+
|
|
102
|
+
> Run `promaterialpy.list_datasets()` or `pmp.list_datasets()` (using `pmp` as alias) to see the full list of available datasets.
|
|
103
|
+
|
|
104
|
+
## Disclaimer
|
|
105
|
+
|
|
106
|
+
The datasets included in `promaterialpy` are provided strictly for educational, research, and informational purposes. All datasets originate from open-source industrial databases and public research repositories, retaining their original licenses and attributions.
|
|
107
|
+
|
|
108
|
+
The author of `promaterialpy` makes no warranties, express or implied, regarding the accuracy, completeness, or suitability of any dataset for a particular structural, mechanical, or engineering purpose. Users are solely responsible for ensuring that their simulations, engineering designs, and use of these datasets comply with applicable industry codes, safety standards, and local regulations.
|
|
109
|
+
|
|
110
|
+
Any findings, calculations, structural failure analyses, or engineering decisions derived from the use of these datasets are the sole responsibility of the user. The author shall not be held liable for any direct, indirect, incidental, or consequential damages (including, but not limited to, mechanical component failures, structural hazards, or property damage) arising from the use or misuse of the datasets included in this library.
|
|
111
|
+
|
|
112
|
+
For safety-critical engineering, formal structural certifications, or certified manufacturing specifications, always consult a licensed and qualified Professional Engineer.
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
## License
|
|
116
|
+
|
|
117
|
+
The `promaterialpy` library is released under the **MIT License**, which allows free use, modification, distribution, and private use, provided that the original copyright notice and permission notice are included in all copies or substantial portions of the software. See the [LICENSE](LICENSE) file for details.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# promaterialpy
|
|
2
|
+
|
|
3
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
[](https://www.python.org/downloads/)
|
|
5
|
+
|
|
6
|
+
The `promaterialpy` package provides a curated collection of mechanical, structural, and materials engineering datasets for mechanical-electrical design, computational modeling, and research. Includes standard commercial specifications, international design codes (ANSI, DIN, ISO, GOST), heat treatment metadata, pure element stiffness profiles, and fiber-reinforced composite manufacturing parameters from physics-inspired simulation and industrial databases.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
You can install the `promaterialpy` package from PyPI:
|
|
10
|
+
```bash
|
|
11
|
+
pip install promaterialpy
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
```python
|
|
16
|
+
|
|
17
|
+
import promaterialpy as pmp
|
|
18
|
+
|
|
19
|
+
# List all available datasets
|
|
20
|
+
datasets = pmp.list_datasets()
|
|
21
|
+
print(datasets)
|
|
22
|
+
|
|
23
|
+
# Load a specific dataset
|
|
24
|
+
df = pmp.load_dataset('commercial_properties')
|
|
25
|
+
print(df.head())
|
|
26
|
+
|
|
27
|
+
# Describe dataset
|
|
28
|
+
df_01 = pmp.describe_dataset('composite_material_strength')
|
|
29
|
+
print(df_01)
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 📊 Some Available Datasets
|
|
34
|
+
|
|
35
|
+
| Dataset | Domain | Description |
|
|
36
|
+
|---------|--------|-------------|
|
|
37
|
+
| `commercial_normas` | Materials & Standards | Contains detailed specifications, heat treatments, and international standards (ANSI, DIN, ISO, GOST) for standard design materials.|
|
|
38
|
+
| `commercial_properties` | Mechanical Design | Includes fundamental elastic properties (such as Young's modulus $E$, shear modulus $G$, Poisson's ratio, and density) optimized for direct mechanical calculations.|
|
|
39
|
+
| `pure_metals` | Materials Science | A scientific reference dataset recording the Young's modulus (in GPa) for 50 pure metals from the periodic table, providing an elemental baseline of stiffness.|
|
|
40
|
+
| `solar_generation` | Renewable Energy | Hourly time-series from a photovoltaic solar plant tracking solar irradiance (W/m^2), panel temperatures, and active power output (kW).|
|
|
41
|
+
| `building_energy` | Thermal Systems | Thermodynamic simulation data tracking the heating and cooling load requirements (kWh/m^2) based on 12 distinct building geometries.|
|
|
42
|
+
|
|
43
|
+
> Run `promaterialpy.list_datasets()` or `pmp.list_datasets()` (using `pmp` as alias) to see the full list of available datasets.
|
|
44
|
+
|
|
45
|
+
## Disclaimer
|
|
46
|
+
|
|
47
|
+
The datasets included in `promaterialpy` are provided strictly for educational, research, and informational purposes. All datasets originate from open-source industrial databases and public research repositories, retaining their original licenses and attributions.
|
|
48
|
+
|
|
49
|
+
The author of `promaterialpy` makes no warranties, express or implied, regarding the accuracy, completeness, or suitability of any dataset for a particular structural, mechanical, or engineering purpose. Users are solely responsible for ensuring that their simulations, engineering designs, and use of these datasets comply with applicable industry codes, safety standards, and local regulations.
|
|
50
|
+
|
|
51
|
+
Any findings, calculations, structural failure analyses, or engineering decisions derived from the use of these datasets are the sole responsibility of the user. The author shall not be held liable for any direct, indirect, incidental, or consequential damages (including, but not limited to, mechanical component failures, structural hazards, or property damage) arising from the use or misuse of the datasets included in this library.
|
|
52
|
+
|
|
53
|
+
For safety-critical engineering, formal structural certifications, or certified manufacturing specifications, always consult a licensed and qualified Professional Engineer.
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
The `promaterialpy` library is released under the **MIT License**, which allows free use, modification, distribution, and private use, provided that the original copyright notice and permission notice are included in all copies or substantial portions of the software. See the [LICENSE](LICENSE) file for details.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# promaterialpy – Examples
|
|
2
|
+
|
|
3
|
+
This page provides practical examples of using `promaterialpy` for materials data analysis, mechanical calculations, and exploration.
|
|
4
|
+
|
|
5
|
+
## Basic Examples
|
|
6
|
+
|
|
7
|
+
### Example 1: Loading and Exploring Mechanical Properties
|
|
8
|
+
|
|
9
|
+
Learn how to load a dataset containing structural parameters and perform a basic exploratory data analysis (EDA) before setting up a simulation.
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
import promaterialpy as pmp
|
|
13
|
+
|
|
14
|
+
# Load fundamental elastic properties optimized for direct mechanical calculations
|
|
15
|
+
material_data = pmp.load_dataset("commercial_properties")
|
|
16
|
+
|
|
17
|
+
# Display first few rows (e.g., Young's Modulus, Poisson's ratio, Density)
|
|
18
|
+
print(material_data.head())
|
|
19
|
+
|
|
20
|
+
# Check dataset shape (number of materials vs. properties tracked)
|
|
21
|
+
print(f"\nDataset shape: {material_data.shape}")
|
|
22
|
+
|
|
23
|
+
# View property column names
|
|
24
|
+
print(f"\nColumns: {list(material_data.columns)}")
|
|
25
|
+
|
|
26
|
+
# Get summary statistics (mean stiffness, minimum yield strength, etc.)
|
|
27
|
+
print("\nSummary statistics:")
|
|
28
|
+
print(material_data.describe_dataset())
|
|
29
|
+
|
|
30
|
+
# Check for missing values in specification fields
|
|
31
|
+
print("\nMissing values:")
|
|
32
|
+
print(material_data.isnull().sum())
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Example 2: Analyzing Fiber-Reinforced Composite Manufacturing Parameters
|
|
37
|
+
|
|
38
|
+
Load the physics-inspired regression dataset to evaluate how ultimate tensile strength (MPa) behaves across different composite matrices (glass, carbon, aramid, basalt).
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
|
|
42
|
+
import promaterialpy as pmp
|
|
43
|
+
|
|
44
|
+
# Load the composite_material_strength manufacturing parameters dataset
|
|
45
|
+
composites_df = pmp.load_dataset("composite_material_strength")
|
|
46
|
+
|
|
47
|
+
# Quick preview of manufacturing factors and tensile outputs
|
|
48
|
+
print(composites_df.head())
|
|
49
|
+
print(f"\nDataset shape: {composites_df.shape}")
|
|
50
|
+
print(f"\nTracked variables: {list(composites_df.columns)}")
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Example 3: Correlating Photovoltaic Efficiency and Thermal De-rating
|
|
55
|
+
|
|
56
|
+
Load the solar generation dataset to analyze how solar irradiance and thermal stressors (ambient vs. panel surface temperature) impact the net power generation output.
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
|
|
60
|
+
import promaterialpy as pmp
|
|
61
|
+
|
|
62
|
+
# Load the clean hourly solar power generation time-series
|
|
63
|
+
solar_df = pmp.load_dataset("solar_generation")
|
|
64
|
+
|
|
65
|
+
# Preview the environmental and power columns
|
|
66
|
+
print(solar_df.head())
|
|
67
|
+
|
|
68
|
+
# Filter data to analyze high-irradiance peaks (greater than 800 W/m²)
|
|
69
|
+
peak_solar = solar_df[solar_df['solar_irradiance_wm2'] > 800]
|
|
70
|
+
|
|
71
|
+
# Calculate the thermal delta (Panel Temperature minus Ambient Temperature)
|
|
72
|
+
peak_solar['thermal_delta'] = peak_solar['panel_temperature_c'] - peak_solar['ambient_temperature_c']
|
|
73
|
+
|
|
74
|
+
# Display relevant vectors for cooling and efficiency analysis
|
|
75
|
+
print("\nPeak solar operational states:")
|
|
76
|
+
print(peak_solar[['solar_irradiance_wm2', 'thermal_delta', 'power_generation_kw']].head())
|
|
77
|
+
|
|
78
|
+
```
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# promaterialpy Documentation
|
|
2
|
+
|
|
3
|
+
## Welcome
|
|
4
|
+
|
|
5
|
+
The `promaterialpy` package provides a curated collection of mechanical, structural, and materials engineering datasets for data analysis, statistical modeling, and machine learning research in Python. It includes datasets related to **standard commercial specifications, international design codes (ANSI, DIN, ISO, GOST), heat treatment metadata, pure element stiffness profiles, and fiber-reinforced composite manufacturing parameters**.
|
|
6
|
+
|
|
7
|
+
The package contains data optimized for mechanical-electrical design, allowing users to analyze fundamental elastic properties, evaluate chemical element baselines prior to alloying, and simulate physics-inspired behavior of fiber-reinforced composites (glass, carbon, aramid, and basalt) under different manufacturing conditions such as curing temperatures and void content defects without needing destructive physical testing.
|
|
8
|
+
|
|
9
|
+
### Philosophy
|
|
10
|
+
|
|
11
|
+
The author's vision is to create **specialized dataset packages** focused on specific themes and topics. Instead of searching through multiple generic data repositories to find relevant datasets, users can go directly to a thematic package where all datasets are carefully curated around a particular engineering subject.
|
|
12
|
+
|
|
13
|
+
In the case of `promaterialpy`, every dataset is **exclusively focused on mechanical, structural, and materials science research**, making it the go-to resource for engineers, researchers, data scientists, metallurgists, and students working in the fields of mechanical engineering, electrical design, manufacturing automation, and advanced materials optimization.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## Getting Started
|
|
17
|
+
|
|
18
|
+
### Installation
|
|
19
|
+
|
|
20
|
+
#### From PyPI (Recommended)
|
|
21
|
+
|
|
22
|
+
The easiest way to install `promaterialpy` is directly from PyPI:
|
|
23
|
+
```bash
|
|
24
|
+
pip install promaterialpy
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
#### From GitHub (Latest Development Version)
|
|
28
|
+
|
|
29
|
+
To get the latest development version with the newest features and bug fixes:
|
|
30
|
+
```bash
|
|
31
|
+
pip install git+https://github.com/Jorbulo/promaterialpy
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Quick Start Tutorial
|
|
35
|
+
|
|
36
|
+
#### 1. Import the Package
|
|
37
|
+
```python
|
|
38
|
+
import promaterialpy as pmp
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
#### 2. List Available Datasets
|
|
42
|
+
|
|
43
|
+
See all datasets included in the package:
|
|
44
|
+
```python
|
|
45
|
+
# Get list of all datasets
|
|
46
|
+
datasets = pmp.list_datasets()
|
|
47
|
+
print(datasets)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
#### 3. Load a Dataset
|
|
51
|
+
|
|
52
|
+
Load any dataset as a pandas DataFrame:
|
|
53
|
+
```python
|
|
54
|
+
# Load commercial_properties
|
|
55
|
+
df = pmp.load_dataset('commercial_properties')
|
|
56
|
+
|
|
57
|
+
# Display first rows
|
|
58
|
+
print(df.head())
|
|
59
|
+
|
|
60
|
+
# Check dataset dimensions
|
|
61
|
+
print(f"Shape: {df.shape}")
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
#### 4. Describe a dataset
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
|
|
68
|
+
# Describe a dataset
|
|
69
|
+
print(pmp.describe_dataset("commercial_properties"))
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Basic Concepts
|
|
74
|
+
|
|
75
|
+
#### Dataset Naming Convention
|
|
76
|
+
|
|
77
|
+
All dataset names in `promaterialpy` follow a consistent naming pattern:
|
|
78
|
+
|
|
79
|
+
- Lowercase with underscores: `commercial_properties`
|
|
80
|
+
- Descriptive names that reflect content
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
#### Some Datasets available at `promaterialpy`
|
|
84
|
+
|
|
85
|
+
EEvery dataset in this library is **exclusively focused on mechanical, materials science, and energy engineering applications**:
|
|
86
|
+
|
|
87
|
+
- **commercial_regulations**: Contains detailed specifications, heat treatments, and international standards (ANSI, DIN, ISO, GOST) for standard design materials.
|
|
88
|
+
- **commercial_properties**: Includes fundamental elastic properties (such as Young's modulus, shear modulus, Poisson's ratio, and density) optimized for direct mechanical calculations.
|
|
89
|
+
- **pure_metals**: A scientific reference dataset recording the Young's modulus (in GPa) for 50 pure metals from the periodic table, providing an elemental baseline of stiffness.
|
|
90
|
+
- **composite_material_strength**: A physics-inspired regression dataset modeling the ultimate tensile strength (in MPa) of fiber-reinforced composites (glass, carbon, aramid, basalt) based on manufacturing parameters.
|
|
91
|
+
- **solar_generation**: An environmental and operational time-series dataset tracking irradiance, panel temperatures, and active power generation (kW) from a photovoltaic solar plant.
|
|
92
|
+
- **building_energy**: A thermodynamic simulation dataset monitoring heating and cooling load requirements (kWh/m^2) across 12 distinct building geometries.
|
|
93
|
+
|
|
94
|
+
> **Disclaimer:** The datasets included in `promaterialpy` are provided strictly for educational, research, and informational purposes. For safety-critical engineering, formal structural certifications, or certified manufacturing specifications, always consult a licensed and qualified Professional Engineer.
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
#### Data Licenses
|
|
98
|
+
|
|
99
|
+
All datasets are sourced from open industrial databases and public research repositories,
|
|
100
|
+
maintaining their original open-source licenses:
|
|
101
|
+
|
|
102
|
+
- **MIT License** for the commercial specifications and structural properties datasets.
|
|
103
|
+
|
|
104
|
+
- **Open Data Commons Attribution License (ODC-By) v1.0** for the pure metals stiffness profile dataset.
|
|
105
|
+
|
|
106
|
+
- **CC0: Public Domain** for the fiber-reinforced composites manufacturing dataset.
|
|
107
|
+
|
|
108
|
+
- The `promaterialpy` package itself is licensed under the MIT License.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Basic usage example for promaterialpy
|
|
3
|
+
|
|
4
|
+
Run:
|
|
5
|
+
python basic_usage.py
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import promaterialpy as pmp
|
|
9
|
+
|
|
10
|
+
print("=== promaterialpy: Basic Usage Example ===\n")
|
|
11
|
+
|
|
12
|
+
# List all available datasets
|
|
13
|
+
print("Available datasets in promaterialpy:")
|
|
14
|
+
print(pmp.list_datasets())
|
|
15
|
+
|
|
16
|
+
# Describe a dataset
|
|
17
|
+
print("\nDataset description for 'pure_metals':")
|
|
18
|
+
print(pmp.describe("pure_metals"))
|
|
19
|
+
|
|
20
|
+
# Load a dataset
|
|
21
|
+
print("\nLoading 'pure_metals' dataset...")
|
|
22
|
+
metals_df = pmp.load_dataset("pure_metals")
|
|
23
|
+
|
|
24
|
+
# Show basic information
|
|
25
|
+
print("\nFirst 5 rows of pure_metals:")
|
|
26
|
+
print(metals_df.head())
|
|
27
|
+
|
|
28
|
+
print("\nDataset shape:")
|
|
29
|
+
print(metals_df.shape)
|
|
30
|
+
|
|
31
|
+
print("\nColumn names:")
|
|
32
|
+
print(list(metals_df.columns))
|
|
33
|
+
|
|
34
|
+
# Load another dataset (Structural engineering example)
|
|
35
|
+
print("\nLoading 'concrete_strength' dataset...")
|
|
36
|
+
concrete_df = pmp.load_dataset("concrete_strength")
|
|
37
|
+
|
|
38
|
+
print("\nFirst 5 rows of concrete_strength:")
|
|
39
|
+
print(concrete_df.head())
|
|
40
|
+
|
|
41
|
+
print("\nDone.")
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""
|
|
2
|
+
promaterialpy
|
|
3
|
+
A Python package providing mechanical, structural, and materials engineering datasets
|
|
4
|
+
in CSV format, curated for engineering design, computational modeling, and research.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
__version__ = "0.1.0"
|
|
8
|
+
|
|
9
|
+
from .core import load_dataset, list_datasets, describe_dataset
|
|
10
|
+
from .datasets import DATASETS
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
"load_dataset",
|
|
14
|
+
"list_datasets",
|
|
15
|
+
"describe_dataset",
|
|
16
|
+
"DATASETS",
|
|
17
|
+
"__version__",
|
|
18
|
+
]
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
import pandas as pd
|
|
3
|
+
from .datasets import DATASETS
|
|
4
|
+
|
|
5
|
+
# Path to the internal repository folder containing the CSV data files
|
|
6
|
+
_DATA_PATH = Path(__file__).parent / "data"
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def list_datasets():
|
|
10
|
+
"""
|
|
11
|
+
Return a sorted list of all available engineering datasets in promaterialpy.
|
|
12
|
+
|
|
13
|
+
Returns:
|
|
14
|
+
list: Sorted names of material specifications and property datasets.
|
|
15
|
+
"""
|
|
16
|
+
return sorted(DATASETS.keys())
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def describe_dataset(name):
|
|
20
|
+
"""
|
|
21
|
+
Return metadata, descriptions, and source information for a specific dataset.
|
|
22
|
+
|
|
23
|
+
Parameters:
|
|
24
|
+
name (str): The identifier of the engineering dataset.
|
|
25
|
+
|
|
26
|
+
Raises:
|
|
27
|
+
ValueError: If the dataset name is not recognized.
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
dict: Metadata entries including titles, features, and source records.
|
|
31
|
+
"""
|
|
32
|
+
if name not in DATASETS:
|
|
33
|
+
raise ValueError(
|
|
34
|
+
f"Dataset '{name}' not found. "
|
|
35
|
+
f"Available datasets: {', '.join(list_datasets())}"
|
|
36
|
+
)
|
|
37
|
+
return DATASETS[name]
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def load_dataset(name):
|
|
41
|
+
"""
|
|
42
|
+
Load a materials science dataset by name and return it as a pandas DataFrame.
|
|
43
|
+
|
|
44
|
+
Parameters:
|
|
45
|
+
name (str): The identifier of the engineering dataset to be loaded.
|
|
46
|
+
|
|
47
|
+
Raises:
|
|
48
|
+
ValueError: If the dataset name does not exist.
|
|
49
|
+
FileNotFoundError: If the target CSV source file is missing from the library path.
|
|
50
|
+
|
|
51
|
+
Returns:
|
|
52
|
+
pd.DataFrame: The loaded dataset optimized for mechanical-electrical analysis.
|
|
53
|
+
"""
|
|
54
|
+
if name not in DATASETS:
|
|
55
|
+
raise ValueError(
|
|
56
|
+
f"Dataset '{name}' not found. "
|
|
57
|
+
f"Available datasets: {', '.join(list_datasets())}"
|
|
58
|
+
)
|
|
59
|
+
filename = DATASETS[name]["Filename"]
|
|
60
|
+
file_path = _DATA_PATH / filename
|
|
61
|
+
if not file_path.exists():
|
|
62
|
+
raise FileNotFoundError(f"Dataset file not found: {filename}")
|
|
63
|
+
return pd.read_csv(file_path, low_memory=False)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Type of Plastic,Melting Point,Flexibility,Strength,Common Uses,Top Brand
|
|
2
|
+
ABS,230°C,Low,High,"General prototyping, automotive parts",Ultimaker
|
|
3
|
+
PLA,180°C,Low,Moderate,"Educational models, biodegradable items",Hatchbox
|
|
4
|
+
PETG,230°C,Moderate,High,"Food safe containers, outdoor applications",MatterHackers
|
|
5
|
+
TPU,225°C,High,Moderate,"Wearable devices, flexible parts",NinjaTek
|
|
6
|
+
Nylon,260°C,High,High,"Industrial tools, gears",Taulman3D
|
|
7
|
+
ASA,250°C,Low,High,"Outdoor applications, automotive",3DXTech
|
|
8
|
+
PVA,190°C,High,Low,"Support material, dissolvable",Ultimaker
|
|
9
|
+
PC,295°C,Low,Very High,"Bullet-proof glass, phone cases",Polymaker
|
|
10
|
+
HIPS,230°C,Low,Moderate,"Prototype models, dissolvable supports",Gizmo Dorks
|
|
11
|
+
PP,220°C,High,High,"Living hinges, containers",eSUN
|
|
12
|
+
PEEK,343°C,Low,Very High,"Aerospace parts, medical implants",3DXTECH
|
|
13
|
+
ULTEM,360°C,Low,Very High,"High-temp applications, aerospace",Sabic
|
|
14
|
+
TPE,200°C,High,Moderate,"Flexible parts, gaskets",NinjaTek
|
|
15
|
+
PMMA,160°C,Low,Moderate,"Light fixtures, decorative objects",Polymaker
|
|
16
|
+
PVDF,177°C,Low,High,"Chemical tanks, pipes",3DXTECH
|
|
17
|
+
PEI,340°C,Low,Very High,"High-temperature fixtures, aerospace",Ultem
|
|
18
|
+
PAEK,360°C,Low,Very High,"Aerospace parts, high-performance components",Evonik
|
|
19
|
+
FPE,260°C,High,Moderate,"Food containers, biodegradable items",Arkema
|
|
20
|
+
PCL,60°C,High,Low,"Biomedical applications, low-melt models",MatterHackers
|
|
21
|
+
MS,240°C,Low,Moderate,Household appliances,Mitsubishi Chemical
|
|
22
|
+
PPS,280°C,Low,Very High,"Automotive parts, electronics",Solvay
|
|
23
|
+
PPSU,330°C,Low,Very High,"Medical instruments, sterilizable tools",Solvay
|
|
24
|
+
LCP,280°C,Low,High,"High-strength gears, automotive",Proto Labs
|
|
25
|
+
PLA Composite,180°C,Moderate,Moderate,"Artistic projects, composite models",Proto-pasta
|
|
26
|
+
Conductive PLA,180°C,Low,Moderate,"Electronics, sensors",Proto-pasta
|