{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import os\n", "import pandas as pd\n", "import numpy as np\n", "import seaborn as sns\n", "import matplotlib.pyplot as plt\n", "from IPython.core.display import display, HTML\n", "%matplotlib inline" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import folium\n", "from folium.plugins import FastMarkerCluster" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "pd.options.display.max_columns = None\n", "# display(HTML(\"\"))" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "CSV_PATH = os.path.join('data', 'hacknight_ticket_sample_data_2015.csv')\n", "df = pd.read_csv(CSV_PATH,low_memory=False, parse_dates=['issue_date', 'ticket_queue_date'])" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "CSV_PATH = os.path.join('data', 'hacknight_sample_data_geocode.csv')\n", "addrs_df = pd.read_csv(CSV_PATH)\n", "addrs_df['address'] = addrs_df['address'] + ', chicago, il'" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | ticket_number | \n", "issue_date | \n", "violation_location | \n", "license_plate_number | \n", "license_plate_state | \n", "license_plate_type | \n", "zipcode | \n", "violation_code | \n", "violation_description | \n", "unit | \n", "unit_description | \n", "vehicle_make | \n", "fine_level1_amount | \n", "fine_level2_amount | \n", "current_amount_due | \n", "total_payments | \n", "ticket_queue | \n", "ticket_queue_date | \n", "notice_level | \n", "hearing_disposition | \n", "notice_number | \n", "officer | \n", "address | \n", "lat | \n", "lng | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "9188814621 | \n", "2015-05-07 13:52:00 | \n", "2134 S ARCHER AV | \n", "7c189a16ef79db9413c1f46b7e5d1712e5c0c1575be352... | \n", "MI | \n", "PAS | \n", "48103 | \n", "0964190A | \n", "EXP. METER NON-CENTRAL BUSINESS DISTRICT | \n", "498 | \n", "DOF | \n", "BUIC | \n", "50 | \n", "100 | \n", "0.0 | \n", "50.0 | \n", "Paid | \n", "2015-05-13 | \n", "NaN | \n", "NaN | \n", "0 | \n", "798 | \n", "2100 s archer av, chicago, il | \n", "41.854262 | \n", "-87.631986 | \n", "
1 | \n", "9188417037 | \n", "2015-01-01 21:29:00 | \n", "2167 S ARCHER AV | \n", "ac7f6f4be49dfa223571838e586653aa5cdcb6bdfc6385... | \n", "IL | \n", "PAS | \n", "NaN | \n", "0964190A | \n", "EXP. METER NON-CENTRAL BUSINESS DISTRICT | \n", "502 | \n", "DOF | \n", "MITS | \n", "50 | \n", "100 | \n", "0.0 | \n", "50.0 | \n", "Paid | \n", "2015-01-05 | \n", "NaN | \n", "NaN | \n", "0 | \n", "1529 | \n", "2100 s archer av, chicago, il | \n", "41.854262 | \n", "-87.631986 | \n", "
2 | \n", "9188598734 | \n", "2015-03-26 13:14:00 | \n", "2140 S ARCHER AV | \n", "a493850f62c8ca5a25787271859f0409c289fb84130f33... | \n", "OH | \n", "PAS | \n", "45409 | \n", "0976160A | \n", "REAR AND FRONT PLATE REQUIRED | \n", "498 | \n", "DOF | \n", "PORS | \n", "60 | \n", "120 | \n", "146.4 | \n", "0.0 | \n", "Notice | \n", "2015-04-08 | \n", "SEIZ | \n", "NaN | \n", "5191566530 | \n", "780 | \n", "2100 s archer av, chicago, il | \n", "41.854262 | \n", "-87.631986 | \n", "
3 | \n", "9189154639 | \n", "2015-07-24 14:18:00 | \n", "2172 S ARCHER AV | \n", "38a1ef0c0a325c79e9dba69f6e96652fcbf1e9dcb5db3f... | \n", "IL | \n", "PAS | \n", "606161514 | \n", "0964190A | \n", "EXP. METER NON-CENTRAL BUSINESS DISTRICT | \n", "498 | \n", "DOF | \n", "MERZ | \n", "50 | \n", "100 | \n", "0.0 | \n", "0.0 | \n", "Dismissed | \n", "2015-09-14 | \n", "VIOL | \n", "Not Liable | \n", "5176435360 | \n", "796 | \n", "2100 s archer av, chicago, il | \n", "41.854262 | \n", "-87.631986 | \n", "
4 | \n", "9188041623 | \n", "2015-01-17 14:45:00 | \n", "2107 S ARCHER AV | \n", "e3c39cce6c30735cc977656a463233ea6f516328828e8d... | \n", "LA | \n", "PAS | \n", "70072 | \n", "0964190A | \n", "EXP. METER NON-CENTRAL BUSINESS DISTRICT | \n", "502 | \n", "DOF | \n", "HOND | \n", "50 | \n", "100 | \n", "122.0 | \n", "0.0 | \n", "Notice | \n", "2015-02-04 | \n", "SEIZ | \n", "NaN | \n", "5181845840 | \n", "1461 | \n", "2100 s archer av, chicago, il | \n", "41.854262 | \n", "-87.631986 | \n", "