Comments (7)
@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.
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.
@SvbZ3r0 Originally the thought was to allow for something like this:
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.
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.
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.
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.
@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)
- Warnings HOT 3
- Plotting a merged data frame HOT 3
- Resolve set-env warning in GitHub Actions workflows HOT 1
- Extract US map data to separate package HOT 4
- usmap_crs causes warning
- What is the coordinate system? HOT 1
- Add examples of valid data to vignettes
- Fix r-devel test errors HOT 1
- Plotting both state and county boundaries on same map HOT 4
- fips_info should not sort and remove duplicates HOT 1
- plot_usmap gets confused by a column named "values"
- Allow applying visual properties to defined regions
- Missing County HOT 2
- Add support for PUMA geography? HOT 2
- maptools retiring soon HOT 4
- Resolve R CMD Check issues in 0.6.0
- Resolve aes_string and size deprecation
- Update GitHub Actions workflows
- Resolve lintr code scanning warnings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from usmap.