This commit is contained in:
Jeremy Kidwell 2019-03-14 19:04:29 +00:00
parent a93fabdf61
commit 513e98aaac
23 changed files with 196 additions and 383 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -1,6 +1,6 @@
# Session 1
# Session 1 {-}
## Introduction - Map Gallery
# Introduction - Map Gallery
Geospatial visualisation (e.g. "online maps") are becoming increasingly important for public communication and policy analysis. Let's start by looking at some digital maps to see how this works in practice:
@ -24,7 +24,7 @@ Lots of samples here: <https://opendata.cityofnewyork.us/projects/>
...and here: <https://carto.com/gallery/>
## Challenge 1: Find yourself on the map
# Challenge 1: Find yourself on the map
Goal: getting comfortable with the Carto interface
@ -32,7 +32,7 @@ First, log into your account at <https://carto.com/login>. Once you are logged i
Let's begin by building a data set, so you can get a sense of how those points get on the (digital) map.
### Part 1, building a data set:
## Part 1, building a data set:
- In Carto, create an empty map. You do this by clicking on "New map" from the second toolbar while in your Carto dashboard. Then click on "Create Empty Map" on the right hand side. This will take a minutes.
- From the dialogue that comes up, click "Add points"
- The map will begin at the whole world. First zoom in (double click on the map, or click on the + sign on the left corner and click + drag the map to center it properly) until you can just see the UK. Zoom in a bit futher on to greater Birmingham. Notice how Carto gives you a number for your "zoom level" on the left hand side. You should eventually be on zoom level 10, centered on Birmingham.
@ -48,7 +48,7 @@ Let's begin by building a data set, so you can get a sense of how those points g
Once you have a table in data view that has 6 rows, you're ready to move on to the next step.
### Part 2, visualising your data:
## Part 2, visualising your data:
- Switch to "Map View"
- Zoom out until you can see all your points on the screen. The easiest way to do this is by clicking on the layer number ("1") to open the drawer for the menu.
- Open up the "map layer wizard" toolbar on the right hand side (it may already be open as it's the default).

View File

@ -1,10 +1,8 @@
# Session 2
## Challenge 2: Work with existing data
# Challenge 2: Work with existing data {-}
Now that you've learned how to work with your own simple data set, for this second session, we will work with some existing and more complex data.
### Part 1, getting data:
## Part 1, getting data:
Start off by downloading some West Midlands crime statistics using the following file: <https://github.com/kidwellj/intro_to_geospatial_carto/raw/master/data/westmids_crime.zip>. If you type this URL into a web browser, it should begin to download automatically.
@ -18,7 +16,7 @@ Import the `2018-12-west-midlands-street.csv` data file into your carto account:
- Click "Add layer" and the file will be uploaded into carto as a new data layer. This may take a wee while, so be patient.
- Now you have a whole lot of new dots! Let's make those dots more meaningful with some visualisation tricks you've just learned in the previous challenge.
### Part 2, visualisation by category:
## Part 2, visualisation by category:
Open the toolbox to the right and the map layer wizard we just used in the previous session:
@ -33,7 +31,7 @@ Open the toolbox to the right and the map layer wizard we just used in the previ
This map does a good job of showing individual incidence of crimes and works best at a close zoom (level 15 or higher). Let's create a new layer now that shows a different kind of visualisation at a wider zoom.
### Part 3, visualisation by density:
## Part 3, visualisation by density:
- Return to the main carto dashboard by clicking on "Maps" and "New Map"
- From the add datasets window that appears, select from "Your Datasets" and then pick out your crime data table (default name is "table_2018_12_west_midlands_street" unless you've changed it). We're going to add the same data to our map as a new layer and configure it differently.
- Once the new layer has been added, turn off display for the other two tables (using the small slider on the right of the title).

View File

@ -1,4 +0,0 @@
# Introduction
This is the first real chapter.

View File

@ -1,3 +0,0 @@
# Diving In
Now let's talk details.

View File

@ -1,150 +0,0 @@
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>A Minimal Bookdown Book</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta name="description" content="Everything you need (and nothing more) to start a bookdown book.">
<meta name="generator" content="bookdown 0.1 and GitBook 2.6.7">
<meta property="og:title" content="A Minimal Bookdown Book" />
<meta property="og:type" content="book" />
<meta property="og:url" content="http://seankross.com/bookdown-start/" />
<meta property="og:description" content="Everything you need (and nothing more) to start a bookdown book." />
<meta name="github-repo" content="seankross/bookdown-start" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="A Minimal Bookdown Book" />
<meta name="twitter:description" content="Everything you need (and nothing more) to start a bookdown book." />
<meta name="author" content="Sean Kross">
<meta name="date" content="2016-12-09">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="prev" href="introduction.html">
<script src="libs/jquery-2.2.3/jquery.min.js"></script>
<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
<div class="book-summary">
<nav role="navigation">
<ul class="summary">
<li><a href="./">A Minimal Bookdown Book</a></li>
<li class="divider"></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i>Preface</a></li>
<li class="chapter" data-level="1" data-path="introduction.html"><a href="introduction.html"><i class="fa fa-check"></i><b>1</b> Introduction</a></li>
<li class="chapter" data-level="2" data-path="diving-in.html"><a href="diving-in.html"><i class="fa fa-check"></i><b>2</b> Diving In</a></li>
<li class="divider"></li>
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i><a href="./">A Minimal Bookdown Book</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<section class="normal" id="section-">
<div id="diving-in" class="section level1">
<h1><span class="header-section-number">Chapter 2</span> Diving In</h1>
<p>Now lets talk details.</p>
<div class="references">
</div>
</div>
</section>
</div>
</div>
</div>
<a href="introduction.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
<script src="libs/gitbook-2.6.7/js/lunr.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
<script>
require(["gitbook"], function(gitbook) {
gitbook.start({
"sharing": {
"facebook": true,
"twitter": true,
"google": false,
"weibo": false,
"instapper": false,
"vk": false,
"all": ["facebook", "google", "twitter", "weibo", "instapaper"]
},
"fontsettings": {
"theme": "white",
"family": "sans",
"size": 2
},
"edit": {
"link": null,
"text": null
},
"download": null,
"toc": {
"collapse": "subsection"
}
});
});
</script>
</body>
</html>

View File

@ -5,28 +5,27 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>A Minimal Bookdown Book</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta name="description" content="Everything you need (and nothing more) to start a bookdown book.">
<meta name="generator" content="bookdown 0.1 and GitBook 2.6.7">
<title>Introduction to Geospatial Data Visualisation</title>
<meta name="description" content="A brief OER lab/course intended to give Undergraduates a basic orientation to geospatial data using the carto platform">
<meta name="generator" content="bookdown and GitBook 2.6.7">
<meta property="og:title" content="A Minimal Bookdown Book" />
<meta property="og:title" content="Introduction to Geospatial Data Visualisation" />
<meta property="og:type" content="book" />
<meta property="og:url" content="http://seankross.com/bookdown-start/" />
<meta property="og:url" content="http://jeremykidwell.info/files/bookdown/intro_to_geospatial_carto/" />
<meta property="og:description" content="Everything you need (and nothing more) to start a bookdown book." />
<meta name="github-repo" content="seankross/bookdown-start" />
<meta property="og:description" content="A brief OER lab/course intended to give Undergraduates a basic orientation to geospatial data using the carto platform" />
<meta name="github-repo" content="kidwellj/intro_to_geospatial_carto" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="A Minimal Bookdown Book" />
<meta name="twitter:title" content="Introduction to Geospatial Data Visualisation" />
<meta name="twitter:description" content="Everything you need (and nothing more) to start a bookdown book." />
<meta name="twitter:description" content="A brief OER lab/course intended to give Undergraduates a basic orientation to geospatial data using the carto platform" />
<meta name="author" content="Sean Kross">
<meta name="author" content="Jeremy H. Kidwell">
<meta name="date" content="2016-12-09">
<meta name="date" content="2019-03-12">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
@ -34,10 +33,10 @@
<link rel="next" href="introduction.html">
<link rel="next" href="about-the-author.html">
<script src="libs/jquery-2.2.3/jquery.min.js"></script>
<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
@ -58,18 +57,31 @@
<body>
<div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
<div class="book-summary">
<nav role="navigation">
<ul class="summary">
<li><a href="./">A Minimal Bookdown Book</a></li>
<li><a href="./">Introduction to Geospatial Data Visualisation</a></li>
<li class="divider"></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i>Preface</a></li>
<li class="chapter" data-level="1" data-path="introduction.html"><a href="introduction.html"><i class="fa fa-check"></i><b>1</b> Introduction</a></li>
<li class="chapter" data-level="2" data-path="diving-in.html"><a href="diving-in.html"><i class="fa fa-check"></i><b>2</b> Diving In</a></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i>Introduction to the module</a></li>
<li class="chapter" data-level="" data-path="about-the-author.html"><a href="about-the-author.html"><i class="fa fa-check"></i>About the Author</a></li>
<li class="chapter" data-level="" data-path="session-1.html"><a href="session-1.html"><i class="fa fa-check"></i>Session 1</a><ul>
<li class="chapter" data-level="0.1" data-path="session-1.html"><a href="session-1.html#challenge-1-find-yourself-on-the-map"><i class="fa fa-check"></i><b>0.1</b> Challenge 1: Find yourself on the map</a><ul>
<li class="chapter" data-level="0.1.1" data-path="session-1.html"><a href="session-1.html#part-1-building-a-data-set"><i class="fa fa-check"></i><b>0.1.1</b> Part 1, building a data set:</a></li>
<li class="chapter" data-level="0.1.2" data-path="session-1.html"><a href="session-1.html#part-2-visualising-your-data"><i class="fa fa-check"></i><b>0.1.2</b> Part 2, visualising your data:</a></li>
</ul></li>
</ul></li>
<li class="chapter" data-level="" data-path="session-2.html"><a href="session-2.html"><i class="fa fa-check"></i>Session 2</a><ul>
<li class="chapter" data-level="0.1.3" data-path="session-2.html"><a href="session-2.html#part-1-getting-data"><i class="fa fa-check"></i><b>0.1.3</b> Part 1, getting data:</a></li>
<li class="chapter" data-level="0.1.4" data-path="session-2.html"><a href="session-2.html#part-2-visualisation-by-category"><i class="fa fa-check"></i><b>0.1.4</b> Part 2, visualisation by category:</a></li>
<li class="chapter" data-level="0.1.5" data-path="session-2.html"><a href="session-2.html#part-3-visualisation-by-density"><i class="fa fa-check"></i><b>0.1.5</b> Part 3, visualisation by density:</a></li>
<li class="chapter" data-level="0.2" data-path="session-2.html"><a href="session-2.html#extra-credit"><i class="fa fa-check"></i><b>0.2</b> Extra credit:</a></li>
<li class="chapter" data-level="0.3" data-path="session-2.html"><a href="session-2.html#possible-diversion-icons"><i class="fa fa-check"></i><b>0.3</b> Possible diversion (icons!):</a></li>
</ul></li>
<li class="divider"></li>
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
@ -82,7 +94,7 @@
<div class="body-inner">
<div class="book-header" role="navigation">
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i><a href="./">A Minimal Bookdown Book</a>
<i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Introduction to Geospatial Data Visualisation</a>
</h1>
</div>
@ -91,14 +103,15 @@
<section class="normal" id="section-">
<div id="header">
<h1 class="title">A Minimal Bookdown Book</h1>
<h4 class="author"><em>Sean Kross</em></h4>
<h4 class="date"><em>2016-12-09</em></h4>
<h1 class="title">Introduction to Geospatial Data Visualisation</h1>
<p class="author"><em>Jeremy H. Kidwell</em></p>
<p class="date"><em>2019-03-12</em></p>
</div>
<div id="preface" class="section level1 unnumbered">
<h1>Preface</h1>
<p>This is the very first part of the book.</p>
<div id="introduction-to-the-module" class="section level1 unnumbered">
<h1>Introduction to the module</h1>
<p>This module has been designed to enable independent learners to gain a basic familiarity with data visualisation, using the CartoDB platform.</p>
<p>Ideally, a student should expect to invest at least four hours in independent learning activities over the course of a week. It should be possible to work through this a bit more slowly and in-depth. I have tried to point to a range of resources, both those which are accessible and those which are challenging.</p>
<p>For the week, we have divided content into four challenges. Included here (and below) is a brief introduction to the course. There are four additional sessions, which each have associated activities.</p>
</div>
</section>
@ -107,8 +120,9 @@
</div>
</div>
<a href="introduction.html" class="navigation navigation-next navigation-unique" aria-label="Next page""><i class="fa fa-angle-right"></i></a>
<a href="about-the-author.html" class="navigation navigation-next navigation-unique" aria-label="Next page"><i class="fa fa-angle-right"></i></a>
</div>
</div>
<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
<script src="libs/gitbook-2.6.7/js/lunr.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
@ -117,16 +131,18 @@
<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
<script>
require(["gitbook"], function(gitbook) {
gitbook.require(["gitbook"], function(gitbook) {
gitbook.start({
"sharing": {
"github": false,
"facebook": true,
"twitter": true,
"google": false,
"linkedin": false,
"weibo": false,
"instapper": false,
"instapaper": false,
"vk": false,
"all": ["facebook", "google", "twitter", "weibo", "instapaper"]
"all": ["facebook", "google", "twitter", "linkedin", "weibo", "instapaper"]
},
"fontsettings": {
"theme": "white",
@ -137,6 +153,10 @@ gitbook.start({
"link": null,
"text": null
},
"history": {
"link": null,
"text": null
},
"download": null,
"toc": {
"collapse": "subsection"

View File

@ -1,17 +1,21 @@
---
title: "A Minimal Bookdown Book"
author: "Sean Kross"
date: "2016-12-09"
---
title: "Introduction to Geospatial Data Visualisation"
author: "Jeremy H. Kidwell"
date: "2019-03-12"
site: bookdown::bookdown_site
documentclass: book
bibliography: [book.bib]
biblio-style: apalike
link-citations: yes
github-repo: seankross/bookdown-start
url: 'http\://seankross.com/bookdown-start/'
description: "Everything you need (and nothing more) to start a bookdown book."
github-repo: kidwellj/intro_to_geospatial_carto
url: 'http\://jeremykidwell.info/files/bookdown/intro_to_geospatial_carto/'
description: "A brief OER lab/course intended to give Undergraduates a basic orientation to geospatial data using the carto platform"
---
# Preface {-}
# Introduction to the module {-}
This is the very first part of the book.
This module has been designed to enable independent learners to gain a basic familiarity with data visualisation, using the CartoDB platform.
Ideally, a student should expect to invest at least four hours in independent learning activities over the course of a week. It should be possible to work through this a bit more slowly and in-depth. I have tried to point to a range of resources, both those which are accessible and those which are challenging.
For the week, we have divided content into four challenges. Included here (and below) is a brief introduction to the course. There are four additional sessions, which each have associated activities.

View File

@ -1,145 +0,0 @@
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>A Minimal Bookdown Book</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta name="description" content="Everything you need (and nothing more) to start a bookdown book.">
<meta name="generator" content="bookdown 0.1 and GitBook 2.6.7">
<meta property="og:title" content="A Minimal Bookdown Book" />
<meta property="og:type" content="book" />
<meta property="og:url" content="http://seankross.com/bookdown-start/" />
<meta property="og:description" content="Everything you need (and nothing more) to start a bookdown book." />
<meta name="github-repo" content="seankross/bookdown-start" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="A Minimal Bookdown Book" />
<meta name="twitter:description" content="Everything you need (and nothing more) to start a bookdown book." />
<meta name="author" content="Sean Kross">
<meta name="date" content="2016-12-09">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="prev" href="index.html">
<link rel="next" href="diving-in.html">
<script src="libs/jquery-2.2.3/jquery.min.js"></script>
<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
<div class="book-summary">
<nav role="navigation">
<ul class="summary">
<li><a href="./">A Minimal Bookdown Book</a></li>
<li class="divider"></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i>Preface</a></li>
<li class="chapter" data-level="1" data-path="introduction.html"><a href="introduction.html"><i class="fa fa-check"></i><b>1</b> Introduction</a></li>
<li class="chapter" data-level="2" data-path="diving-in.html"><a href="diving-in.html"><i class="fa fa-check"></i><b>2</b> Diving In</a></li>
<li class="divider"></li>
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i><a href="./">A Minimal Bookdown Book</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<section class="normal" id="section-">
<div id="introduction" class="section level1">
<h1><span class="header-section-number">Chapter 1</span> Introduction</h1>
<p>This is the first real chapter.</p>
</div>
</section>
</div>
</div>
</div>
<a href="index.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
<a href="diving-in.html" class="navigation navigation-next " aria-label="Next page""><i class="fa fa-angle-right"></i></a>
<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
<script src="libs/gitbook-2.6.7/js/lunr.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
<script>
require(["gitbook"], function(gitbook) {
gitbook.start({
"sharing": {
"facebook": true,
"twitter": true,
"google": false,
"weibo": false,
"instapper": false,
"vk": false,
"all": ["facebook", "google", "twitter", "weibo", "instapaper"]
},
"fontsettings": {
"theme": "white",
"family": "sans",
"size": 2
},
"edit": {
"link": null,
"text": null
},
"download": null,
"toc": {
"collapse": "subsection"
}
});
});
</script>
</body>
</html>

View File

@ -58,3 +58,42 @@ span.search-highlight {
overflow: visible !important;
}
}
.kable_wrapper {
border-spacing: 20px 0;
border-collapse: separate;
border: none;
margin: auto;
}
.kable_wrapper > tbody > tr > td {
vertical-align: top;
}
.book .book-body .page-wrapper .page-inner section.normal table tr.header {
border-top-width: 2px;
}
.book .book-body .page-wrapper .page-inner section.normal table tr:last-child td {
border-bottom-width: 2px;
}
.book .book-body .page-wrapper .page-inner section.normal table td, .book .book-body .page-wrapper .page-inner section.normal table th {
border-left: none;
border-right: none;
}
.book .book-body .page-wrapper .page-inner section.normal table.kable_wrapper > tbody > tr, .book .book-body .page-wrapper .page-inner section.normal table.kable_wrapper > tbody > tr > td {
border-top: none;
}
.book .book-body .page-wrapper .page-inner section.normal table.kable_wrapper > tbody > tr:last-child > td {
border-bottom: none;
}
div.theorem, div.lemma, div.corollary, div.proposition, div.conjecture {
font-style: italic;
}
span.theorem, span.lemma, span.corollary, span.proposition, span.conjecture {
font-style: normal;
}
div.proof:after {
content: "\25a2";
float: right;
}
.header-section-number {
padding-right: .5em;
}

View File

@ -104,7 +104,8 @@
background-color: inherit;
}
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal blockquote {
border-color: inherit;
border-color: #c4b29f;
opacity: 0.9;
}
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre,
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code {

View File

@ -12,12 +12,13 @@
.book .book-summary .book-search input:hover {
width: 100%;
background: transparent;
border: 1px solid transparent;
border: 1px solid #ccc;
box-shadow: none;
outline: none;
line-height: 22px;
padding: 7px 4px;
color: inherit;
box-sizing: border-box;
}
.book.with-search .book-summary .book-search {
top: 0px;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
require(["jQuery"], function(jQuery) {
gitbook.require(["jQuery"], function(jQuery) {
/*
* jQuery Highlight plugin

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
gitbook.require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
var gs = gitbook.storage;
@ -16,6 +16,18 @@ require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
}
});
// add the History button (file history on Github)
var history = config.history;
if (history && history.link) gitbook.toolbar.createButton({
icon: 'fa fa-history',
label: history.text || 'History',
position: 'left',
onClick: function(e) {
e.preventDefault();
window.open(history.link);
}
});
var down = config.download;
var normalizeDownload = function() {
if (!down || !(down instanceof Array) || down.length === 0) return;
@ -175,31 +187,43 @@ require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
});
var bookBody = $('.book-body'), bookInner = bookBody.find('.body-inner');
var chapterTitle = function() {
return bookInner.find('.page-inner').find('h1,h2').first().text();
};
var bookTitle = function() {
return bookInner.find('.book-header > h1').first().text();
};
var saveScrollPos = function(e) {
// save scroll position before page is reloaded
gs.set('bodyScrollTop', {
body: bookBody.scrollTop(),
inner: bookInner.scrollTop(),
title: bookInner.find('.page-inner').find('h1,h2').first().text()
focused: document.hasFocus(),
title: chapterTitle()
});
};
$(document).on('servr:reload', saveScrollPos);
// check if the page is loaded in the RStudio preview window
var inRStudio = function() {
// check if the page is loaded in an iframe (e.g. the RStudio preview window)
var inIFrame = function() {
var inIframe = true;
try { inIframe = window.self !== window.top; } catch (e) {}
if (!inIframe) return false;
return /^\/rmd_output\/[0-9]+\/.*$/.test(window.location.pathname);
return inIframe;
};
if (inRStudio()) $(window).on('blur', saveScrollPos);
if (inRStudio()) $(window).on('unload', saveScrollPos);
$(window).on('blur unload', function(e) {
if (inIFrame()) saveScrollPos(e);
gs.set('bookTitle', bookTitle());
});
$(document).ready(function(e) {
$(function(e) {
if (gs.get('bookTitle', '') !== bookTitle()) localStorage.clear();
var pos = gs.get('bodyScrollTop');
if (pos && pos.title === bookInner.find('.page-inner').find('h1,h2').first().text()) {
if (pos.body !== 0) bookBody.scrollTop(pos.body);
if (pos.inner !== 0) bookInner.scrollTop(pos.inner);
if (pos) {
if (pos.title === chapterTitle()) {
if (pos.body !== 0) bookBody.scrollTop(pos.body);
if (pos.inner !== 0) bookInner.scrollTop(pos.inner);
}
if (pos.focused) bookInner.find('.page-wrapper').focus();
}
// clear book body scroll position
gs.remove('bodyScrollTop');

View File

@ -1,4 +1,4 @@
require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
gitbook.require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
var fontState;
var THEMES = {

View File

@ -1,6 +1,6 @@
require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
gitbook.require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
var index = null;
var $searchInput, $searchForm;
var $searchInput, $searchLabel, $searchForm;
var $highlighted, hi = 0, hiOpts = { className: 'search-highlight' };
var collapse = false;
@ -92,6 +92,7 @@ require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
// Create search form
function createForm(value) {
if ($searchForm) $searchForm.remove();
if ($searchLabel) $searchLabel.remove();
if ($searchInput) $searchInput.remove();
$searchForm = $('<div>', {
@ -99,13 +100,22 @@ require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
'role': 'search'
});
$searchLabel = $('<label>', {
'for': 'search-box',
'aria-hidden': 'false',
'hidden': ''
});
$searchInput = $('<input>', {
'id': 'search-box',
'type': 'search',
'class': 'form-control',
'val': value,
'placeholder': 'Type to search'
});
$searchLabel.append("Type to search");
$searchLabel.appendTo($searchForm);
$searchInput.appendTo($searchForm);
$searchForm.prependTo(gitbook.state.$book.find('.book-summary'));
}
@ -180,7 +190,7 @@ require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
scrollToHighlighted();
}
}).on("input", ".book-search input", function(e) {
var q = $(this).val();
var q = $(this).val().trim();
if (q.length === 0) {
gitbook.sidebar.filter(null);
gitbook.storage.remove("keyword");

View File

@ -1,5 +1,15 @@
require(["gitbook", "lodash"], function(gitbook, _) {
gitbook.require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
var SITES = {
'github': {
'label': 'Github',
'icon': 'fa fa-github',
'onClick': function(e) {
e.preventDefault();
var repo = $('meta[name="github-repo"]').attr('content');
if (typeof repo === 'undefined') throw("Github repo not defined");
window.open("https://github.com/"+repo);
}
},
'facebook': {
'label': 'Facebook',
'icon': 'fa fa-facebook',
@ -24,6 +34,14 @@ require(["gitbook", "lodash"], function(gitbook, _) {
window.open("https://plus.google.com/share?url="+encodeURIComponent(location.href));
}
},
'linkedin': {
'label': 'LinkedIn',
'icon': 'fa fa-linkedin',
'onClick': function(e) {
e.preventDefault();
window.open("https://www.linkedin.com/shareArticle?mini=true&url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title));
}
},
'weibo': {
'label': 'Weibo',
'icon': 'fa fa-weibo',

View File

@ -1,5 +1,5 @@
[
["index.html", "A Minimal Bookdown Book Preface", " A Minimal Bookdown Book Sean Kross 2016-12-09 Preface This is the very first part of the book. "],
["introduction.html", "Chapter 1 Introduction", " Chapter 1 Introduction This is the first real chapter. "],
["diving-in.html", "Chapter 2 Diving In", " Chapter 2 Diving In Now lets talk details. "]
["session-1.html", "Session 1", " Session 1 "],
["introduction-map-gallery.html", "Chapter 1 Introduction - Map Gallery", " Chapter 1 Introduction - Map Gallery Geospatial visualisation (e.g. “online maps”) are becoming increasingly important for public communication and policy analysis. Lets start by looking at some digital maps to see how this works in practice: Example 1, international environmental and development NGOs: https://ngoaidmap.org/ https://www.globalforestwatch.org/map https://resourcewatch.org/data/pulse https://www.vizzuality.com/projects/half-earth http://geocat.kew.org/ Example 2, local municipalities http://www.di.unito.it/~schifane/smellymaps/ http://www.urbandisplacement.org/migrationmap https://qhood01.github.io/nycSQF/ http://openseweratlas.tumblr.com/map http://www.arqueocordoba.com/rutas/index_en.html Lots of samples here: https://opendata.cityofnewyork.us/projects/ …and here: https://carto.com/gallery/ "],
["challenge-1-find-yourself-on-the-map.html", "Chapter 2 Challenge 1: Find yourself on the map 2.1 Part 1, building a data set: 2.2 Part 2, visualising your data:", " Chapter 2 Challenge 1: Find yourself on the map Goal: getting comfortable with the Carto interface First, log into your account at https://carto.com/login. Once you are logged in you can start to tinker with the platform. Lets begin by building a data set, so you can get a sense of how those points get on the (digital) map. 2.1 Part 1, building a data set: In Carto, create an empty map. You do this by clicking on “New map” from the second toolbar while in your Carto dashboard. Then click on “Create Empty Map” on the right hand side. This will take a minutes. From the dialogue that comes up, click “Add points” The map will begin at the whole world. First zoom in (double click on the map, or click on the + sign on the left corner and click + drag the map to center it properly) until you can just see the UK. Zoom in a bit futher on to greater Birmingham. Notice how Carto gives you a number for your “zoom level” on the left hand side. You should eventually be on zoom level 10, centered on Birmingham. The backgrond map is called a “base map”. Carto gives you several options to choose from. Click on “Change basemap” in the bottom left corner, and test out different basemaps until you find one you like. Now click and drag until you find your residence in Birmingham, probably around zoom level 17. Add a point for your place of residence. Note, you may need to “discard” the point and add a new one, using the add button on the bottom right-hand corner (its a circle with a + on it). Simply click on the map to add your point. Then click “done”. Now switch to “data view” (its on the top, in the centre). Data view looks a lot like a spreadsheet, except there are coordinates and a bit of information about the point youve just put down. Double-click in the box for name and description and add some relevant information for your point on the table. Next, add a new column (click on the small down arrow next to “name” column) and click on “Add new column” give the column a new name “rating”. Change the data type to “number” - you can do this by bring up the column settings menu (down arrow at the top of the column next to the title) and clicking on “Change data type”. Select “number” and then click on “OK, Change it”. Next, Id like you to add several other points to your map for the local area. To make this simple, think of an arbitrary category around which to add some points of interest, maybe coffee shops, restaurants, study places, etc. Add at least five features to the map (click on the small button on the bottom right hand side - a circle with a +) which fit in this category. Make sure you are placing them at accurate locations (at zoom level 17). Now add “metadata” - give each point a name, brief description, and then fill in a number to rate those sites based on your personal sense of the place. I recommend you use a five point scale with 5 being “best” and 1 being “worst”. Once you have a table in data view that has 6 rows, youre ready to move on to the next step. 2.2 Part 2, visualising your data: Switch to “Map View” Zoom out until you can see all your points on the screen. The easiest way to do this is by clicking on the layer number (“1”) to open the drawer for the menu. Open up the “map layer wizard” toolbar on the right hand side (it may already be open as its the default). Rename your table from “untitled table” to something descriptive (maybe “my neighbourhood”). You should already be on the “wizards” pane (icon of square with paintbrush) but switch to this if you arent already there Change the map type from “simple” to “bubble” Change the max radius to 50 so well have a more dramatic effect (radius is the third line under options, the max is the second box). Change the bubble fill to your favourite colour. Do this by clicking on the coloured rectangle, which will bring up a range of options. Now, switch to the info window pane (icon is a text bubble) - note that there are tabs for “click” and “hover” Set the “hover” setting to display the name of each of your sites and the “click” setting to show name and description. Move the mouse over your points on the map to see how this behaviour works. Return to the “map layer wizard menu” and make the dots 60% transparent (0.6). Do this by clicking on the down/up arrows next to the box with a number in it. This should be to the right of “Bubble fill” Now zoom out (zoom level 12 or lower). Try out a few different map types to see which is best for visualising your data at this zoom level. Try “choropleth,” “heat map” and “intensity”. Now youre familiar with the basics of Carto! Lets move onto the next challenge. "]
]

View File

@ -8,9 +8,8 @@ bibliography: [book.bib]
biblio-style: apalike
link-citations: yes
github-repo: kidwellj/intro_to_geospatial_carto
url: 'http\://jeremykidwell.info/files/bookdown/intro_to_geospatial_carto/'
url: 'http\://jeremykidwell.info/files/bookdown/intro_to_geospatial_carto/'
description: "A brief OER lab/course intended to give Undergraduates a basic orientation to geospatial data using the carto platform"
---
# Introduction to the module {-}
@ -19,4 +18,4 @@ This module has been designed to enable independent learners to gain a basic fam
Ideally, a student should expect to invest at least four hours in independent learning activities over the course of a week. It should be possible to work through this a bit more slowly and in-depth. I have tried to point to a range of resources, both those which are accessible and those which are challenging.
For the week, we have divided content into four challenges. Included here (and below) is a brief introduction to the course. There are four additional sessions, which each have associated activities.
For the week, we have divided content into four challenges. Included here (and below) is a brief introduction to the course. There are four additional sessions, which each have associated activities.