Set you up with accounts here, signup.
- A quick look at what CartoDB is and how people use it
- Tour of dashboard
- Common data
- Uploading data
- Tour of table and map view
- Publishing maps
- Public profile
Our first dataset will be the Cambridge roof polygons! Go here but don't download it yet.
Let's look at how to import from a URL.
- Table and map view
- Styling data
- Thematic maps!
Onward!
Let's do the exact same thing with Somerville.
Let's join the data using a UNION
function
SELECT
the_geom, area_sq_ft, local_id, moved, sourcedata, sourcedate, sourcetype, struct_id, town_id
FROM
structures_poly_49
UNION ALL
SELECT
the_geom, area_sq_ft, local_id, moved, sourcedata, sourcedate, sourcetype, struct_id, town_id
FROM
structures_poly_274
Now, use the Options menu to Create table from query
and call it neighborhood
Let's go grab the shapefile for Boston libraries and import it into our accounts.
Create a new column in our neighborhood
table called library
Now, we can write values into that column using relational SQL!
UPDATE
neighborhood
SET
library =
(
SELECT
ST_Distance(the_geom, neighborhood.the_geom, true)
FROM
libraries_pt
ORDER BY
the_geom <-> neighborhood.the_geom
LIMIT 1
)
Grab MBTA stations
Add new column in neighborhoods
called mbta
Run the distance calculation again
UPDATE
neighborhood
SET
mbta = (
SELECT
ST_Distance(the_geom, neighborhood.the_geom, true)
FROM mbta_node
ORDER BY the_geom <-> neighborhood.the_geom
LIMIT 1
)
Create a Visualization
- Visualizations
- Multilayer map
- Layout
- Publishing options
... After creating the first two tables; don't create a visualization yet. First you will want to run the SQL underneath in one table before selecting the "Options" menu to "Create table from query" and call it "neighborhood." ....