A Julia Package for the Data Retriever

We are excited to announce the first release of a new Julia package that let’s you run our Data Retriever software with a native Julia interface.

For those of you not familiar with Julia it is a new programming language that is similar to R and Python, has a central focus on data analysis, and is designed from the ground up to be fast. It is an emerging scientific programming and data analysis language. Tim Poisot and his lab have been leaders in introducing Julia to the ecology community (thanks to them you can access GBIF data, analyze ecological networks, and more) and we’re pleased to start following his lead.

After installing the Python package getting your favorite dataset into Julia involves opening Julia and running:

julia> Pkg.add("Retriever")
julia> using Retriever
julia> iris_data = Retriever.install_csv("iris")
julia> iris_data = readcsv("iris_Iris.csv")

Like the Python and R versions of the retriever the Julia version also lets you install into a number of different database management systems and formats to meet your needs including PostgreSQL, MySQL, SQLite, JSON, and XML. So if you need to install a large dataset and access if from the database you can do that:

julia> Pkg.add("SQLite")
julia> using SQLite
julia> Retriever.install_sqlite("breed-bird-survey", file="bbs.sqlite")
julia> db = SQLite.DB("bbs.sqlite")
julia> SQLite.query(db, "SELECT * FROM breed_bird_survey_counts LIMIT 10")

We use the PyCall package to directly run the Python code from the main retriever package. Cross-language support like this is really useful for letting difficult to develop core code be easily used in different languages and it’s great that this is a core feature of Julia.

The development of this package was lead by Shivam Negi, a fantastic Google Summer of Code student with us last year, and our amazing senior software developer Henry Senyondo.

This is our first Julia package and so there are sure to be lots of things to improve (starting with the documentation). If you use Julia, or are interested in experimenting with it, we’d love feedback, issues, and pull requests. We’re always enthusiastic to have new contributors and help everyone get started, especially if they’re just learning. For more information see:

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: