Chapter 29 Read the Data
We read the data and filter out certain unwanted data such as years less tha 860 and more than 2016 since the data was collected at 2016. Moreover we filter out latitude and longitude values which are not equal to zero.
library(tidyverse)
library(leaflet)
library(leaflet.extras)
library(knitr)
library(kableExtra)
rm(list=ls())
fillColor = "#FFA07A"
fillColor2 = "#F1C40F"
MetLandings = read_csv("input/meteorite-landings.csv")
MetLandings = MetLandings %>%
# filter out weird years
filter(year>=860 & year<=2016) %>%
# filter out weird locations
filter(reclong<=180 & reclong>=-180 & (reclat!=0 | reclong!=0))
29.1 Peek into the Data
kable(head(MetLandings),"html") %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed", "responsive")) %>%
scroll_box(width = "800px")
name | id | nametype | recclass | mass | fall | year | reclat | reclong | GeoLocation |
---|---|---|---|---|---|---|---|---|---|
Aachen | 1 | Valid | L5 | 21 | Fell | 1880 | 50.77500 | 6.08333 | (50.775000, 6.083330) |
Aarhus | 2 | Valid | H6 | 720 | Fell | 1951 | 56.18333 | 10.23333 | (56.183330, 10.233330) |
Abee | 6 | Valid | EH4 | 107000 | Fell | 1952 | 54.21667 | -113.00000 | (54.216670, -113.000000) |
Acapulco | 10 | Valid | Acapulcoite | 1914 | Fell | 1976 | 16.88333 | -99.90000 | (16.883330, -99.900000) |
Achiras | 370 | Valid | L6 | 780 | Fell | 1902 | -33.16667 | -64.95000 | (-33.166670, -64.950000) |
Adhi Kot | 379 | Valid | EH4 | 4239 | Fell | 1919 | 32.10000 | 71.80000 | (32.100000, 71.800000) |