Visualizing Data from the British Geological Survey

Dean Goldman
Posted on Feb 3, 2018

Minerals are a ubiquitous part of daily life. So much so, it is likely that you are touching something that was mined at this very moment. As computer users, car passengers, and home dwellers, we all rely on machines we build with minerals. The fact that minerals are so much a part of our lives drew me into asking: What minerals do we use? Where do they come from? Who produces minerals? I wanted to incorporate my curiosity with code, and do a bit of data journalism.

It is easy enough to find info on any mineral you like, try Wikipedia. But what if you wanted to know where the majority of cobalt is mined? And what if you wanted to know the most produced mineral for any given country. One place you might look is the British Geological Survey- an organization that annually collects mineral production per country in a series of spreadsheets titled Mineral Production Report. Flipping through numbers in a table isn't so fun. See image below.

 

 

And it isn't so fast. Perhaps you might think, "Instead of numbers in a table, can we see these as shapes and trend lines? This would make for a good data visualization report.". I thought the exact same thing, and went about building the application you can see here!

 

About the App

This application visualizes World Mineral Production, an annual report on common minerals produced by country, from the year 1970 to 2015.

 

In one interactive graph, you can select a mineral, and select countries to compare their output of that mineral by year, along with the world average. 

In another, you can select a country, and compare the total recorded production of selected/all minerals by country.

Another graph compares minerals by average price per ton (with data sourced from metal exchange APIs like the London Metal Exchange), and average tonnage produced per year.

 

The goal here is to show old data in a new way, to reorganize the data, line it up with other datasets, and see the output. As this application evolves, I believe this methodology will show further trends, and foster the creation of new features that expand on the theme of mineral production. To be continued!

 

About the Data

The British Geological Survey's World Mineral Production is a pdf formatted paper, and is also available for download in Excel. However, they do have certain parameters for downloading (Things like 10 years at a time, and one mineral at a time). Because of the website's specific parameters, I wrote a python script to automatically visit the BGS site, each time requesting a different part of the BGS's report. I parsed the excel files into a data frame, and saved it to a CSV file to pass onto this Shiny app. The code for parsing World Mineral Production can be found here.

Each graph involves restructuring the dataset in R, and incorporating it into Shiny- a web framework in R. You can see the code here.

For comments, questions, or suggestions, please feel welcome to send me an e-mail.

 

 

About Author

Dean Goldman

Dean Goldman

Dean Goldman is based in New York City. He is a creative thinker with experience in web programming, data science, and design. Seeking to apply skills in problem solving, coding, and data analytics.
View all posts by Dean Goldman >

Related Articles

Leave a Comment

No comments found.

View Posts by Categories


Our Recent Popular Posts


View Posts by Tags

2019 airbnb alumni Alumni Interview Alumni Spotlight alumni story Alumnus API artist aws beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Big Data bootcamp Bootcamp Prep Bundles California Cancer Research capstone Career citibike clustering Coding Course Report D3.js data Data Analyst data science Data Science Academy Data Science Bootcamp Data Scientist Data Scientist Jobs data visualization Deep Learning Demo Day dplyr employer networking feature engineering Finance Financial Data Science Flask gbm Get Hired ggplot2 googleVis Hadoop higgs boson Hiring hiring partner events Industry Experts Job JP Morgan Chase Kaggle lasso regression Lead Data Scienctist Lead Data Scientist leaflet linear regression Logistic Regression machine learning Maps matplotlib Medical Research meetup Networking neural network Neural networks New Courses nlp NYC NYC Data Science nyc data science academy NYC Open Data NYCDSA NYCDSA Alumni Open Data painter pandas Portfolio Development prediction Programming PwC python python machine learning python scrapy python web scraping python webscraping Python Workshop R R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest recommendation recommendation system regression Scrapy scrapy visualization seaborn Selenium sentiment analysis Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Tableau Testimonial tf-idf Top Data Science Bootcamp twitter visualization web scraping What to expect word cloud word2vec XGBoost yelp