Questions tagged [rnaturalearth]
The rnaturalearth tag has no usage guidance.
rnaturalearth
38
questions
0
votes
1
answer
35
views
R ggplot and exceeding stack size
I am using R to display some polygons on a map. Polygons are stored in a geoJson file and there are many of them (around 1000). In some geojson files may be even much more.
Here is the R program ...
0
votes
1
answer
50
views
Trouble installing R package rnaturalearth and terra
I am trying to install the package rnaturalearth and when I run either:
devtools::install_github("ropensci/rnaturalearth") or install.packages(rnaturalearth)
it runs for a while and at the ...
0
votes
0
answers
47
views
R+Rnaturalearth: Plot Europe and Nuts3
Please have a look at the reprex at the end of this post.
There I draw a simple map of Europe with the national borders of various countries using the excellent Rnaturalearth package.
For the ...
0
votes
1
answer
107
views
Error - unable to find an inherited method for function ‘crop’ for signature ‘"sf"’
I have a code that used to work perfectly but, after having reinstalled R, it provides an error.
What I'm trying to do is the following:
world <- ne_countries(scale = 110)
atl_extent <- extent(-...
1
vote
1
answer
37
views
Why am I unable to rename rnaturalearth data column?
I have retrieved the rnaturalearth data as sf class, and I am trying to rename one of the columns from "iso_a2" to "countryCode" to more easily join it with another dataset of mine....
2
votes
1
answer
105
views
ggplot map displaying inaccurate coordinate scale
I am trying to to plot a projected world map using ggplot. So far I have plotted said map, but the coordinate axis scale of the map is off by a factor of 10^5. I am unsure what interaction is causing ...
0
votes
0
answers
9
views
Visualize Bhutan Map with District names and population count of each district using R
This is the code that I used for visualize Bhutan map. I used "rnaturalearth" package in R. Now I want to Vizualize Each district population count on the map.
bhutan_states <- ne_states(...
0
votes
0
answers
39
views
NaturalEarth GDP and population Data: What year are they from?
I am using NaturalEarth in geopandas to get GDP and population estimates per country:
world = gpd.read_file(gpd.datasets.get_path("naturalearth_lowres"))
world = world.set_index("iso_a3&...
0
votes
0
answers
48
views
Cartopy version of NaturalEarth porting error
The code below gives me an error telling me:
File "/home/ludo915/Eco-Tech H2GAM/maps.py", line 242, in compute_maps
a.add_geometries(countryEU['F'].polygon, ccrs.PlateCarree(),
TypeError:...
0
votes
1
answer
96
views
R + Naturalearth: ETRS89 / ETRS-LAEA projection
Please have a look at the reprex below.
I would like to change the coordinate system and use, instead of the equal-earth projection, the ETRS89 / ETRS-LAEA projection.
See
https://spatialreference.org/...
0
votes
1
answer
132
views
R+rnaturalearth: Creating a Facet Plot and Removing an Inner Border
Please have a look at the reprex at the end of the plot.
My goal (which I achieve step by step) is to construct a panel plot combining different color maps of European countries while removing in the ...
2
votes
2
answers
147
views
How to plot a map with south up using the ggplot2 and sf packages?
I am trying to plot a map with south up using the packages ggplot2 and sf.
I tried the functions coord_flip and scale_y_reverse, but I was not successful.
The base code I am using is:
library(...
6
votes
1
answer
283
views
Create buffer from coastline 25km in R and calculate nearshore area
I am trying to create a map containing polygons that represent 25km buffer into the ocean from every country's coastline, so that I can calculate the area within this buffer for each country. I am ...
0
votes
0
answers
37
views
Shiny App with leaflet map runs well in Rstudio but when I try to deploy it in shinyapps.io, it deploys but then I just get an error message
Below is some sample code for a shiny app I am trying to deploy on shinyapps.io. Whilst it runs just fine in Rstudio, when I deploy it it deploys but then just shows an error message on the browser ...
1
vote
0
answers
125
views
How to buffer coastlines from rnaturalearth?
I need to be able to generate buffer shapes of the global coastline to filter vessel traffic data. The buffer I'm currently trying to generate is for 200 nautical miles, but hopefully the method can ...