Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Data slurper for getting stuff from Earthchem services

Project description

Earthchem & PyData

PyPI GitHub license

This project wraps the Earthchem web services to provide easy access to geochemical data from IEDA in ready-to-use format in your favourite PyData environment.

Maintainer: Jess Robertson (jesse.robertson at

Service master develop
Test status Build Status Build Status
Test coverage Codecov branch Codecov branch

So why would I want to use this?

Say you wanted to know how many Archean-aged samples have been submitted to IEDA by your colleague named Dr S Barnes:

>>> import earthchem
>>> q = earthchem.Query(
>>> q.count()

Nice, let's take a look at the compositions of these

>>> df = q.dataframe()
>>> df.head()
Downloading pages: 100%|██████████| 18/18 [00:29<00:00,  1.66s/it]

Table output

Hmm looks like Dr Barnes is a bit of a komatiite expert

>>> fig = df.mgo.hist()
>>> fig.set_xlabel('MgO (wt %)')
>>> fig.set_ylabel('Sample count')

Plot output

Maybe we'd like to see this as a ternary plot instead...

>>> earthchem.plot.ternaryplot(df, components=['mgo', 'al2o3', 'cao'])

Plot output

If spiderplots are more your thing we have you covered too (although we have to make up some data for this one...):

>>> reels = ec.geochem.REE(output='string')
>>> df = pd.DataFrame({k: v for k,v in zip(reels, np.random.rand(len(reels), 2))})
>>> ec.plot.spiderplot(df)

Plot output

Great, I'm sold. How do I get it?

Provided you have python installed, this library is just a pip install earthchem away.

If you don't have Python we recommend taking a look at the marvellous Anaconda distribution - just pick your relevant platform download from here.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for earthchem, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size earthchem-0.0.5.macosx-10.9-x86_64.tar.gz (63.5 kB) File type Source Python version None Upload date Hashes View
Filename, size earthchem-0.0.5-py3-none-any.whl (55.8 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page