Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save JJRyan0/859cdae3dc1e9c01b3109889439496b7 to your computer and use it in GitHub Desktop.

Select an option

Save JJRyan0/859cdae3dc1e9c01b3109889439496b7 to your computer and use it in GitHub Desktop.
Visualizing Geographical Data with Scatterplots in Python.ipynb
{
"cells": [
{
"metadata": {},
"cell_type": "markdown",
"source": "## Visualizing Geographical Data with heatmaps, and scatter density maps in Python\n\n### New York Motor Vehicle Collisions Open Data - Visual Analysis of Persons Injured\n\n##### Question: How do we map incidents in New York city using just the longitude, latitude and number of motor incident values? \n\nData Source: https://data.cityofnewyork.us/Public-Safety/NYPD-Motor-Vehicle-Collisions/h9gi-nx95"
},
{
"metadata": {
"trusted": true,
"collapsed": false
},
"cell_type": "code",
"source": "#Created June 2017 @John Ryan\n#-------------------\n#Import required libs\n#-------------------\nimport pandas as pd\nimport seaborn as sns\nimport numpy as np\nimport matplotlib.pyplot as plt\n%matplotlib inline\ndata = pd.read_csv(\"C://Clusters//NYPD_Motor_Vehicle_Collisions_sample.csv\")",
"execution_count": 89,
"outputs": []
},
{
"metadata": {
"trusted": true,
"collapsed": false
},
"cell_type": "code",
"source": "from IPython.display import Image\nImage(\"C:\\\\Clusters\\\\new-york-city.PNG\", width=500, height=600)\nsource: www.pixabay.com",
"execution_count": 87,
"outputs": [
{
"output_type": "execute_result",
"data": {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment