Coding Challenge #57: Mapping Earthquake Data
Why Stack Overflow recommends it
Stack Overflow users link it when they need to plot latitude and longitude points on a web map and want a worked example of the Web Mercator conversion.
Recommended by 1 people across 1 different months, 2017 to 2021.
What it is
A live-coded Coding Train challenge in which Daniel Shiffman plots USGS earthquake data on a Mapbox world map using p5.js. He explains map projections, converts latitude and longitude to x,y pixel positions with Web Mercator math, and then loads and parses the earthquake feed.
What people said
Recommends JackBox · 2017-05 · Stack Overflow · on “Utilizing p5.js/processing for data visualization on a GeoTIFF? How to plot Lon/Lat coordinates in web mercator?”
I work on a database collecting archaeological sites. A goal of our project is to make the data accessible on the web. I would like to plot them on a GeoTIFF to show their distribution and change over time. I further want to calculate Delaunay triangulations and a heatmap which you could display as an overlay. Its important to me to visualize the change over time as an animation. I choose p5.js/processing because I'm not a very skilled programmer (some R, NetLogo and Processsing). i think it will fit the task especially regarding the animation. Before I get into more detail my first question is: Is this a wise choice of tools? Would you recommend other tools? If you think my choice is vital
Cites BasCelik8089 · 2019-05 · Stack Overflow · on “How to map Latitude and Longitude to x and y in Python Tkinter?”
I am trying to map the latitude and longitudes of earthquakes on a world map, similar to this video - [this video] and i'm trying to implement it in Python Tkinter instead of in JS. The problem occurs when i attempt to convert the latitude and longitude to x and y coordinates on a tkinter canvas. I was using the formulae from the web mercator wiki page [LINK] and i haven't had any luck, it either places it too far, or off the map entirely. According to the formulae on web mercator, i've tried to resize my world map image to specific width and height from (2000, 1546) to (1024, 512) or (512, 512) to see if that did anything, but it places the point too far or somewhere else entirely. After that i
Cites Mei · 2021-10 · Stack Overflow · on “Why is my graphic not showing up on my p5js project w/ Mapbox API”
I'm trying to visualize data by mapping the latitude, longitude, and magnitude of some major Chicago neighborhoods with p5.js. It's inspired by this coding challenge [this video] . I followed it thoroughly, only changed the area and zoom of the map (using Mapbox API). The codes look right, and the map shows up. But when I try to visualize just one single location as a circle on the map before even inputting the data, it doesn't show up on the sketch. Super grateful if anyone can let me know what might be the problem here! var mapimg; var zoom = 10; var clat = 0; var clon = 0; var lat = 41.9000; var lon = -87.7204; function preload() { mapimg = loadImage (' [LINK] '); } function mercX(lon) { lon =