Giter VIP home page Giter VIP logo

Comments (7)

pdil avatar pdil commented on June 8, 2024

@SvbZ3r0 thanks for finding this, it seems like it broke when I fixed the ggplot warnings (b493f09). This wasn't really an officially supported method so it's probably better to build in this functionality properly (issue #26) so I will go ahead and prioritize that feature.

from usmap.

SvbZ3r0 avatar SvbZ3r0 commented on June 8, 2024

Since this method isn't officially supported, is there a different way to add multiple layers of data within the same map? For example, a map with county level data masked with another map of county level data.
I understand the functionality currently proposed in #26 only supports one layer of state level data and one layer of county level data. Would it be possible to fully support all the possibilities that arose using the unofficial method?

from usmap.

pdil avatar pdil commented on June 8, 2024

@SvbZ3r0 Originally the thought was to allow for something like this:

IMG_2348

where you could show the entire state but then selectively show counties within them. Since the only way usmap can show data is by filling in states or counties (unless you manually add the data points as in the earthquake example) I'm not sure how you would add multiple layers of data within the same map. Do you have an example of what you want to be able to do?

from usmap.

SvbZ3r0 avatar SvbZ3r0 commented on June 8, 2024

I didn't want to link to my own blog, but here goes: CodeReido - R Crowds Inherently Blue. This is what I was trying to do, and what led me here.
Tl;dr: I want to correlate voting patterns to population density, by showing which area voted for which party and using an alpha mask on top of that. The idea is that the mask would be more transparent in high density areas, thereby giving more visual prominence to high density areas while still retaining visual data as to how the rest of the country voted.

from usmap.

pdil avatar pdil commented on June 8, 2024

I didn't want to link to my own blog, but here goes: CodeReido - R Crowds Inherently Blue. This is what I was trying to do, and what led me here.
Tl;dr: I want to correlate voting patterns to population density, by showing which area voted for which party and using an alpha mask on top of that. The idea is that the mask would be more transparent in high density areas, thereby giving more visual prominence to high density areas while still retaining visual data as to how the rest of the country voted.

@SvbZ3r0 that was a nice read! So your goal would be to have a county map where counties are filled red/blue (according to party voted) and then the alpha of each county mapped to the population density. I'm not sure if that would be possible the way plot_usmap is set up currently. Did you used to be able to do that using the workaround? If so can you provide sample code?

from usmap.

SvbZ3r0 avatar SvbZ3r0 commented on June 8, 2024

Thank you!
That is my goal. I came across the workaround on this StackOverflow question, and since what was being tried there is similar to what I want to do, I assumed the old version would have supported my use case. Keeping in mind that I'm extremely new to R, this assumption might very well be wrong.
I'll try it with the old version when I have the time, and I'll let you know.

from usmap.

pdil avatar pdil commented on June 8, 2024

@SvbZ3r0 thanks, that StackOverflow helps a lot. I'll keep an eye on that while working to incorporate #26 properly in the meantime.

from usmap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.