Starrydata is a library that allows users to easily download and utilize datasets related to inorganic materials. This library enables efficient data retrieval for research and projects.
You can install Starrydata from PyPI using the following command:
pip install starrydataBelow is an example of how to use Starrydata.
To download a specific dataset, use the Dataset class. Here is an example of how to download and load a dataset into a pandas DataFrame:
import starrydata as sd # Import the Starrydata library
import pandas as pd # Import the pandas library
# Load the dataset for the specified date
sd_dataset = sd.load_dataset(date="20240521")
# Print the dataset timestamp to confirm the download date
print(sd_dataset.dataset_timestamp)
# Read the 'all_curves.csv' file from the dataset and convert it to a pandas DataFrame
df_curves = pd.read_csv(sd_dataset.curves_csv)
# Read the 'all_samples.csv' file from the dataset and convert it to a pandas DataFrame
df_samples = pd.read_csv(sd_dataset.samples_csv)
# Read the 'all_papers.csv' file from the dataset and convert it to a pandas DataFrame
df_papers = pd.read_json(sd_dataset.papers_csv)import starrydata as sd
import pandas as pd
sd_dataset = sd.load_dataset(zip_path="<your_local_file_path>")
df_curve = pd.read_csv(sd_dataset.curves_csv)
df_sample = pd.read_csv(sd_dataset.samples_csv)
df_paper = pd.read_csv(sd_dataset.papers_csv)For more detailed documentation and usage examples, please refer to the official documentation.
Bug reports and feature requests are welcome at the GitHub repository. Contributions to the codebase are also appreciated. Follow these steps to contribute:
- Fork the repository
- Create a new branch (
git checkout -b feature-branch) - Commit your changes (
git commit -am 'Add new feature') - Push the branch (
git push origin feature-branch) - Create a pull request
This project is licensed under the MIT License. See the LICENSE file for more details.