Skip to content

Instantly share code, notes, and snippets.

@amandabee
Last active November 3, 2017 23:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amandabee/39a6db5da70f6c454a06d81d1759d0c2 to your computer and use it in GitHub Desktop.
Save amandabee/39a6db5da70f6c454a06d81d1759d0c2 to your computer and use it in GitHub Desktop.
YTD 311 Complaints

Step 1: Switch from "Maps" to "Datasets" and find the NEW DATASET button.

Step 2: The raw data that you want to import lives at https://gist.githubusercontent.com/amandabee/39a6db5da70f6c454a06d81d1759d0c2/raw/1a5475c0689e794a0c3c9620ebfc708c03ea2c1c/Subtotals_by_District.csv -- I found that by clicking the RAW button on the CSV (below)

Step 3: Rename your dataset to something civilized like "YTD Complaints" (actually, rename it exactly that. "YTD Complaints")

Step 4: You'll notice that there's a new, empty column called "The Geom" -- we need to fill that column. So find your way to https://amandabee.carto.com/viz/e2357457-bc5b-425a-9fec-a618743ce856/map and use the Create Map button to copy my shapefiles onto your account.

Step 5: When you're looking at the data view, on the lower right-hand side of the screen you should see a button that is labeled "merge datasets" -- select it. We're going to do a "Column Join". If you look at the original , it is a lot easier to see the district column. When you import it into Carto it will re-order all your columns, but you're looking for the district column. If you look at the data in the Oakland City Council Districts map, you'll notice that there is also a district column but it is empty. So which column should you actually use? (You want name)

Step 6: Choose the columns to merge. I'd leave all the complaints columns but kill most of the Council District columns. Just keep councilmem and dist.

Step 7: Use the Wizard to make a Choropleth map of "All Dumping" or "Dumping Subtotal" -- the most important switch to flip is the Quantification -- that should be set to Equal Interval.

  • Try a different basemap.
  • Add some hover content.

Questions:

  • Do we need to normalize this by the population?
  • What do we know about dumping, based on this map? What do we not know?
  • What would your next steps be if you wanted to write about this?

Last Step: You'll never regret a little housekeeping. Select Edit Metadata and fill in some of the metadata. What is this map? Where did you get the data? It's a good habit.

note: You won't be able to do much more than this with your stock free Carto account. But if you head over to https://education.github.com/pack you can get an expanded free account.

district Dumping Subtotal AC Transit Animal and Insect Control Board Up Bus Bench or Bus Shelter Issue Business - Green Business Business - Polystyrene Business - Recycling Technical Assistance Caltrans issue City Bldg - Alarms City Bldg - Appliance Issue City Bldg - Clean / Custodial City Bldg - Electrical Inside/Outside City Bldg - Elevators City Bldg - Emergency Generators City Bldg - Fence City Bldg - Heating, Ventilation, and Cooling City Bldg - Key / Lock Management City Bldg - Other/Complex City Bldg - Painting City Bldg - Pest City Bldg - Plumbing City Bldg - Sign City Bldg - Structural Issue City Parking Garage Issue CityBldg - Container Req (Cart/Bin from WMAC/CWS) CityBldg - Missed Compost Pickup CityBldg - Missed Garbage Pickup from WMAC Cityworks Config Request - SR Template - Change Cityworks Config Request - SR Template - New Cityworks Config Request - WO Template - New Code Enforcement Compost - Cart Replaced Incorrectly Compost - Cart Request Compost - Contamination Question/Concern Compost - Food Pail Request Compost - Missed Pickup Compost - Missed Pickup - Backyard Compost - Missed Pickup - Whole Block Compost - Pre-6am Residential Collection Compost - Repair/Replace Cart Compost - Xmas Tree Recycling Compost Service Issue Construction and Demolition Recycling Creeks - Questions Cut & Clean - Other/Complex EBMUD issue Electrical - Street Light (report from SeeClickFix Electrical Curb Box - Damaged/Missing Electrical Services - Other/Complex Engineering - Other/Complex Engineering Issues Fence - Repair or Install Along Street Fire - Blue Dots Graffiti - Advertising (posters, signs, etc.) Graffiti - Other/Complex Issue Graffiti (report from SeeClickFix) Graffiti in a Park Graffiti on a City Building (Library, Rec Center) Graffiti on Bus Bench (not part of a shelter) Graffiti on Bus Shelters Graffiti on OTHER Graffiti on Private Property Graffiti on Street Litter Container Graffiti on Street, Street Light, Traffic Signal, Graffiti on Traffic Paint Graffiti on Traffic Sign(s) Hazardous Materials Homeless Encampment Human Waste in Public-Right-of-Way Illegal Dumping - debris, appliances, etc. Illegal Dumping - mattress/boxspring Illegal Dumping - Vehicle Cleanout for OPD Illegal Dumping (Enforcement Potential) Illegal Dumping (report from SeeClickFix) Illegal Dumping ÔøΩ green waste Illegal Dumping/Litter - Other/Complex ALL DUMPING Inspections - Construction Obstructing ROW Inspections - Curb Ramps Inspections - Sewer Lateral Inspections - Utility Wire Inspections - Utility-Related Infrastructure Kudos and Compliments Litter - Green Bag Pickup Litter - In Public Right of Way Litter - Street Litter Container - Broken Litter - Street Litter Container - Cleaning Needed Litter - Street Litter Container - Overflowing/Mis Litter in Parks Manhole Cover - Missing Miscellaneous Mixing - Trash Mixed with Recycle or Compost Necklace of Lights Broken/Damaged Oakland Police - Abandoned Auto Oakland Police Department Other (report from SeeClickFix Other City Services (app/web request) Park - Ballfields Park - Fence Park - Landscape Maintenance Park - Lighting Park - Mowing Park - Other/Complex Park - Pathways, Hardscape and Paving Park - Pests Park - Plumbing Park - Sign Park - Tot Lots, Tables, Benches Park - Vandalism Park Maintenance (report from SeeClickFix) Parking - Enforcement Parking - Meter Maintenance Parking - Refund Parking Meter - Other/Complex Parks - Irrigation Parks - Tennis Court Maintenance Parks and Street Medians - Irrigation Pedestrian Signal - Broken/Damaged PG&E Port of Oakland Issue Pothole (report from SeeClickFix) Recycle - Abandoned Cart Recycle - Missed Batteries Recycling - Cart Replaced Incorrectly Recycling - Cart Request Recycling - Contamination Question/Concern Recycling - Events Recycling - Missed Pickup Recycling - Missed Pickup - Backyard Recycling - Missed Pickup - Whole Block Recycling - Oil Kit Missed Recycling - Oil Kit Not Replaced Recycling - Oil Kit Request Recycling - Pre-6am Residential Recycling Collecti Recycling - Repair/Replace Cart Recycling Hotline - Misc - Property Damage Recycling Hotline - Miscellaneous Recycling Hotline - Pub Ed Materials Recycling Service Issue (Residential) Recycling Service Issues Recycling/Trash/Compost ÔøΩ Billing Question/Concern Right of Way - Other/Complex Sewers - Bad Odor Sewers - Blockage Sewers - Easement Sewers - General Sewers - Other/Complex Sewers (report from SeeClickFix Shrine Removal With OPD Sidewalk - Damage Sidewalk (report from SeeClickFix) Spillage - Trash, Recycle, Compost Spillage Storm Drains - Clogged (Flooding) Storm Drains - Clogged (Not Flooding) Storm Drains - Erosion Control Storm Drains - Illicit Discharge Storm Drains - Other/Complex Storm Drains - Private Property Storm Drains (report from SeeClickFix Storm Inlet Grate - Damaged/Missing Street Cleaning Street Cleaning - Complaints Street Cleaning - Schedule Street Issue (report from SeeClickFix) Street Light - Fixture Hanging By Wires Street Light - LED Installation Issue Street Light - Outage/Damaged Street Light - Pole Down Street Light - Pole Leaning Street Light - Request for New/Upgrade Street Median - Irrigation Street Medians (Landscaped) Streets - Berm Repair or Install Streets - Guardrail Repair Streets - Mudslides / Landslides Streets - Mudslides/Landslides Streets - Potholes/Depression Streets - Speed Bump Repair Streets - Street Deterioration Streets/Sidewalks - Cross-Culvert Repair Streets/Sidewalks - Curb & Gutter Repair Streets/Sidewalks - Other/Complex Streets/Sidewalks - Pathway Repair Streets/Sidewalks - Pooling Water TE - Parking - Blue Curb (Non-Residential) TE - Parking - Blue Curb (Residential) TE - Parking - Residential Permit TE - Parking (On Street) TE - Traffic - Emergency Response TE - Traffic - Research / Data Requests TE - Traffic Control Plan Review TE - Traffic Safety (non-emergency) TE - Traffic Signal Request (non-emergency) test template Traffic - Other/Complex Traffic - Repair Pavement Striping Traffic - Sign - New Neighborhood Watch Sign Traffic - Sign (report from SeeClickFix Traffic - Sign Damage Traffic - Sign Down Traffic - Sign Missing Traffic - Signals - Timing Change Request NON EMER Traffic Engineering - Other/Complex Traffic Signal - Knocked Down Traffic Signal - Outage/Damaged Traffic Signal - Pole Leaning/Damaged Traffic Signal - Turned in Wrong Direction Traffic Signal (report from SeeClickFix Trash - Bulky Missed Pickup Trash - Cart Repair/Replace Trash - Cart Replaced Incorrectly Trash - Cart Request/New Service Trash - Exemption Trash - Missed Pickup Trash - Missed Pickup - Backyard Trash - Missed Pickup - Whole Block Trash - Pre-6am Residential Collection Trash - Schedule Bulky Pickup Trash - Self Haul Trash Service Issue Trash/Compost - Abandoned Container Tree - Broken/Hanging Limb Tree - Diseased, Dead, Dying, Leaning, or Split Tree - Down Tree - Illegal Tree Removal Tree - Limb Down Tree - Other/Complex Tree - Permit Tree - Permit - Waiver Tree - Pruning Tree - Request for Removal Tree - Restake Tree - Stump Removal Trees (report from SeeClickFix Union Pacific issue Vector Control issue Volunteering - Interest in Volunteering Watershed - Illegal Dumping in a Creek Watershed - Other/Complex Watershed - Overflow from a Creek Watershed - Vegetation Management in a Creek Weed Abatement - Public Right of Way Total Complaints
CCD1 2007 7 27 8 11 4 6 59 21 16 40 64 7 8 19 40 3 1 11 70 1 111 2 334 2 5 7 15 1 11 13 9 9 2 1 18 31 6 35 4 7 2 107 39 7 3 18 7 29 219 20 50 43 171 39 1370 298 5 42 252 32 8 2007 64 7 16 9 71 2 10 1 45 3 44 84 21 62 111 45 2 4 7 25 6 11 1 2 14 3 13 20 12 198 24 1 16 2 11 22 3 194 28 2 6 1 20 4 1 1 12 2 6 1 23 6 13 4 37 4 6 86 2 22 2 4 101 40 1 36 50 6 7 1 7 7 24 45 12 44 1 107 4 2 23 1 4 27 18 724 56 7 20 10 2 4 1 21 11 76 2 2 129 41 3 46 5 49 47 53 6 2 1 97 1 23 4 6 5 8 19 7 2 4 6 7 21 24 46 128 81 8 125 5 11 128 9 8 9 12 1 35 8012
CCD2 2940 11 44 7 14 8 5 53 4 14 47 89 1 1 18 51 8 10 58 3 121 14 1 558 4 4 2 10 6 3 4 6 64 37 2 1 36 1 100 5 60 72 54 3 66 20 7 579 13 174 41 125 38 2055 553 2 81 198 32 19 2940 19 5 9 15 126 4 26 1 44 5 91 135 8 66 1 4 59 42 5 1 4 34 9 10 3 2 23 9 18 60 6 260 54 3 20 6 11 22 5 3 188 15 1 2 2 1 9 2 1 1 4 6 3 13 3 12 2 20 5 5 98 9 2 1 3 82 33 5 36 34 10 6 3 34 25 10 26 119 4 3 4 5 1 1 1 600 1 47 5 21 5 1 12 6 11 1 47 1 1 3 82 36 1 45 4 101 36 39 2 58 1 2 13 5 5 1 5 13 10 5 5 4 1 15 30 22 56 36 8 59 3 11 80 10 2 7 2 9 48 9329
CCD3 5395 7 52 6 13 6 13 115 24 42 235 379 17 17 71 234 10 45 32 211 11 550 4 13 1 587 5 2 4 15 2 5 1 6 3 1 35 49 4 1 26 7 8 86 248 67 1 2 27 21 15 229 13 59 102 439 223 3714 815 11 97 684 55 19 5395 94 12 15 10 100 66 67 5 67 310 15 220 6 246 1 152 7 5 14 46 30 26 2 30 47 10 30 42 28 409 80 9 17 4 21 39 4 14 142 79 8 4 1 11 2 3 11 1 17 1 18 4 19 6 28 13 4 76 2 9 1 3 2 93 125 1 47 68 6 9 17 13 41 51 12 42 1 73 5 1 1 3 20 566 1 26 33 3 1 3 5 12 6 60 2 87 37 1 1 61 6 46 50 50 2 2 13 136 1 34 9 2 4 13 8 1 2 1 3 1 18 99 30 63 44 8 48 3 7 79 8 2 4 11 17 32 1 37 14990
CCD4 2108 2 32 7 5 3 2 107 3 19 55 62 7 13 18 35 3 4 8 99 6 152 4 2 2 223 1 5 1 25 6 8 7 6 3 3 20 15 2 2 35 1 1 8 22 41 10 4 6 1 53 16 24 13 14 1495 318 52 204 37 2 2108 43 2 12 19 58 1 89 43 4 110 157 8 41 125 2 27 5 4 19 38 7 9 6 7 1 27 8 26 1 42 5 36 9 8 4 14 11 2 250 2 1 1 10 4 3 2 11 1 11 2 6 4 27 9 22 154 2 11 3 7 65 18 76 104 2 4 30 1 7 5 24 19 9 39 2 89 4 8 1 13 5 7 41 34 712 1 90 3 18 14 3 10 1 10 1 23 1 92 18 1 29 6 28 46 20 3 1 1 54 1 12 3 7 4 3 6 9 2 3 12 7 66 165 203 6 97 6 2 27 104 11 2 5 25 9 3 1 2 50 7553
CCD5 3445 8 29 7 6 8 62 4 8 21 34 6 11 24 1 6 8 38 3 80 348 1 1 4 6 2 2 2 1 3 1 9 10 3 1 20 1 2 73 44 5 10 27 7 68 2 31 62 131 31 2469 600 16 85 233 29 13 3445 32 3 17 27 53 55 1 21 5 79 185 11 29 208 4 26 9 2 3 28 9 14 1 7 1 6 3 17 25 17 42 5 9 7 6 5 179 20 1 1 3 1 4 2 7 3 11 3 11 2 27 1 8 88 9 3 8 73 14 1 32 35 6 2 3 4 19 42 9 29 56 2 5 1 13 1 6 1 1 553 2 28 4 11 4 1 1 21 2 45 1 61 21 1 34 38 49 49 7 2 3 77 1 4 15 1 1 2 1 15 12 2 1 1 5 37 16 64 37 2 48 2 1 65 5 2 5 12 27 6 3 2 5 36 7887
CCD6 3678 38 12 1 1 40 7 16 20 68 1 1 7 12 56 4 2 10 49 2 99 10 240 1 3 2 3 4 2 2 4 1 3 13 11 12 2 1 9 19 16 11 26 2 57 19 28 2635 598 5 101 277 50 12 3678 15 6 21 36 8 35 7 6 45 109 5 45 245 2 24 1 3 8 26 6 9 1 2 7 19 1 13 1 4 6 5 5 5 1 70 23 3 2 1 10 1 3 2 1 11 3 8 2 11 4 20 5 10 109 6 3 1 12 73 18 41 35 2 8 4 5 24 45 6 17 1 1 44 5 1 5 1 16 3 1 1 344 2 20 9 2 4 4 45 1 32 54 8 1 21 1 33 61 48 2 1 1 46 1 2 2 4 3 4 1 10 28 27 79 79 3 79 4 7 96 8 1 3 14 1 11 2 2 1 34 7281
CCD7 5633 5 88 7 9 3 50 15 38 30 101 4 1 10 48 42 8 7 38 99 2 136 3 1 24 2 1 422 1 4 3 2 2 1 3 1 25 2 4 1 14 1 1 3 3 14 17 14 1 3 6 2 47 1 7 124 102 57 3941 772 21 95 738 49 17 5633 12 3 9 14 40 4 103 1 11 3 44 81 11 75 431 1 32 5 1 12 17 3 9 2 1 11 4 6 7 13 1 8 3 2 4 4 3 69 35 1 5 8 1 3 3 4 14 1 21 2 20 6 12 90 7 2 5 55 15 1 38 46 1 2 16 5 1 37 40 9 14 1 60 2 1 6 2 22 3 5 3 4 426 1 41 14 2 1 1 3 46 3 39 2 1 56 9 1 30 2 24 60 50 6 3 90 2 2 4 2 12 2 6 5 1 1 8 71 20 41 83 1 96 1 5 86 5 4 15 26 17 1 2 1 66 10479
Unknown 1038 1 1 1 10 43 3 3 3 12 14 7 5 12 1 8 5 17 2 13 2 9 3 1 4 1 3 2 14 15 4 5 1 7 2 9 245 6 1 19 6 2 1 8 8 2 18 2 2 2 1 478 38 1 6 506 7 2 1038 1 2 6 1 8 10 13 2 1 59 2 23 4 4 2 23 1 1 7 2 2 2 20 1 8 9 180 14 2 2 12 28 14 3 4 1 15 3 8 1 324 13 8 57 1 12 21 2 2 13 4 3 1 16 1 17 82 1 3 2 1 3 4 2 473 3 49 1 16 6 1 8 30 39 14 4 1 2 1 8 5 1 12 1 3 3 2 18 13 8 1 5 35 3 22 7 1 26 5 7 1 30 1 1 4 15 3584
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment