Comments (6)
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.
@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.
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.
Accidently pushed this to main. @sowdm can you make sure this works for you?
from openpolicedata.
@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.
We will see if this is an issue for users
from openpolicedata.
Related Issues (20)
- Add code to ignore Pyarrow warning in pandas HOT 1
- Remove pandas<3.0 in requirements.txt file and pyproject.toml
- Add ability to deprecate OPD source table
- Add troubleshooting page to documentation HOT 1
- Convert CSV data types to CKAN data loader for some datasets
- Fix FutureWarning for pd.to_datetime for mixed time zones
- Add Milwaukee stop and search data HOT 1
- Add rest of Stanford datasets to source table HOT 1
- Add citations suggestion to documentation
- Change TableType X - Y to be table type X with subtype Y
- Add mention that data is provided without change to docs
- Create email list for new datasets
- Add documentation for url_contains input for Source class methods
- Add documentation for year input for Source methods
- Check that only dates are currently modified when running Source.load HOT 2
- Add input to Source methods to allow loading of data without formatting dates
- Failing to Install Dependency Packages HOT 3
- Year column in source table should be an earlier (closer to the left) column to make it more visible
- Clean up standardization code
- Test and update code for numpy v2.0 release. Remove version constraint in pyproject.toml.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openpolicedata.