Code Monkey home page Code Monkey logo

data-tutorials's Introduction

Data Tutorials

The purpose of this repository is to provide a home for several Data tutorials written to improve the accesibility of the different GeoNet's data sets. This repository provides an easy way to access the tutorials, versioning and allows the users to suggest changes or improvements.

The files in these folders are Jupyter notebooks that will demonstrate some simple ways to retrieve data from different services such as: FDSN, FITS, etc. in Python and R programming languages.

Summary of Tutorials

Data type Description
Seismic Data Demostrative tutorials showing how to get data throught the different FDSN web services (Dataselect, Station and Event). The Tutorials are presented in Jupyter notebooks written in Python and R Programming languages.
GNSS Data Demostrative tutorials to retrieve and perform basics task with GNSS Data, mostly with the use of FITS API. The Tutorials are presented in Jupyter notebooks written in Python and R Programming languages.
Volcano Data Demostrative tutorials to access Volcano Data with the use of FITS API and FDSN Web services. The Tutorials are presented in Jupyter notebooks written in Python and R Programming languages.
Tide Gauge Data Demonstrates how to get water level sensor data. The Tutorials are presented in Jupyter notebooks written in Python

How to Run Tutorials

There are 3 files in this GitHub repository to help run these tutorials.

  • The environment.yml file installs everything under dependencies using conda install -c conda-forge (packagename) This is used to install the Python packages.
  • install.R is R code for installing all R packages used in these tutorials
  • runtime.txt This file is for binder. Every day there is a snapshot of R taken. This install the snapshot of R taken on the date in this file.

1. In Anaconda

Install anaconda https://www.anaconda.com/distribution/ This can be done on Windows, Mac, and Linux. The code for the Anaconda prompt will be the same on all operating systems

Open the Anaconda prompt and run each line of code below.

Clone the git

git clone https://github.com/GeoNet/data-tutorials.git

cd data-tutorials

Install all packages used

Install the environment file

conda env create -f environment.yml

Activate this environment

activate GeoNet

Clone the git

git clone https://github.com/GeoNet/data-tutorials.git

cd data-tutorials

Install all packages used

Install the environment file

conda env create -f environment.yml

Activate this environment

activate GeoNet

Install Jupyter

conda install -c anaconda jupyter

Install R

conda install -c conda-forge r-base

Install Python

conda install -c conda-forge python=3.6

Install the R kernel

conda install -c conda-forge r-irkernel

Install the Python kernel

conda install -c conda-forge ipykernel

Run the R script to install all R packages.

Rscript install.R

Open Jupyter notebook

jupyter notebook

To reopen notebooks, open the Anaconda prompt and run

cd data-tutorials

activate GeoNet

jupyter notebook

2. In your preferred GUI (Graphical User Interface)

If you wish to run just the code and not the notebooks you can use your own GUI for Python or R

In your preferred R GUI

Run the code in the file https://github.com/GeoNet/data-tutorials/blob/master/install.R to install all packages used in all notebooks. Code can then be copied across. Make sure to call packages and run any other code that may be in the beginning of the notebook but is needed for running other code in the notebook.

In your preferred Python GUI

You will need to install all packages under dependencies in the file https://github.com/GeoNet/data-tutorials/blob/master/environment.yml. Some of these packages can't be installed using pip and as such may have to be installed from there GitHub. Code can then be copied across. Make sure to call packages and run any other code that may be in the beginning of the notebook but is needed for running other code in the notebook.

3. In Binder Binder

My Binder is an experimental project still in beta phase that can be used to run notebooks. Any issues with binder can be reported at their project's GitHub https://github.com/jupyterhub/binderhub

My Binder is a free online tool to be able to run jupyter notebooks without installing anything on your computer. Binder will launch in your internet browser. There are some important things to note when using binder.

  • Binder can take up to 2 minutes to start
  • The things you do in binder will NOT save for the next time you open binder
  • Binder has a time limit. If the tab is inactive for more than 10 minutes (not running code or have someone scroll on the page) it will time out and you will need to restart it.

If you want to save a csv or image you have made in binder click on the box next to it (in the file select) and click download. You can also do this with the notebook itself. If you want to run a notebook you have save to your computer in binder you can click upload and upload a saved notebook from your computer. Each cell of code can be run with shift + enter or you can run the entire notebook by selecting cell, Run All in the toolbar. The Following link should open the Jupyter Notebook in your browser using Binder: https://mybinder.org/v2/gh/GeoNet/data-tutorials/master

data-tutorials's People

Contributors

jenlowe avatar francovm avatar carolinelittle avatar quiffman avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.