Created
April 24, 2017 05:25
-
-
Save tlrobinson/c4aaaea8b5768881aeda06f9b24abc14 to your computer and use it in GitHub Desktop.
Import SF crime data from https://data.sfgov.org/Public-Safety/SF-Crime-Heat-Map/q6gg-sa2p/data into PostgreSQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE sf_crime_incidents ( | |
incident_number integer, | |
category varchar, | |
description varchar, | |
day_of_week varchar, | |
date date, | |
time time, | |
police_department_district varchar, | |
resolution varchar, | |
address varchar, | |
latitude double precision, | |
longitude double precision, | |
location varchar | |
); | |
COPY sf_crime_incidents | |
FROM '/Users/tlrobinson/Downloads/SF_Crime_Heat_Map.csv' | |
DELIMITER ',' | |
CSV HEADER; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment