Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Migrating lesson from workshop - #382

Open
mehak-sachdeva wants to merge 3 commits into
masterfrom
sql-postgis-lesson-4
Open

Migrating lesson from workshop#382
mehak-sachdeva wants to merge 3 commits into
masterfrom
sql-postgis-lesson-4

Conversation

@mehak-sachdeva

Copy link
Copy Markdown
Contributor

Course sql and postgis in CARTO - lesson 4 - Intermediate SQL
There could be some styling oversights - let me know if this fits in well.
@ohasselblad


We can import it more easily via [CartoDB's cached infrastructure](http://eschbacher.cartodb.com/api/v2/sql?q=SELECT%20the_geom,unique_key,created_date,closed_date,agency,agency_name,complaint_type,descriptor,location_type,incident_zip,incident_address,street_name,address_type,city,status,due_date,resolution_action_updated_date,latitude,longitude,borough,community_board%20FROM%20nyc_rat_sightings&format=csv&filename=nyc_rat_sightings)

## Getting Help

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section might be good for the postgis/sql cheat sheet. We might also look at where else to suggest this information. But it doesn't fit here since it's so late in the course.

@andy-esch

Copy link
Copy Markdown
Contributor

Looking good so far, @mehak-sachdeva.

What do you think about adding an additional section that normalizes the rat sightings by the number of people in each borough? We can get that data from the Data Observatory API.

num_sightings DESC
{% endhighlight %}

Proportional symbol maps symbolize attributes by having the marker have an area proportional to a quantity -- in our case that's number of complaints. In our case, we know roughly that the max number of complaints in any of the boroughs is around 6000, so we normalize all years by that number and then take the square root (since area is proportional to r^2).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use HTML to make the r^2 a superscript instead (r<sup>2</sup>)

@mehak-sachdeva

Copy link
Copy Markdown
Contributor Author

Did most of the formatting and file/site linking changes as suggested. Making a new map now and will look to incorporate the normalization by number of people in each borough with DO and add that section subsequently. Also thinking of a better lesson name alongside.
@ohasselblad

@andy-esch

Copy link
Copy Markdown
Contributor

For the naming, I suggest using some terms that are important in the lesson: group by, aggregate, postgis, join, dates, strings, rats, etc. etc. :) it'll be a crazy name!

@andy-esch

Copy link
Copy Markdown
Contributor

@mehak-sachdeva, what's the status here? seems like it's almost ready to be merged?

@mehak-sachdeva

Copy link
Copy Markdown
Contributor Author

@ohasselblad - still need to add the DO part to the map and subsequently to the lesson. Should be able to do this by EOD today.

@andy-esch

andy-esch commented Aug 31, 2016

Copy link
Copy Markdown
Contributor

I'd say let's hold off on the DO extension to this until later! We can add it as a separate chapter. Maybe create a ticket and assign for after the DO lessons come out?

@mehak-sachdeva

Copy link
Copy Markdown
Contributor Author

Yes, I feel that does make more sense. Okay - let me proof everything once and link the map that I have (without the DO) and then we can merge it!

@mehak-sachdeva

Copy link
Copy Markdown
Contributor Author

@ohasselblad relinked to the map in documentation account. Good to go?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants