Skip to content
NOAA earthquakes dataset functions
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R
inst/extdata
man
tests
vignettes
.Rbuildignore
.gitignore
.travis.yml
DESCRIPTION
LICENSE
NAMESPACE
README.Rmd
noaaQuake.Rproj

README.Rmd

---
output:
  md_document:
    variant: markdown_github
---

<!-- README.md is generated from README.Rmd. Please edit that file -->

```{r setup, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-"
)
library(noaaQuake)
library(ggplot2)
```

# Travis Badge:

[![Build Status](https://travis-ci.org/00mathieu/noaaQuake.svg?branch=master)](https://travis-ci.org/00mathieu/noaaQuake)

# noaaQuake

The goal of noaaQuake is to be a package that contains some functions that helps clean, manipulate and visulaise the earthquakes data

# Installation

You can install the noaaQuakes package by running:

```{r eval=F}
library(devtools)
devtools::install_github("00mathieu/noaaQuake")
```


# Examples

### Example 1: cleaning the raw data

```{r example}
db <- clean_raw_data()

```

### Example 2: visualising a timeline of quakes

```{r example2}
ggplot(db[COUNTRY %in%c("CHINA","GREECE")],
       aes (x = as.Date(DATE), 
            y = COUNTRY, 
            color = as.numeric(DEATHS)/1000, 
            size = as.numeric(EQ_PRIMARY))) +
    geom_timeline(aes(xmin = as.Date("2000-01-01"), xmax = as.Date("2018-01-01"))) +
    geom_timeline_label(n_max = 15, aes(label = LOCATION_NAME, xmin = as.Date("2000-01-01"),
                            xmax = as.Date("2018-01-01")))+
    xlab("Date") + ylab("") + ggtitle("Timeline of Earthquakes") +
    labs(size = "Richter scale", color = "# deaths (k)" )+
    theme_bw() +
    theme(legend.position="bottom")
```

### Example 3: leaflet plot visualising location of quake

```{r}

eq_map(db[COUNTRY %in%c("GREECE") & DATE>"2000-01-01"], annot_col = "popup_text")
```
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.