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 choropleth (5)

Wednesday
Mar212012

Mapping Florida's Foreclosure Troubles

The recent foreclosure crisis has resulted in significant economic and social strain throughout the United States. One place hit very hard during the recession is Florida. Florida experienced high levels of foreclosures due to rapid home construction and predatory lending that occurred during the 2002-2005 run up to the recession. In this post I highlight a free source of foreclosure data produced by the Department of Housing and Urban Development through conjunction with the Mortgage Bankers Association and the Federal Reserve. The dataset provided by HUD allows you to download data down to the census tract level on home foreclosures. The data are collected and estimated for the year 2008.

 

To download the foreclosure data click on the link above to HUD, and then click on the A-F letters alphabetizing the states. For this post I am focusing on counties within Florida so click on the link to the Florida data. It should begin to automatically download. Once downloaded save the file as a .csv.

To create maps we need to download a county file for Florida. The U.S. Census provides free county level shapefiles at this website. Download the Florida shapefile and then import it into Cartographica by choosing File > Import Vector Data.

Next, we can join the county level foreclosure data to the U.S. census county file. Choose File > Import Table Data. Select the Join tab in the top right of the Import File window, then change the Target Layer to Counties, finally, link the two datasets using the countycode and GeoID10. Check the box under Key and then click Import. I provide an image below of the set up.

Import File Window

 

Next, we can map the data. Double click on the Counties layer in the Layer Stack. This will bring up the Layer Styles window. Lets first map the total number of foreclosures by county. This will give us an idea about where the largest housing markets are within the state. Change the Based on menu to "estimated_number_mortgages. Click on the plus button ten times to add ten categories. Next, click the gear box and choose Distribute with Natural Breaks (Jenks).

To see the distribution on the map we need to choose a different color scheme. To change the color scheme choose Window > Show Color Palettes. Select a color palette by clicking and dragging it to the table within the Layer Styles window. I provide an image of the concentration of mortgages within the state.

Mortgages in Florida

 

The third image below show the county level distribution of the foreclosure rate within Florida. I changed the number of categories to five and I also changed the color scheme using the same methods as above.

Foreclosure Rate

 

The fourth image below is shown zoomed in on the hardest hit area of foreclosures in the Cape Coral area in Southwestern Florida. Notice the man-made development in Central Cape Coral. This areas was dramatically over built in hopes of capitalizing on the growing home prices that characterized the time between 1997 and 2006. To bring up the underlying satellite imagery, choose File > Add Live Map. I suggest adding the Live Map with Roads and Aerial Imagery to add more context to the map.

Cape Coral Area

The failures of the housing market can be seen in the widespread underdevelopment of the "cookie cutter" homes in central Cape Coral. See the image below for a close up of a badly underdeveloped neighborhood.

Distressed Neighborhood

 

Monday
Mar122012

Mapping Oil Production Worldwide

In a recent article in the L.A. Times it was reported that the U.S. has decreased oil imports and has increased oil production. This article inspired me to search for data on oil production and consumption by country.

Before we can create a map with this type of data we need a file that we can use to join data to. If you have seen previous posts you will see that we have used a basemap from Geocommons . I will be using this baseman again for this post. Download the file and then save it as World.shp. Next, import it into Cartographica by choosing File > Import Vector Data. When the file is imported there will be a yellow triangle next to the layer in the Layer Stack. Click on the triangle and then click Set CRS. Choose the World-Wide Projections option and then find the WGS 84 / Pseudo-Mercator coordinate reference system and then click on the Set button. This process will assign a coordinate reference system to the World layer.

Next, we need to collect data to map. I searched for data on oil imports and exports and found the U.S. Energy Information Administration website. The link above will take you to a downloadable dataset for annual oil production by country. Download the Excel file at the top of the dataset. Once the file is downloaded open it in a spreadsheet application. To clean the data, delete the first two rows. Add a title to column A by typing in Country. Find a delete the row for the Former U.S.S.R., the Hawaiian Trade Zone, East and West Germany, Former Czechoslovakia, Former Serbia and Montenegro, and Former Yugoslavia (Essentially, any country with a data entry of "--" needs to be deleted). Once complete save the file as a .csv.

Next, we need to import and join the oil production dataset to the World basemap. To do this choose File > Import Table Data. Select the join tab in the top right. Change the Target Layer to World and then in the table to the left change the Map To option for the Country row to Name and then click Import. I provide an image of the Import File Window below.

Import File Window

Now we are ready to create the map of oil production by country. The dataset that we downloaded is nice because it has oil production over a number of years so we can create a change map indicating where the most oil production has increased, decreased, or stayed about the same. However, lets start by mapping oil production in 2006.

To create a chloropleth map of the 2006 oil production double click on the World layer in the layer stack. Change the Based on option to 2006 and then click on the plus button ten times to add ten categories. Next, click on the gear box and choose Distribute with Natural Breaks (Jenks). Next Add a color palette by choosing Window > Show Color Palettes. Choose your desired color palette by clicking and dragging it to the table within the Layer Styles Window. I provide an image below of the 2006 oil production by country.

 

2006 Oil Production

Next, use the same process as above except this time create a map for oil production in 2010. I provide the image of 2010 oil production below.

Oil Production 2010

Finally, lets create a change in oil production map by create a new column (variable) that measure the change in oil production between 2010 and 2006. First, choose Layer > Add Column to create a new column. Next, choose Window > Show Layer Info. Find the New column and rename it "Change". Also, change the layer type from String to Number. Next, click the Set Formula button and then set up the formula to match the image below.

Set Formula

Finally, use the same process as above to create the change map. I provide an image below. Notice that the U.S. has been increasing its oil production since 2006, which corresponds with what the L.A. Times article reported.

Change 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

 

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