qgis basics for journalists

Add points

There are two types of point layers you will work with on a regular basis. The first is a Census file that locates hospitals, airports, government buildings and more. The second is one that you want to create that locates points you research, like chemical spills, neighborhood crimes, etc. This is data that has already been geocoded.

Add airports and hospitals

Go to the Layer menu and select Add vector layer (Command-shift-V). Navigate to the project files and open SHP files - source folder, then the alameda-2010-points folder and then click on the file that ends in .shp and click Open. A points layer will be added to the map.

We could extract the hospitals the same way we did with the roads but I want to show you another technique.

Open the Layer properties for the points layer.

Change the Render pull-down menu to Categorized.This creates a class for each type of entry

Change the Column to MTFCC.

Use the default Color ramp.

Click the Classify button. This should create a symbols for each the MTFCC codes and create labels.

Your Layer Properties should look something like this:

point categories

Find the symbol with the value K2451 and double-click on the circle. K2451 is the code for airports.

This opens a Symbol Selector pop-up box. Click the Property button to open the Symbol properties.

Change the Symbol layer type in the top-right corner to SVG marker.

Set the size to 6, click on an airplane icon in the SVG Image gallery and then click OK. Click OK again to return to the Layer properties and click Apply.

Airplane markers will appear on your map and in the Layers panel.

Next, find the symbol with the value K1231 and double-click on the circle. K1231 is the code for hospitals.

This opens a Symbol Selector pop-up box. Click the Property button to open the Symbol properties.

Change the Symbol layer type to SVG marker. Set the size to 6, click on an hospital icon in the SVG Image gallery and then click OK. Click OK again to return to the Layer properties and click Apply. Hospital markers will appear on your map and in the Layers panel.

Now let's get rid of the symbols we don't want. Click on the first symbol in the window and click the Delete button. Repeat until the only markers left are the rirport and hospital icons. Click Apply. Your map should look like this:

point icons

If you want to add some labels, here's how it's done. Click on the labels icon on the left column of the Layer Properties.

Check the box to Display Labels. Change the field to FULLNAME. Feel free to play with the font and point size.

Adjust the placement to Below.

Check buffer labels to add a line around your text for easier reading. Change the the size to 2 points and the color to white.

Change the Y offset to -8

Click OK.

Add geocoded data

Were going to add some points from the US toxic release inventory that show up in Alameda County. Geocoding is not hard and many services offer it for free. Google will geocode as many as 2,500 adresses at a time. As you can tell from the image below, latitude and longitude are included in the data.

delimited point text

Start by hiding the points layer (uncheck).

Go to the Plugins menu and select Delimited Text -> Add Delimited Text Layer.

A window will open and allow you to browse for the file. Navigate to the data folder and select toxic-releases.csv. Ignore any warnings at this point.

Put a comma in the Delimiter String field and click the Parse button. The latitude and longitude columns should appear in the Geometry fields.

Click OK. Your map should look like this:

delimited points layer

This creates a new layer that can be edited and exported like a SHP file.