Home | About Me | CV | Portfolio | Contact

Want to see my Shiny app?
Click here!

My Goal For This Project

My goal for this project was to learn how to map out data using leaflet. I also wanted to look into meteorite data, each meteorite has a class that it is given, and these classes are defined by their presumed origin and composition. My main goal with this data set was to look at a meteorite’s class and its mass. Certain meteorite’s composition has an impact on how much of it is able to make it to Earth, and I wanted to look at that relationship. There is a lot of classifications and sub-classes for meteorites, so for the purpose of this project I will be looking at the main classes of meteorites.

options(scipen = 999)

library(tidyverse)
library(kableExtra)
library(patchwork)

meteors <- read_csv("./meteorites.csv")

# In the dataset, there is a correction needed to be made, Northwest Africa 7701, should say 2010, not 2101

meteors[meteors$name == "Northwest Africa 7701", 7] <- 2010

### Meteor Cleaning and Mapping ####
m_circles <- 
  meteors %>% 
  filter(!is.na(meteors$lat) & !is.na(meteors$long))

Meteorite Classes and What They Mean

Each meteorite class has varying masses, this is mostly based on their origins as well as their formation conditions. Their formation conditions and composition affects how much of the meteorite burns up in the atmosphere, and their relative masses. The most common meteorite types fall under classes H and L. The purpose of identifying these meteorites is that they can give us information about the early universe, and how different pockets of the universe have changed over time.

There are many different meteorite classes, each with their own sub-classes and even further sub-classes. However all meteorites fall under two main classes: Undifferentiated and Differentiated.

The Undifferentiated meteorites are also called Chondrites, and these meteorites can be further broken down into the four main groups: “Carbonaceous”, “Ordinary”, “Rumuruti”, and “Enstatite”. These four groups can be broken down further into more sub-classes.
Within the Chondrites, an attached “Petrologic Type” is attached, this provides information about the condition of the meteorite, the lower the number the more pristine condition the meteorite is in. With 6 being the a Chondrite that has been greatly altered by heat and other processes.

The Differentiated meteorites are separated into 3 types: “Achondrites”, “Iron Meteorites”, and “Stony-Iron Meteorites”. Each of these can also be further broken down into more sub-classes.

A Look into the Dataset

Here is a look into the data-set that I am looking into: This data-set comes from NASA’s collection but the downloaded csv file comes from Kaggle. Note that there was a comment made for the data-set, the csv upon download has an type error; the meteorite, Northwest Africa 7701, should have a year value of 2010, not 2101, this is corrected for during the cleaning of the data-set.

name id name_type class mass fall year lat long geolocation
Aachen 1 Valid L5 21.0 Fell 1880 50.77500 6.08333 (50.775, 6.08333)
Aarhus 2 Valid H6 720.0 Fell 1951 56.18333 10.23333 (56.18333, 10.23333)
Abee 6 Valid EH4 107000.0 Fell 1952 54.21667 -113.00000 (54.21667, -113.0)
Acapulco 10 Valid Acapulcoite 1914.0 Fell 1976 16.88333 -99.90000 (16.88333, -99.9)
Achiras 370 Valid L6 780.0 Fell 1902 -33.16667 -64.95000 (-33.16667, -64.95)
Adhi Kot 379 Valid EH4 4239.0 Fell 1919 32.10000 71.80000 (32.1, 71.8)
Adzhi-Bogdo (stone) 390 Valid LL3-6 910.0 Fell 1949 44.83333 95.16667 (44.83333, 95.16667)
Agen 392 Valid H5 30000.0 Fell 1814 44.21667 0.61667 (44.21667, 0.61667)
Aguada 398 Valid L6 1620.0 Fell 1930 -31.60000 -65.23333 (-31.6, -65.23333)
Aguila Blanca 417 Valid L 1440.0 Fell 1920 -30.86667 -64.55000 (-30.86667, -64.55)
Aioun el Atrouss 423 Valid Diogenite-pm 1000.0 Fell 1974 16.39806 -9.57028 (16.39806, -9.57028)
Aïr 424 Valid L6 24000.0 Fell 1925 19.08333 8.38333 (19.08333, 8.38333)
Aire-sur-la-Lys 425 Valid Unknown NA Fell 1769 50.66667 2.33333 (50.66667, 2.33333)
Akaba 426 Valid L6 779.0 Fell 1949 29.51667 35.05000 (29.51667, 35.05)
Akbarpur 427 Valid H4 1800.0 Fell 1838 29.71667 77.95000 (29.71667, 77.95)
Akwanga 432 Valid H 3000.0 Fell 1959 8.91667 8.43333 (8.91667, 8.43333)
Akyumak 433 Valid Iron, IVA 50000.0 Fell 1981 39.91667 42.81667 (39.91667, 42.81667)
Al Rais 446 Valid CR2-an 160.0 Fell 1957 24.41667 39.51667 (24.41667, 39.51667)
Al Zarnkh 447 Valid LL5 700.0 Fell 2001 13.66033 28.96000 (13.66033, 28.96)
Alais 448 Valid CI1 6000.0 Fell 1806 44.11667 4.08333 (44.11667, 4.08333)
Albareto 453 Valid L/LL4 2000.0 Fell 1766 44.65000 11.01667 (44.65, 11.01667)
Alberta 454 Valid L 625.0 Fell 1949 2.00000 22.66667 (2.0, 22.66667)
Alby sur Chéran 458 Valid Eucrite-mmict 252.0 Fell 2002 45.82133 6.01533 (45.82133, 6.01533)
Aldsworth 461 Valid LL5 700.0 Fell 1835 51.78333 -1.78333 (51.78333, -1.78333)
Aleppo 462 Valid L6 3200.0 Fell 1873 36.23333 37.13333 (36.23333, 37.13333)
Alessandria 463 Valid H5 908.0 Fell 1860 44.88333 8.75000 (44.88333, 8.75)
Alexandrovsky 465 Valid H4 9251.0 Fell 1900 50.95000 31.81667 (50.95, 31.81667)
Alfianello 466 Valid L6 228000.0 Fell 1883 45.26667 10.15000 (45.26667, 10.15)
Allegan 2276 Valid H5 32000.0 Fell 1899 42.53333 -85.88333 (42.53333, -85.88333)
Allende 2278 Valid CV3 2000000.0 Fell 1969 26.96667 -105.31667 (26.96667, -105.31667)
Almahata Sitta 48915 Valid Ureilite-an 3950.0 Fell 2008 20.74575 32.41275 (20.74575, 32.41275)
Alta’ameem 2284 Valid LL5 6000.0 Fell 1977 35.27333 44.21556 (35.27333, 44.21556)
Ambapur Nagla 2290 Valid H5 6400.0 Fell 1895 27.66667 78.25000 (27.66667, 78.25)
Andhara 2294 Valid Stone-uncl 2700.0 Fell 1880 26.58333 85.56667 (26.58333, 85.56667)
Andover 2295 Valid L6 3200.0 Fell 1898 44.61667 -70.75000 (44.61667, -70.75)
Andreevka 2296 Valid L3 600.0 Fell 1969 48.70000 37.50000 (48.7, 37.5)
Andura 2298 Valid H6 17900.0 Fell 1939 20.88333 76.86667 (20.88333, 76.86667)
Northwest Africa 5815 50693 Valid L5 256.8 Found NA 0.00000 0.00000 (0.0, 0.0)
Angers 2301 Valid L6 NA Fell 1822 47.46667 -0.55000 (47.46667, -0.55)
Angra dos Reis (stone) 2302 Valid Angrite 1500.0 Fell 1869 -22.96667 -44.31667 (-22.96667, -44.31667)
Ankober 2304 Valid H4 6500.0 Fell 1942 9.53333 39.71667 (9.53333, 39.71667)
Anlong 2305 Valid H5 2500.0 Fell 1971 25.15000 105.18333 (25.15, 105.18333)
Aomori 2313 Valid L6 320.0 Fell 1984 40.81056 140.78556 (40.81056, 140.78556)
Appley Bridge 2318 Valid LL6 15000.0 Fell 1914 53.58333 -2.71667 (53.58333, -2.71667)
Apt 2320 Valid L6 3200.0 Fell 1803 43.86667 5.38333 (43.86667, 5.38333)
Arbol Solo 2325 Valid H5 810.0 Fell 1954 -33.00000 -66.00000 (-33.0, -66.0)
Archie 2329 Valid H6 5070.0 Fell 1932 38.50000 -94.30000 (38.5, -94.3)
Arroyo Aguiar 2340 Valid H5 7450.0 Fell 1950 -31.41667 -60.66667 (-31.41667, -60.66667)
Asco 2345 Valid H6 41.0 Fell 1805 42.45000 9.03333 (42.45, 9.03333)
Ash Creek 48954 Valid L6 9500.0 Fell 2009 31.80500 -97.01000 (31.805, -97.01)
Ashdon 2346 Valid L6 1300.0 Fell 1923 52.05000 0.30000 (52.05, 0.3)
Assisi 2353 Valid H5 2000.0 Fell 1886 43.03333 12.55000 (43.03333, 12.55)
Atarra 4883 Valid L4 1280.0 Fell 1920 25.25417 80.62500 (25.25417, 80.625)
Atemajac 4884 Valid L6 94.2 Fell 1896 20.06667 -103.66667 (20.06667, -103.66667)
Athens 4885 Valid LL6 265.0 Fell 1933 34.75000 -87.00000 (34.75, -87.0)
Atoka 4888 Valid L6 1384.2 Fell 1945 34.31667 -96.15000 (34.31667, -96.15)
Aubres 4893 Valid Aubrite 800.0 Fell 1836 44.38333 5.16667 (44.38333, 5.16667)
Aumale 4899 Valid L6 50000.0 Fell 1865 36.16667 3.66667 (36.16667, 3.66667)
Aumieres 4900 Valid L6 2000.0 Fell 1842 44.33333 3.23333 (44.33333, 3.23333)
Ausson 4903 Valid L5 50000.0 Fell 1858 43.08333 0.58333 (43.08333, 0.58333)
Avanhandava 4905 Valid H4 9330.0 Fell 1952 -21.46028 -49.95083 (-21.46028, -49.95083)
Avce 4906 Valid Iron, IIAB 1230.0 Fell 1908 46.00000 13.50000 (46.0, 13.5)
Avilez 4907 Valid H 146.0 Fell 1855 25.00000 -103.50000 (25.0, -103.5)
Awere 4910 Valid L4 134.0 Fell 1968 2.71667 32.83333 (2.71667, 32.83333)
Aztec 4913 Valid L6 2830.0 Fell 1938 36.80000 -108.00000 (36.8, -108.0)
Bachmut 4917 Valid L6 18000.0 Fell 1814 48.60000 38.00000 (48.6, 38.0)
Bahjoi 4922 Valid Iron, IAB-sLL 10322.0 Fell 1934 28.48333 78.50000 (28.48333, 78.5)
Bald Mountain 4925 Valid L4 3700.0 Fell 1929 35.96667 -82.48333 (35.96667, -82.48333)
Baldwyn 4926 Valid L6 345.0 Fell 1922 34.50000 -88.66667 (34.5, -88.66667)
Bali 4928 Valid CV3 1000.0 Fell 1907 5.38333 16.38333 (5.38333, 16.38333)
Ban Rong Du 4934 Valid Iron, ungrouped 16700.0 Fell 1993 16.66667 101.18333 (16.66667, 101.18333)
Bandong 4935 Valid LL6 11500.0 Fell 1871 -6.91667 107.60000 (-6.91667, 107.6)
Bansur 4936 Valid L6 15000.0 Fell 1892 27.70000 76.33333 (27.7, 76.33333)
Banswal 4937 Valid L5 14.0 Fell 1913 30.40000 78.20000 (30.4, 78.2)
Banten 4938 Valid CM2 629.0 Fell 1933 -6.33333 106.00000 (-6.33333, 106.0)
Barbotan 4942 Valid H5 6400.0 Fell 1790 43.95000 -0.05000 (43.95, -0.05)
Barcelona (stone) 4944 Valid OC NA Fell 1704 41.36667 2.16667 (41.36667, 2.16667)
Barea 4946 Valid Mesosiderite-A1 3200.0 Fell 1842 42.38333 -2.50000 (42.38333, -2.5)
Barnaul 4947 Valid H5 23.2 Fell 1904 52.73333 84.08333 (52.73333, 84.08333)
Barntrup 4948 Valid LL4 17.0 Fell 1886 52.00000 9.10000 (52.0, 9.1)
Baroti 4949 Valid L6 4500.0 Fell 1910 31.61667 76.80000 (31.61667, 76.8)
Barwell 4954 Valid L5 44000.0 Fell 1965 52.56528 -1.33972 (52.56528, -1.33972)
Bassikounou 44876 Valid H5 29560.0 Fell 2006 15.78333 -5.90000 (15.78333, -5.9)
Baszkówka 4957 Valid L5 15500.0 Fell 1994 52.03333 20.93583 (52.03333, 20.93583)
Bath 4974 Valid H4 21000.0 Fell 1892 45.41667 -98.31667 (45.41667, -98.31667)
Bath Furnace 4975 Valid L6 86000.0 Fell 1902 38.25000 -83.75000 (38.25, -83.75)
Battle Mountain 56133 Valid L6 2900.0 Fell 2012 40.66813 -117.18913 (40.66813, -117.18913)
Bawku 4976 Valid LL5 1557.0 Fell 1989 11.08333 -0.18333 (11.08333, -0.18333)
Baxter 4977 Valid L6 611.0 Fell 1916 36.75000 -93.50000 (36.75, -93.5)
Beardsley 4984 Valid H5 16000.0 Fell 1929 39.80000 -101.20000 (39.8, -101.2)
Beaver Creek 4986 Valid H5 14000.0 Fell 1893 51.16667 -117.33333 (51.16667, -117.33333)
Beddgelert 4993 Valid H5 794.0 Fell 1949 53.01667 -4.10000 (53.01667, -4.1)
Bells 5005 Valid C2-ung 375.0 Fell 1961 33.60000 -96.46667 (33.6, -96.46667)
Belville 5009 Valid OC NA Fell 1937 -32.33333 -64.86667 (-32.33333, -64.86667)
Benares (a) 5011 Valid LL4 3700.0 Fell 1798 25.36667 82.91667 (25.36667, 82.91667)
Benguerir 30443 Valid LL6 25000.0 Fell 2004 32.25000 -8.15000 (32.25, -8.15)
Beni M’hira 5018 Valid L6 19000.0 Fell 2001 32.86667 10.80000 (32.86667, 10.8)
Benld 5021 Valid H6 1770.5 Fell 1938 39.08333 -89.15000 (39.08333, -89.15)
Benoni 5023 Valid H6 3880.0 Fell 1943 -26.16667 28.41667 (-26.16667, 28.41667)
Bensour 5024 Valid LL6 45000.0 Fell 2002 30.00000 -7.00000 (30.0, -7.0)

Visualizing the Dataset

m_circles %>% 
  ggplot(aes(x = class)) +
  geom_bar() +
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5, size = 2)) +
  labs(x = "Meteorite Classes",
       y = "Count")

The graph above shows each meteorite class, and their counts. 8 classes of meteorites are visually much greater in count than all other classes, the graph below shows those 8 classes and their counts.

m_circles %>% 
  group_by(class) %>%
  count() %>% 
  filter(n > 900) %>% 
  ggplot(aes(x = class, y = n)) +
  geom_col(aes(fill = class)) +
  theme(axis.text.x = element_text(vjust = 0.5, size = 7)) +
  scale_fill_viridis_d() +
  labs(x = "Meteorite Classes",
       y = "Count",
       fill = 'Class')

When looking at the data I wanted to visualize count over the years. The graph below is just looking at counts per year.

m_circles %>% 
  group_by(year) %>%
  count() %>% 
  ggplot(aes(x = year, y = n)) +
  geom_col() +
  theme(axis.text.x = element_text(vjust = 0.5, size = 7)) +
  labs(x = "Year",
       y = "Count")

The graph below looks at the same display as above but zoomed into the year 1900s to recent years.

m_circles %>% 
  dplyr::filter(year > 1900) %>% 
  group_by(year) %>%
  count() %>% 
  ggplot(aes(x = year, y = n)) +
  geom_line() +
  theme(axis.text.x = element_text(vjust = 0.5, size = 7)) +
  labs(x = "Year",
       y = "Count")

When looking at the graph above initially, there seems to be a trend of more meteorites “falling” starting in the 1900s and beyond. To get a better look, the graph below displays a graph that is filtered and only shows meteorites labeled as “Fell”, to get a visualization of the actual count of meteorites per year.

m_circles %>% 
  dplyr::filter(fall == "Fell") %>% 
  dplyr::filter(year > 1900) %>% 
  group_by(year) %>%
  count() %>% 
  ggplot(aes(x = year, y = n)) +
  geom_line() +
  theme(axis.text.x = element_text(vjust = 0.5, size = 7)) +
  labs(x = "Year",
       y = "Meteorite Count") + 
  ggtitle("Fallen Meteorites")

Discussion and Conclusion

Overall, I had a lot of fun with this project and along the way I have developed many more ideas for skills I want to keep working on. My main goal for the project was to make a shiny app that was able to display meteorite locations and popup information. I was able to filter these maps and learn some new syntax and formatting in the process. Throughout working on this project I also came across several other packages that I would like to learn to use, and I have a better grasp on where I need to begin in order to learn to use these packages. Talk about learning to use leaflet and shiny, looking into meteorites, etc. One of my initial ideas for this project was to also include data on Bolides, and along the way I decided that I would save that data-set for a future project where I could work with the Rayshader package and build a 3D map.