How to retrieve the materials’s discovery year from materials project database?

Or the deposit year to MP?

We need this years info to split the training set and test set

@Atlashu you can get this info from the tasks data by asking for the completed_at field.

– Jason

you can get this info from the tasks data by asking for the completed_at field

Jason. Thanks. But what tasks data you are talking about? what is the api for it?
currently, we use
from matminer.data_retrieval.retrieve_MP import MPDataRetrieval to download the Materials Project data. I tried your field, it does not work.

mpdr = MPDataRetrieval(api_key=“xxxxxxx”) #fcc structures. Spacegroup 225 or 216 “band_gap.search_gap.band_gap”:{‘$gt’,0}
df = mpdr.get_dataframe(criteria={“nelements”: n},
properties=[‘material_id’,‘year’, ‘pretty_formula’,‘final_energy’,‘e_above_hull’,‘icsd_ids’, ‘spacegroup.number’, ‘volume’,‘full_formula’,‘completed_at’],
index_mpid=False
)

If you are using the old API through matminer, I believe the field is created_at. You can see all available fields here: mapidoc/materials/created_at at master · materialsproject/mapidoc · GitHub.

– Jason