• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Developing USGS Earthquake Map (2MB Gif Warning)

Scheduled Pinned Locked Moved Development
8 Posts 3 Posters 4.9k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    croxis
    last edited by Dec 23, 2016, 9:12 AM

    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.

    L 1 Reply Last reply Dec 23, 2016, 10:31 PM Reply Quote 1
    • L Offline
      lolobyte @croxis
      last edited by Dec 23, 2016, 10:31 PM

      @croxis

      and where is a running raspi mmm-module?

      1 Reply Last reply Reply Quote 0
      • C Offline
        croxis
        last edited by Dec 23, 2016, 11:33 PM

        I don’t understand your question

        L 1 Reply Last reply Dec 24, 2016, 4:30 PM Reply Quote 0
        • L Offline
          lolobyte @croxis
          last edited by Dec 24, 2016, 4:30 PM

          @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?

          S 1 Reply Last reply Dec 24, 2016, 4:40 PM Reply Quote 0
          • S Offline
            strawberry 3.141 Project Sponsor Module Developer @lolobyte
            last edited by Dec 24, 2016, 4:40 PM

            @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'}
            

            Please create a github issue if you need help, so I can keep track

            1 Reply Last reply Reply Quote 0
            • C Offline
              croxis
              last edited by Dec 24, 2016, 6:16 PM

              @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)

              S 1 Reply Last reply Dec 24, 2016, 11:21 PM Reply Quote 0
              • S Offline
                strawberry 3.141 Project Sponsor Module Developer @croxis
                last edited by strawberry 3.141 Dec 24, 2016, 11:23 PM Dec 24, 2016, 11:21 PM

                @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

                Please create a github issue if you need help, so I can keep track

                1 Reply Last reply Reply Quote 0
                • C Offline
                  croxis
                  last edited by Dec 25, 2016, 12:51 AM

                  Stop our conversations! I have to make a new thread:
                  https://forum.magicmirror.builders/topic/1254/developing-usgs-earthquake-map-2mb-gif-warning-topic-2

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  1 / 1
                  • First post
                    5/8
                    Last post
                  Enjoying MagicMirror? Please consider a donation!
                  MagicMirror created by Michael Teeuw.
                  Forum managed by Sam, technical setup by Karsten.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy