Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added installation instructions for new pkg mode in README #20

Merged
merged 4 commits into from
Sep 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 31 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,37 @@
# PeriodicTable.jl
A very simple package for accessing elements in the Periodic Table! :fire:

## Installation
### Installation
Since PeriodicTable is registered in `METADATA.jl`, you can directly install it like,
```jl
```julia
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future we might have to replace METADATA.jl by the general registry on https://github.com/JuliaRegistries/General.

julia> using Pkg
julia> Pkg.add("PeriodicTable")
```

## Update
```julia
julia> Pkg.update("PeriodicTable")
```

## How it works?
### How it works?
PeriodicTable.jl provides a Julia interface to a small database of element
properties for all of the elements in the periodic table. In particular
```jl
using PeriodicTable
properties for all of the elements in the periodic table. In particular `PeriodicTable` exports a global variable called `elements`, which is a collection of
`Element` data structures.

```julia
julia> using PeriodicTable

julia> elements
Elements(…119 elements…):
H He
Li Be B C N O F Ne
Na Mg Al Si P S Cl Ar
K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr
Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe
Cs Ba Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn
Fr Ra Rf Db Sg Bh Hs Mt Ds Rg Cn Nh Fl Mc Lv Ts Og
Uue
La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu
Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr
```
exports a global variable called `elements`, which is a collection of
`Element` data structures. You can look up elements by name (case-insensitive)

You can look up elements by name (case-insensitive)
via `elements["oxygen"]`, by symbol via `elements[:O]`, or by number via
`elements[8]`, for example.

Expand All @@ -39,7 +51,7 @@ All physical quantities are [unitful](https://github.com/ajkeller34/Unitful.jl).

The data is pretty-printed when you look up an element in the Julia REPL.
For example:
```jl
```julia
julia> elements["oxygen"]
Oxygen (O), number 8:
category: diatomic nonmetal
Expand All @@ -58,7 +70,7 @@ e⁻-configuration: 1s² 2s² 2p⁴

```
Alternatively, you may want to get a list of elements,
```jl
```julia
julia> elements[1:4]
4-element Array{PeriodicTable.Element,1}:
Element(Hydrogen)
Expand All @@ -67,30 +79,15 @@ julia> elements[1:4]
Element(Beryllium)
```

### View the Periodic Table!
```julia
julia> elements
Elements(…119 elements…):
H He
Li Be B C N O F Ne
Na Mg Al Si P S Cl Ar
K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr
Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe
Cs Ba Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn
Fr Ra Rf Db Sg Bh Hs Mt Ds Rg Cn Nh Fl Mc Lv Ts Og
Uue
La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu
Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr
```

## Data by
* [Periodic-Table-JSON](https://github.com/Bowserinator/Periodic-Table-JSON)
### Data by
The data used for this package has been pulled up in parts from [here](https://github.com/Bowserinator/Periodic-Table-JSON).
Some information has been (and will be) added over time.

## Developed together with
### Developed together with
* [Steven G. Johnson](https://github.com/stevengj)
* [Jacob Wikmark](https://github.com/lancebeet)
* [Carsten Bauer](https://github.com/crstnbr)

## Facing issues? :scream:
### Facing issues? :scream:
* Open a PR with the detailed expaination of the issue
* Reach me out [here](https://www.rahullakhanpal.in)