Correctly compare areas from multiple parts of the globe using longitude and latitude - r

Here's my problem. I want to compare the area within multiple polygons in different parts of the world. I have the longitude and latitudes for each point of each polygon. My problem is that I don't know what projection to use to get x-y coordinates from the long-lat coordinates. I know OpenStreetMap has the projectMercator() function, but areas are known to inflate quite badly with latitude. (http://en.wikipedia.org/wiki/List_of_map_projections)
--> Do you guys know of an R function like projectMercator, that doesn't have such a distortion? I've been going over different types of projections in Wikipedia, but it's very unclear to me which is best for area comparisons, and then if those projections exist in R as functions (if they don't I'm fine hand coding them, though!)
Thanks!!!
Hillary

Related

Voronoi approach to making districts while also using a multilinestring

I have a spatial objects with multiple points (buildings) on a map. What I wanted to do is divide an area based on the nearest point. The calculated Voronoi looks quite promising, but has some strange aspects if you know the "real world". For example a small part of a district is also at the other side of a river because of the closeness (surprise).
What I want to do is combine this with a multi linestring which contains rivers, railroads. What I want to do either end the district at this line OR add a penalty for 'crossing' it. Is anyone able to shed light on the problem, or possible suggest an alternative voronoi method that works?

Mapping a spherical cap onto a plane

I'm neither a geometry student or a native speaker, so apologies if my question isn't clear enough.
As part of my master's thesis, I have to plot bounded regions of the night sky onto a 2D plane. My current solution consists of a rectangular mapping where (ra, dec) values are plotted to (x,y) coordinates. While this approach works well enough for small regions in relatively low ascension values, the resulting plots get progressively distorted for higher ||dec|| values, as expected.
At some point I'll have to change this to a more versatile approach. Thing is, I'm not exactly clear on what to search for. I guess I have to be able to map angular coordinates to a square (or hexagon) subgrid, but most search results I get are concerned with full-surface mapping.
I know I won't be able to achieve a perfect, distortion-free plotting, but I don't require perfect solutions; only a more general projection that will work well near the poles. Something like this, where I put my Photoshop skills to work and try to simulate a 20ยบ region under my current approach and the one I'm looking for:
What I want:
What I have:
TL;DR: how do I convert between coordinates on a sphere (ra/dec) to cartesian coordinates on a locally-defined grid?

Introducing random noise into point positions

I am using R and Leaflet for R to plot 1000s of points. The raw data is imported to a data frame from SQL Server as British National Grid (BNG) coordinates (Transverse Mercator) which are then converted to lat/long using rgdal before outputting to a stand-alone html via from a Leaflet widget.
The BNG coordinates have been produced by geocoding postcodes and so, when >1 person has the same postcode the coordinate is the same.
I would like to add some random noise to the last 2-digits of each easting/northing coordinate so that all points are likely to be visible in Leaflet. What would be the simplest way to achieve this?
thanks
mike
Two solutions to overplotting are
"jittering" the points by adding some random noise to their coordinates and
adding transparency to the point color so you can see point density.
x=jitter(x), y=jitter(y) will accomplish #1.
col=scales::alpha("blue", 0.5) will accomplish #2.

Mixed network plot with geographical points on map while non geographical vertices outside the map

What I'm looking forward is something like this:
I want the geographical(29 states points in the case) presented on the maps, with a mass amount users out side it.
All the examples I've found with leaflet package, igraph and ggmaps package is merely edges on maps or networks beside map. The only idea I have is to give the non geographical vertices a set of restricted lat/lon coordinates, for examples throw them to the Antarctic Pole.
I think there may be some method better to solve the problems.

How to make a map with a contour plot overlay from latitude and longitude coordinates

I have a csv file with longitude and latitude coordinates at various times and then another column that assigns a value from 1-10 for each of the location points. I want to create a contour map of each location and its value as a visualization. I was thinking of using mathematica but the very little programming experience I have is with python only.
You can try my implementation for geographic maps in PHP at https://contourplot.codeplex.com. It uses a delaunay triangulation and a linear transformation along the edges of the triangles. It also uses 2 colors to show the difference between local and statewide z-values of any triangles and also the triangles and isolines maps nicely with the border (from the shapefile). Some shapes with extreme concavities, holes and islands can be a problem. Another algorithm is conrec from Paul Bourke. There is also the algorithm from indiemaps blogs but only for openlayers.

Resources