ClueTrust GIS Products


Macintosh GIS

Try Cartographica, the Macintosh GIS today. Explore, analyze, and present geospatial data and maps on your Macintosh.

Get CartoMobile, our field data entry and viewing tool for iOS.

Updates
Blog Index
The journal that this archive was targeting has been deleted. Please update your configuration.
Navigation

Entries in table (6)

Friday
Mar022012

Mapping 2012 Primary Results

The U.S. Republican Presidential Primaries are still ongoing, but a number of states have already completed their elections. To find election results do a google search for 2012 primary results or click here. The first search results should be a table of data with the percent voting for each of the major candidates in each state. I wanted to create a few maps to show the results. I quickly created a .csv file by copy and pasting the table into my spreadsheet application. I saved the file as Election_2012.csv. I provide an image below of what the dataset should look like.

 

dataset

Next, the data are provided at the state level so I needed a map of U.S. States. You can find a U.S. States map here. After you download the States shapefile import it into Cartographica by choosing File > Import Vector Data

Next, we can join the Election_2012.csv file to the states file by choosing File > Import Table Data. Select the join tab in the top right of the Import File Window. Change the Target Layer menu to U.S. States. Change the Map to option to STUSPS10. Once complete click on the import button. I provide an image of the set up below.

Import File Window

Because the data are in decimal form we may first want to convert the numbers to percentages. To create new columns that contain percentages we can use the Layer Info Window. Open the Layer Info Window by choosing Window > Show Layer Info. Click the + button four times to add four new columns, one for each candidate. Next, rename the new columns Per_San, Per_Rom, Per_Ging, Per_Paul. Next, set up the formulas for each of the new columns by selecting the Set Formula button. Set the formula as ("Candidate Layer"*100) to create the percentages for each candidate. Also, be sure to change the layer type from String to Number.

Now that the data are joined we can create maps. Double click on the U.S. States layer in the Layer Stack. I want the individual percentages for Mitt Romney, Rick Santorum, and Newt Gingrich displayed on the map. To do this change use the Insert Field menu in the bottom right to select Romney, Santorum, and Gingrich. This will add their names to the Item Label window. Also type in abbreviations so that we know who each number corresponds to. Notice on the map that the individual percentages for both candidates is shown. The image below shows the set up.

Layer Styles Window

To change the color or font of the the item labels control click to bring up the option window and then change the colors or font style to what you would like to use. This will automatically change what is visible within the map window. I show an image of the option window below.

Option Window

The final product should look something like what is shown below.

Final Map

 

Tuesday
Feb282012

Mapping CO2 Emissions World Wide

I recently read an article on the Guardian about the changing distribution of carbon dioxide production by country. Carbon dioxide is among the most closely watched greenhouse gases that potentially leads to global warming. According to the Guardian article China has increased its production of CO2 by about 170% since 1984, which is more than the U.S. and Canada combined. Other important changes mentioned in the article are that England has dropped in its production and that India has moved above Russia to the third rank. The U.S. is second in CO2 production behind China.

I found this topic interesting so I went to find some data on the subject to create maps of the situation. Luckily, the Guardian provides data within the article. If you scroll to the data table that is within the article, at the top you will find a link that allows you to download the file. The data are from the International Energy Agency. There is a bit of house cleaning required with the dataset because of the way the data are recorded. The spreadsheet application you are using may read the data as string rather than as number for this reason. To fix the problem we want to delete all of the data we don't need, and change the values for some of the missing data. Any value recorded as a "--" needs to be deleted. To make this a little easier I deleted all of the countries that were missing data for every year (Note: I did not delete Germany because it has recorded data for later years. Just delete the "--" values for Germany, but not the entire row). If countries have "NA" go ahead a delete those as well. My final data set ended with 188 countries. After the data are downloaded save the file as CO2_Data. The data set is very nice as it provides CO2 emission data by year since 1980.

Because the data are collected for countries we need a shapefile with the appropriate geographies. The website Geocommons has a free download for a world wide shapefile with countries. Once you download the shapefile save the file as World and then open it in Cartographica by choosing File > Import Vector Data.

When the country shapefile is imported a yellow triangle will appear next to the layer in the Layer Stack. This indicates that the countries layer is missing a Coordinate Reference System (CRS). To set the CRS double click on the layer in the layer stack, then click on the arrows next to World-Wide Projections and choose WGS 84 / Pseudo-Mercator and then click Set. The yellow arrow should disappear from the layer stack. 

Set CRS Window

Now that we have both datasets downloaded we can join the data so that we can create maps. To join the CO2_Emissions data to the Countries file choose File > Import Table Data. This will bring up the Import File Window. Inside of the Import File Window select the Join tab in the top right. Change the the Target Layer menu to World. Next, in the table to the left change the "Map to" option in the Country row to Name. This will match the two datasets based on the name of the Country. Then, check the box in the Key column. Once ready, click Import.

Import File Window

To create maps of the CO2 data double click on the "World" layer in the Layer Stack. This will bring up the Layer Styles window. Change the "Based on" menu to 2009. Click on the + button 10 times to create 10 categories. Next, click on the gear and choose Distribute with Natural Breaks (Jenks).

To change the color scheme choose Window > Show Color Palettes. Choose a color palette and drag it to the table in the Layer Styles Window.

I provide three images below of using different variables available within the dataset.

CO2 Emissions 1984

 

CO2 Emissions 2009

 

Percent Change between 2008 and 2009

 

Tuesday
Feb212012

Mapping the East Prairie, Missouri Earthquake 

There was a large earthquake today near East Prairie, Missouri that was measured as a magnitude 4.0. According to the USGS the quake was felt by people in at least nine surrounding states.The earthquake was located near the New Madrid Fault line. The Center for Earthquake Research and Information (CERI) located in Memphis, Tennessee works continuously to provide information about the seismic activity in the area surrounding the New Madrid Fault line. Their website provides a lot of information about the science behind detecting and analyzing earthquake activity. Additionally, their website provides free maps and data to explore.

The CERI website provides lists of the most recent earthquake activity from around the country. See the list of the Big Earthquakes that have occurred recently. Big Earthquakes list . This list provides the magnitude, date, time, and the lat lon coordinates, as well as the depth and location. I want to create a map that highlights the location of the recent earthquake in Missouri. To do this I can create quickly create a .csv file with the lat long data required to create a point map. Because I am only interested in the Missouri quake the process of data entry will be quick and painless.

To create the .csv file you will need a spreadsheet application. Once the application is open create new column headings for Location, Latitude, and Longitude. Once the column heads are labeled, add the data from the Big Earthquakes List for the 4.0 East Prairie, MO earthquake. Save the file as MO_Earthquakes.csv.(Note: The lat long data are given as N and W. Make the Longitude value negative to indicate that it is the Western hemisphere. The positive value for latitude already indicates the Northern hemisphere). I provide a screenshot of my .csv to show the set up.

MO_Earthquakes.csv

Before we geocode the lat long data first add a basemap. To download a free States layer click Here. Change the State and Equivalent (2010) to "All States in One National File" then click download. Once the file is downloaded import it into Cartographica by choosing File > Import Vector Data. (Note: Rename the Layer States)

Next, in order to be sure that our coordinates are in the same system as those provided by CERI we can view the projection of the map by choosing Map > Project Map. When you do this with the Census shapefile you will see that the map is projected in GCS_North_American_1983. The coordinates provided by CERI are in WGS. I know this because I found a description on their website describing their data. To change the projection of the map to WGS select Other Projections and the choose WGS84 and then click Set. I provide an image of this below.

Project Map

Next, to geocode the lat and long coordinates choose File > Import Table Data. Choose the MO_Earthquake.csv file. In the top right of the Import File Window select the Coordinates tab. In the table to the left change the Map to option for Lat to Y (or latitude) and change the Map to option for Long to X (or longitude). See the image below for the set up.

Import File Window

After you geocode the data you should see a single point on the map. To make a more interesting map we can use the point to create a buffer map to indicate distances around the earthquake. To create buffers choose Tools > Create Buffer for Layer's Features. Note that to decide the width of the buffer you must say how large in degrees you would like the buffer to be. How do you define buffer size in miles in terms of degrees? In general, we can say that 1 degree is = to about 60 miles unless the location is located near the poles. We can use this as a rough estimate for creating buffer widths.

To create an interesting map I decided to create buffers at 5 (300 mi) 10 (600 mi) and 20 (1200 mi) degrees. I provide two maps below to show the final results (Note: the second map adds some additional data that I collected previously from other sources). To create a buffer at each distance simply repeat the steps from above three times while chaining the distance for each buffer. Note that to change the appearance of the buffers go to the Layer Styles Window to play with color, opacity, and labels.

 

Map 1

 

Map 2
Thursday
Feb162012

Mapping Country Level Internet Usage 

A colleague pointed me to an interesting website for the International Telecommunications Union. The ITU is an organization that collects and disseminates telecommunications data. Their website provides information on various topics and also includes access to graphics and free data. On the right side of their main page there is a list of datasets about communication systems by country for years 2000-2010. This is a very nice set of data because the data are time-series, and because the data appear to have few missing values. For this post I downloaded the dataset "Percentage of Individuals using the Internet".

After the data are downloaded it is necessary to reformat the data so that they can be imported into Cartographica. Open the data in a spreadsheet application. The spreadsheet has additional information that we do not need. The data in column M and beyond is metadata that provides information about the sources of data. Metadata is very important in GIS, but for this example we can delete it. Highlight all of the columns to the right of column M and delete them. Also delete row 1. This should leave you with columns for country and years 2000-2010. Save the file as InternetUse.csv. I provide an image of the final dataset below.

Dataset

Because the data are collected for countries we need a shapefile with the appropriate geographies. The website Geocommons has a free download for a world wide shapefile with countries. Once you download the shapefile open it in Cartographica by choosing File > Import Vector Data.

When the country shapefile is imported a yellow triangle will appear next to the layer in the Layer Stack. This indicates that the countries layer is missing a Coordinate Reference System (CRS). To set the CRS double click on the layer in the layer stack, then click on the arrows next to "World-Wide Projections" and then choose WGS 84 / Pseudo-Mercator and then click "Set". The yellow arrow should disappear from the layer stack.

Now that the countries data are set we can join the Internet Usage data and then create maps. To join the Internet Usage data choose File > Import Table Data. Select the Join tab in the top right of the window. Change the Target Layer men to world_countries_… Change the Map to column in the Country row to Name and then check the box under the key column. I provide a screenshot to show the set up… Once its ready, click Import.

Import File Window

Now we are ready to create chloropleth maps. Double click on the world_countries.. layer in the Layer Stack. This will bring up the Layer Styles window. Change the Based on menu to 2005. Click on the + button 7 times to create 7 categories. Next, click on the gear and choose Distribute with Natural Breaks (Jenks).

To change the color scheme choose Window > Show Color Palettes. Choose a color palette and drag it to the table in the Layer Styles Window.

The first image below shows the percent of population in 2005 who use internet.

Internet Usage (2005)

To take advantage of the time-series data we can create a new variable that indicates how much change in internet use there has been over the last ten years in each country. To create a new variable choose Window > Show Layer Info. Click on the + button to add a new column. Find the New Column in the Layer Info window and rename it Change. Also, change the variable type to Number for the Change variable. The image below shows that Set Formula Window

Show Info Window

Next, click on the Set Formula button and then set up the equation 2010 - 2000 by dragging the appropriate years into the top window of the Set Formula window and then click Ok (be sure to separate them with a "-" sign)

To create the map with the change variable double click on the "world_countries…" layer in the layer stack and then change the Based on menu to Change and then click on the gearbox and choose Distribute with Natural Breaks (Jenks) The change map is shown below.

Change in Internet Use 2000 - 2010

 

Tuesday
Feb142012

Mapping Population Data from Statistics Canada

For this post I found data on Statistics Canada, which is a governmental website that provides access to data on various topics within Canada. The website includes spatial data for creating maps and variable data for creating tables. To start you need to get a spatial file. I decided to get data for Provincial regions within Canada. To download the Provincial Regions shapefille go HERE. Click on the link "ger_000b11a…."

 

After you download the shapefile import it into Cartographica by choosing File > Import Vector Data.

To download basic population data on Canadian provinces and territories click HERE In the webpage click on the first "CSV (comma-separated values)" link to download the data.

Open the data in a spreadsheet application. The data are downloaded with additional information that is not needed for creating maps in Cartographica. To clean the data delete the second row, which contains data on all of Canada and delete any row below row 16. Once you have deleted the extra information save the file as Canada_Prov

Next, import the data into Cartographica by choosing File > Import Table Data. This will open the Import Files Window.

Next, select the Join tab in the top right of the Import File Window. Change the Target Layer menu to "gpr_000b…". Next, in the table on the left side of the Import File Window change the "New Column" option to PRENAME for the "Geographic name" row. I provide a screenshot below to show the set up. Once ready, click Import.

Import File Window

Now that the data are joined together you can use the attribute data to create maps. I created the population map shown below by first double clicking on the "gar…" layer in the layer stack to bring up the Layer Styles Window.

Inside the Layer Styles Window, change the "Based on" menu to Populaiton, 2011. Click on the "+" button six times to add six categories to the table. Next, click the gear box and then choose "Distribute with Natural Breaks (Jenks)". Finally, add a color palette by choosing Window > Show Color Palettes. This will bring up the Color Palettes window. Here you can create a new color palette, use an existing palette or go to another source like to create a color palette.

For this post I decided to create a new color palette on the Color Brewer website. See this blog post on Cartographica.com to get steps for using Color Brewer with Cartographcia. Follow the steps to create your own Color Brewer palette. I provide a screenshot of the Color Palettes Window with the Color Brewer ramp included.

Color Palettes Window

Once you have the new color palette create click and drag it to the table within the Layer Styles Window. This will automatically assign the appropriate colors to the Canadian Provinces. I provide a screenshot of the final map below.

Final Map

Also I provide a second map with a Live Map added to give a little more context to the population map. To add a live map choose File > Add Live Map. Notice that when the LIve Map is added the projection for the Canadian shapefile changes.

With Live Map