Skip to content

Discussion: Borrow structure from mendeleev python package #41

@Gregstrq

Description

@Gregstrq

There are a couple of open issues regarding adding of additional information, which have no progress in part due to laziness of the authors of these issues (myself included).

On the other hand, it seems to me that the internal organization of the information in the package might play a part in it (of course it is totally subjective). Let's say you want to add additional information to existing element type. Then, you have to create a new type with additional fields. Then, you have to go over all the lines where elements are defined and add the data in new fields. Sounds a bit complicated. When you start thinking about adding isotopic information, it gets even more complicated.

The counterpart of PeriodicTable.jl in python community is mendeleev. It is interesting that they store all the data as an sqlite database with several interconnected tables. May be we can take inspiration from that?

In Julia case, I think we might not need the whole database, but we can store the data in a dataframe (or several linked dataframes instead). Overall, it should make working with the information rather convenient. For example, one can add additional fields to the elements by appending a column with the relevant data. One can also leverage dataframe utilities and do all kinds of querying on the information.

This approach also lends itself nice for the purpose of introduction of isotopic information: we can create an additional dataframe which will store isotope-dependent information, and the proton number can be used to establish foreign key relationship with the main dataframe storing the elements.

We can also simply copy the database from mendeleev, provided that its maintainers are ok with that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions