MaptimeLA presents:
Let's make a map with
open data and QGIS!

#maptimeLA

Thank you to LA Counts & Hack for LA for making today's event possible!

You can follow along at:
https://maptimela.github.io/opendataday

QGIS is a free, open source, geographic information system software.

You will want to have QGIS version 3.x to follow along: QGIS Download

For Mac Users with OSX greater than 10.13, install LTR Release 3.4.5 package from here: Mac Installer

Today's Topics

Task 1: Get data
Task 2: Examine data
Task 3: Make a map

Task 1: Get data

Let's find some data!

There are many different open data portals. If you are not sure where to start, LA Counts aggregates all these sources into one place to search.

A few of the bigger portals:

Spatial Data:
 • LA City
 • LA County

All Data:
 • LA City
 • LA County

For today's exercise, we will use the following datasets (LA Counts links):

Shapefile:
 • Cities
 • LA Neighborhood Councils
 • Parks
Excel table:
 • Schools

A copy of these datasets can also be found in the GitHub repository under the data folder.
https://github.com/maptimeLA/opendataday

Task 2: Examine data

What is in the data you just downloaded?

When you open the zip file, you will see several files. These files together make up a shapefile which is a common GIS file type.

Next let's open the Excel table. This file will need some modifications if we want to map the data.

Delete the header rows and take note of the names of fields that contain the map coordinates (latitude, longitude). Save as a csv.

Open QGIS Desktop

Drag and drop the 3 zip files (cities, neighborhood councils, parks) from your computer's file explorer into the QGIS window.

Alternatively, you can navigate to them through the Browser panel (right click on a grey toolbar to add the Browser Panel if needed).

If you try to add the schools, it will just show up as a table. However, we want to see the school locations.

Go to Layer, Add Layer, Add Delimited Text Layer.

Select your csv under File Name. Under Geometry Definition, select Point Coordinates, X = Longitude, Y = Latitude, Geometry CRS = EPSG:4326.

Now we see schools!

How do we see what the shapes are? One way is to use the Identify tool (i in a blue circle). Click on the identify tool and then click on a feature.

Identify works on whatever layer is highlighted in your Layers panel (try selecting another layer and identifying a feature in that layer).

If we want to see all the names and information in a layer, we can open a table view. Right click on a layer and select Open Attribute Table.

Now you can explore all the data connected to all the shapes on the map. Any rows you select will be highlighted on the map.

Task 3: Make a map

We've got some data in our map, but how do we make it look good?

First, let's add some basemaps. Basemaps give context to our layers. We're going to add a Plugin that has basemaps.

Go to Plugins, Manage & Install Plugins.

Search for either QuickMapServices or OpenLayers. Highlight the Plugin you want and click the Install button.

You can find the plugin you just added by going to Web, QuickMapServices (or OpenLayers).

Select OSM Standard from the OSM menu. Please note that some services require an API key to use.

After you click a basemap, it should load as a layer in your map (it may take a few seconds). Drag it to the bottom of the layer list and uncheck some of your layers.

Yea that's great, but I want moooorrreee baselayers
Python script for more basemaps!

Now that we have a basemap, we might want some of our other layers to have different symbology to see things better. Double click on a Layer to open its Properties.

Let's make our parks green and semi-transparent. Under Layer Rendering, set Opacity to 50%. Click Apply to see the changes on the map.

Let's make our a black outline. Double click on the Cities layer and choose one of the outline templates. Click on Simple Fill and set the Stroke Color to black.

Let's make our neighborhood councils have different colors. Double click on the Neighborhood Councils layer and select Categorized. Choose the Name column and click Classify at the bottom.

You can add labels to a layer, by clicking on Labels in Properties. Set it to Single Label and pick the Field under Label with.

After you've styled everything how you want, it's time to make a map to print!

Go to Project, New Print Layout. It will prompt you for a name (you can have multiple print layouts).

You'll see a blank page. Go to Add Item, Add Map. Click on the blank page and drag to create a rectangle for your map.

You should see your map. If not, don't fret! Go to Item Properties, Set to map canvas extent. Then scroll up and click Update Preview.

Go to Add Item, Add Label to add a title to your map. Edit the text on right panel.

Once you are happy with your map, go to Layout and either Print or Export to a PDF/image to share.

We're done w/ the tutorial, but now you should experiment! Modify these tasks to use different data. Then try other tools.

Learn more:

 • QGIS Tutorials

 • Latest documentation
   everything post 2.18 is "testing" because
   of the huge effort involved in
   translating to global languages

Please join us for our next
#maptimeLA meeting!

Until then, chat w/ us on Slack!