The goal of earthquakes is to analyze the earthquake data that were collected and archived by NOAA and that can be found at https://www.ngdc.noaa.gov/hazard/strong.shtml.
You can install the released version of earthquakes from CRAN with:
install.packages("earthquakes")
This is a basic example which shows you how to clean your data:
library(earthquakes)
## basic example code
data <- utils::read.delim("earthquakes.tsv")
data <- eq_clean_data(data)
data <- eq_location_clean(data)
This is a basic example which shows you how to visualize your data:
library(earthquakes)
## basic example code
data <- utils::read.delim("earthquakes.tsv")
data <- eq_clean_data(data)
data <- eq_location_clean(data)
data <- dplyr::filter(data, Country == "TURKEY")
geom_timeline_label(data,7.5)
This is a basic example which shows you how to create an interactive map from your data:
library(earthquakes)
## basic example code
data <- utils::read.delim("earthquakes.tsv")
data <- eq_clean_data(data)
data <- eq_location_clean(data)
data <- dplyr::filter(data, Country == "TURKEY")
data <- dplyr::mutate(data, popup_text = eq_create_label(data))
eq_map(data, "popup_text")
#> PhantomJS not found. You can install it with webshot::install_phantomjs(). If it is installed, please make sure the phantomjs executable can be found via the PATH variable.
{"x":{"options":{"crs":{"crsClass":"L.CRS.EPSG3857","code":null,"proj4def":null,"projectedBounds":null,"options":{}}},"calls":[{"method":"addTiles","args":["//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",null,null,{"minZoom":0,"maxZoom":18,"tileSize":256,"subdomains":"abc","errorTileUrl":"","tms":false,"noWrap":false,"zoomOffset":0,"zoomReverse":false,"opacity":1,"zIndex":1,"detectRetina":false,"attribution":"© http://openstreetmap.org\">OpenStreetMap<\/a> contributors, http://creativecommons.org/licenses/by-sa/2.0/\">CC-BY-SA<\/a>"}]},{"method":"addCircleMarkers","args":[[38.063,36.878,40.76,40.711,40.709,40.744,40.758,40.358,38.164,40.693,38.457],[30.134,35.307,29.97,29.949,30.045,30.266,31.161,42.346,38.777,32.992,31.351],[6.4,6.3,7.6,5.2,5.8,5.7,7.2,5.7,4.1,6,6],null,null,{"interactive":true,"className":"","stroke":true,"color":"#03F","weight":5,"opacity":0.5,"fill":true,"fillColor":"#03F","fillOpacity":0.2},null,null,["Location: <\/b> Dinar, EvcilerAdd the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.