Developing USGS Earthquake Map (2MB Gif Warning)



  • Image I’m using d3.v4.js to put together a spinning map of Earthquakes from the United States Geological Survey. Here is my current code..

    There are two major bugs I need to fix before release:

    1. I’m getting incredible slowdowns after a minute of running in firefox on my desktop pc. I hate to see what would happen on a pi. I’m at a bit of the loss on what the issue is, but I am sure it is how I’m setting up and updating the dom. Any performance profiling tool suggestions?

    2. “Flatten” out the dots into the sphere and hide them when they are on the far side.



  • @croxis

    and where is a running raspi mmm-module?



  • I don’t understand your question



  • @croxis

    your link “Here is my current code…” https://github.com/croxis/MMM-earthquakes

    and the Module is named “Module planetrise” with this Code:

    {
    module: ‘planetrise’,
    position: ‘top_right’, // This can be any of the regions.
    header: ‘PLanet Rise’,
    config: { // Place the latitude and longitude of your mirror
    latitude: 45.5,
    longitude: -122.38,
    // A dictiory of the bodies and unicode character for the symbol
    // This is the default and does not need to be listed.
    // A full list of bodies can be seen on line 1359 in astronomy.js
    // Note: Trying to find the rise time of Earth will crash the Module
    bodies: {‘Sun’: ‘☉’,
    ‘Moon’: ‘☽’,
    ‘Mercury’: ‘☿’,
    ‘Venus’: ‘♀’,
    ‘Mars’: ‘♂’,
    ‘Jupiter’: ‘♃’,
    ‘Saturn’: ‘♄’,
    }
    }

    This Module is the confic.js entry for “Module planetrise”

    at https://github.com/croxis/planetrise

    The i ask again, where can i find your earthquake Module?



  • @croxis there is a problem with namespace in your module, either you rename your github repository to earthquakes or you change your module js file to MMM-earthquakes.js and in there the registering name as well

    and in your config you will fetch every 30 seconds not 5 minutes by default and for update its currently 12 secs

    @lolobyte config options are currently

    fetchInterval: 0.5 * 60 * 1000, // How often to fetch from USGS, which updates their feeds every five minutes
    rotationSpeed: 0.01,
    updateInterval: 0.2 * 60 * 1000 /
    

    but the directory name is different to the module name so there is a conflict if you rename the directory to earthquakes
    the config could look like:

    {module: 'earthquakes', position: 'top_right'}
    


  • @lolobyte I forgot to change the readme file from one of my other modules. I fixed it.

    @strawberry-3-141 Is the convention to prefix modules with MMM, or is it s stylistic choice? I did a quick fix for the timings (I set them low for debug purposes)



  • @croxis its a stylistic choice, but the module name has to be the same as the directory name

    and in your case the directory will be MMM-earthquakes and the module earthquakes this will cause an error on start

    Also you forgot to mention in the readme that the user has to install the npm module request to get it to work




 

328
Online

6.0k
Users

4.5k
Topics

37.1k
Posts