MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.20.0 is available! For more information about this release, check out this topic.

    Developing USGS Earthquake Map (2MB Gif Warning)

    Development
    3
    8
    4078
    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
      croxis last edited by

      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.

      lolobyte 1 Reply Last reply Reply Quote 1
      • lolobyte
        lolobyte @croxis last edited by

        @croxis

        and where is a running raspi mmm-module?

        1 Reply Last reply Reply Quote 0
        • C
          croxis last edited by

          I don’t understand your question

          lolobyte 1 Reply Last reply Reply Quote 0
          • lolobyte
            lolobyte @croxis last edited by

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

            strawberry 3.141 1 Reply Last reply Reply Quote 0
            • strawberry 3.141
              strawberry 3.141 Project Sponsor Module Developer @lolobyte last edited by

              @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
                croxis last edited by

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

                strawberry 3.141 1 Reply Last reply Reply Quote 0
                • strawberry 3.141
                  strawberry 3.141 Project Sponsor Module Developer @croxis last edited by strawberry 3.141

                  @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
                    croxis last edited by

                    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
                    • First post
                      Last post
                    Enjoying MagicMirror? Please consider a donation!
                    MagicMirror created by Michael Teeuw.
                    Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                    This forum is using NodeBB as its core | Contributors
                    Contact | Privacy Policy