Color Key For Earthquake Map

Is there a key to the colored location markers on the earthquake map app?

2 Likes

itā€™s based on magnitude :

color_map = [
        "#00b5b8",  # Mag 0, Teal
        "#bf40bf",  # Mag 1, Purple
        "#08e8de",  # Mag 2, Light Blue
        "#0000ff",  # Mag 3, Blue
        "#00ff00",  # Mag 4, Green
        "#fff000",  # Mag 5, Yellow
        "#ffaa1d",  # Mag 6, Orange
        "#ff0000",  # Mag 7+, Red
    ]
2 Likes

Thanks Tavis. Itā€™s a neat app.

1 Like

I just added this to see what the aftershocks in Turkey are looking like, sadly.

Any chance of this info finding itā€™s way into the app? I keep returning to this thread to check the magnitudes.

Iā€™m not the author of the app but this might be doable. Where would you put the magnitude though ? Sometimes there are multiple quakes on the map.

Oh I just assumed you were the author! The colour key could just be in the phone app, for reference, and not displayed on the Tidbyt. I just keep forgetting which colour is which magnitude, so I have to go back to this thread every so often :smiley:

Sorry, this was just pointed out to me to check out. I will see what I can do for an in-app key. The solution doesnā€™t pop into my mind immediately but since Iā€™ve spent all of 2 seconds thinking about it I will play around with potential solutions.

In the meantime, would it be helpful to put it into the appā€™s readme in my Git repository?

I also replicate the readme on my personal site:

1 Like

I have added the color code as an addendum before the app readme file on my personal website. The GitHub-flavored markdown doesnā€™t play nicely with color tags in HTML so I will just have it there before the README file is included rather than in the README itself.

Would this work, as a reference in the drop-down list for magnitudes? At least for now* till I have time to be more clever?

*Now being defined for values of the time to do a pull request and release into the community.

Yes this is absolutely sufficient! Thank you for the effort :slight_smile:

The PR is submitted!

Know this is an old thread but it seemed the best place to ask if you ever considered also increasing the size of the earthquake point based on the magnitude using the circle widget.

From a map design perspective itā€™s good to have some belt and suspenders data viz hints, especially since the red is a relatively dark color on the Tidbyt screen. (Also I have a hard time distinguishing between the yellow and orange points.)

The circles wouldnā€™t have to be very big ā€” you could keep it simple and just make the diameter the magnitude. This would also allow some differentiation amongst quakes above mag 7. Or maybe some sort of log scale, or perhaps start making the points into circles starting around mag 4?

Thanks for the app ā€” itā€™s a nicely implemented map! I like how you handled the base map and the coastlines.

Thanks for the kind words. I looked at varying the dot size at one point but didnā€™t like the way it came out, particularly if you have a lot of data displayed but I welcome updates if you would like to give it a go. Iā€™ve honestly been so busy with my day job for several months that I havenā€™t had time to look at any of my side projects like this so getting some fresh eyes on the source is always a good thing!