Facilitator: Kristine Hildebrandt
We looked at some example maps in addition to the ones I included in the session proposal:
We made a map on Google Maps: https://drive.google.com/open?id=1qlVBH_C3O7Q032EvBdoOHMuZ20o&usp=sharing
And here are the basic instructions for creating maps in Google Maps and in R (we didn’t have time to cover R)
I. Getting Started with “My Maps” in Google:
1. You need to have a google/gmail account
2. You can manually type ‘my maps’ into Safari, Chrome or any other web browser, or use this URL, which will prompt you to log in: www.google.com/maps/d/
3. “Create New Map”
4. Name your map, and then begin by manually entering spatial data (latitude/longitude, a post code, a place name), you can draw (add a point) on the map and then name that, or else you can import data from an excel, csv, or tab-delineated file
5. I recommend clicking on the “learn more” buttons anytime they are available
6. You can tailor your map points, you can tailor your map to different base types, and you can add polygons (boundary markers) to connect specific points to highlight spatial connections
7. You can save your map, you can make it public and share it with selected people or make it totally open, and you can create images of various types.
II. Getting Started with R:
R is a statistics package, but it has become more powerful than just that. It now has the ability to help you create customized maps of all types (along with countless other visualizations and images). I am just getting started with learning about R for mapping, but I can share what I do know.
1. First you need to download and install R (the latest version as of June 10 was version 3.3.0.
You can download it from any one of the multiple “mirror sites” (a network of servers which host R). Choose the one closest to you. Follow the install prompts.
By the way: R Studio is also R, but it is sometimes a bit more user-friendly because it makes use of a more Windows/Office/OS-like user interface: www.rstudio.com/
2. Launch R or RStudio
3. You must install some “software” packages from the R package installer. These packages are little packets of data for mapping. You want to make sure that “maps” and “mapdata” are installed. You can then check for their presence in the R library:
4. This will produce a default map of the world
You can add axes and scale:
5. In R, remember the X axis is longitude and the Y axis is latitude
6. Here are some coordinates. See what type of map you get. See if you understand what the numbers are telling you.
map(xlim=c(140, 160), ylim=c(-20,10))
map(xlim=c(80, 110), ylim=c(20,35))
7. The map library has two types of maps: a default map “map” and a more high resolution map “worldHires”
You can compare: map(xlim=c(80, 110), ylim=c(20,35))
map(“worldHires”, xlim=c(80, 110), ylim=c(20,35))
Then, you can add your axes and scale again
8. You can import your own coordinates and place name labels, but you need to save the file as .txt or .csv tab or comma-delimited and quoted fields, and NOT as an excel file.
9. I have loaded this file: Languages_MapR.txt, which has the lat/long for 14 Tibeto-Burman languages of Nepal, Tibet, China and India
This gives me a spread-sheet type layout. Now I want to plot these language names accurately on the map
Here are the languages and their coordinates plotted on a scatter plot of lat X long: plot(Languages_MapR$longitude, Languages_MapR$latitude)
Here is how the map looks:
map(xlim=c(80, 110), ylim=c(20,35)) #this lets you zoom in to the region
points(Languages_MapR$longitude, Languages_MapR$latitude) #here are the labels plotted
text(Languages_MapR$longitude, Languages_MapR$latitude, labels=Languages_MapR$name) #this lets me add language names as labels
There are some other tricks on the following web pages that allow for color and shading
Here are some tutorial sites that I’ve found useful. There are many others.
You can use R and Google Maps together, too, but I am not as familiar with this: