Coding Challenge #57: Mapping Earthquake Data

Subscribers:
1,750,000
Published on ● Video Link: https://www.youtube.com/watch?v=ZiYdOwOrGyc



Duration: 33:51
144,255 views
3,138


In this coding challenge, I visualize earthquake data from the USGS by mapping the latitude, longitude and the magnitude of earthquakes with p5.js. The map imagery is pulled from mapbox and the math demonstrated converts latitude, longitude to x,y via Web Mercator. Code: https://thecodingtrain.com/challenges/57-mapping-earthquake-data

๐Ÿ•น๏ธ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/i0icLNOuf

๐ŸŽฅ Previous video: https://youtu.be/OAcXnzRNiCY?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ŸŽฅ Next video: https://youtu.be/dbs4IYGfAXc?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ŸŽฅ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH

References:
๐Ÿ—บ๏ธ Mapbox: https://www.mapbox.com/
๐Ÿ“„ Web Mercator on Wikipedia: https://en.wikipedia.org/wiki/Web_Mercator
๐ŸŒ Earthquake Database: http://earthquake.usgs.gov/data/

Videos:
๐Ÿš‚ Working with Data and APIs: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6YxDKpFzf_2D84p0cyk4T7X
๐Ÿ”ฃ Regular Expressions Series: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6YEypLuls7iidwHMdCM6o2w

Related Coding Challenges:
๐Ÿš‚ 58 3D Earthquake Data Visualization: https://youtu.be/dbs4IYGfAXc

Timestamps:
00:00 Introduction
01:51 Map Projections
04:45 Using the Mapbox Static Map
06:34 Adjusting the parameters to get a World Map
08:48 Latitudes and Longitudes
11:13 Converting Coordinates to pixel space
16:38 Drawing a point on the map
20:39 Loading and parsing earthquake data from USGS
26:05 Ideas and Suggestions
26:38 Drawing the size of point based on magnitude of earthquake
32:48 More Suggestions and Wrapping Up

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

๐Ÿš‚ Website: http://thecodingtrain.com/
๐Ÿ‘พ Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
๐Ÿšฉ Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
๐Ÿ’ก GitHub: https://github.com/CodingTrain
๐Ÿ’ฌ Discord: https://thecodingtrain.com/discord
๐Ÿ’– Membership: http://youtube.com/thecodingtrain/join
๐Ÿ›’ Store: https://standard.tv/codingtrain
๐Ÿ–‹๏ธ Twitter: https://twitter.com/thecodingtrain
๐Ÿ“ธ Instagram: https://www.instagram.com/the.coding.train/

๐ŸŽฅ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ŸŽฅ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

๐Ÿ”— p5.js: https://p5js.org
๐Ÿ”— p5.js Web Editor: https://editor.p5js.org/
๐Ÿ”— Processing: https://processing.org

๐Ÿ“„ Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct

This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new

#earthquakedata #mapbox #mapping #mercatorprojection #p5js







Tags:
JavaScript (Programming Language)
live
programming
daniel shiffman
creative coding
p5.js
coding challenge
p5.js tutorial
p5js
javascript (programming language)
tutorial
javascript
coding
challenges
earthquake data
earthquake data viz
mapbox
mapbox.js
data visualization p5.js
earthquake database
earthquake database p5js
earthquake p5js
mapboxjs
mapping data
mapping earthquake data
web mercator
latitude
longitude
mapping
mapping data viz
mercator projection