Giter Club home page Giter Club logo

Comments (6)

potto216 avatar potto216 commented on June 15, 2024

Working on building out the example notebook with Denver data. Working on a plot similar to the heat map example @sowdm sent me.

from openpolicedata.

sowdm avatar sowdm commented on June 15, 2024

@potto216 If you merge with main, I just removed "Police Department" from all the source names to make it easier i.e.

opd.Source("Denver Police Department") should be changed to opd.Source("Denver")

from openpolicedata.

sowdm avatar sowdm commented on June 15, 2024

@potto216

From this medium article, there is code to make this heat map with the function get_heat_map defined here:
https://github.com/Mjrovai/Python4DS/blob/master/Streets_Santiago/notebooks/10_Streets_of_Santiago.ipynb

def plot_heat_map(data, label, context):
    g = sns.FacetGrid(data=data, 
                      size=6, 
                      dropna=False
                     );

    g.map_dataframe(plot_point_distribution, 
                    shade=True, 
                    alpha=0.7, 
                    cbar=True, 
                    cmap='magma_r', 
                    cbar_kws={'orientation': 'horizontal',
                              'label': label,
                              'fraction': 0.02,
                              'shrink': 0.35,
                              'pad': 0}
                   );

from openpolicedata.

potto216 avatar potto216 commented on June 15, 2024

Accidently pushed this to main. @sowdm can you make sure this works for you?

from openpolicedata.

sowdm avatar sowdm commented on June 15, 2024

@potto216 I updated a couple small things to make it clearer but otherwise, it looks good.

I got an error on Windows when trying to load in the shape file. Apparently, geopandas uses the fiona package to do this and fiona requires a DLL that didn't install when fiona was installed. I added some instructions for how to get it installed.

Should we close this?

from openpolicedata.

potto216 avatar potto216 commented on June 15, 2024

We will see if this is an issue for users

from openpolicedata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.