Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ucpd budget arrests #123

Open
wants to merge 83 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
bd73dc8
ucpd datasets -- budget
laurelrwoods Nov 22, 2020
92d5119
stacked bar chart for ucla pd budget expenses
laurelrwoods Nov 23, 2020
4f693ce
ucpd datasets -- budget
laurelrwoods Nov 22, 2020
7ec6e1c
stacked bar chart for ucla pd budget expenses
laurelrwoods Nov 23, 2020
67e3c61
Merge branch 'master' of https://github.com/dailybruin/the-stack into…
samxlow Nov 25, 2020
288b24d
Merge branch 'ucpd-budget-arrests' of https://github.com/dailybruin/t…
laurelrwoods Sep 29, 2021
4997240
Merge branch 'master' into ucpd-budget-arrests
laurelrwoods Sep 29, 2021
e05c610
merge fixes
laurelrwoods Sep 29, 2021
5a536a8
change date
laurelrwoods Sep 29, 2021
0c7a3d8
bail chart
vivianluk Oct 19, 2021
c7d2bf0
bail viz
vivianluk Oct 19, 2021
6ea9c36
demographics chart stuff
Oct 19, 2021
6927001
adding chart stuff to post
Oct 19, 2021
025a8a5
accepting changes on post so i can merge
Oct 19, 2021
879a35a
moving file into correct folder
Oct 19, 2021
80bad48
adding script for piechart
Oct 19, 2021
f793a95
minor changes to charts
Oct 19, 2021
a1673e4
fixed pie charts
Lindseyp314 Oct 19, 2021
bf62c98
added barchart
Oct 26, 2021
4dbbd84
add gender barchart
Oct 26, 2021
716ab0a
add barcharts to post
Oct 26, 2021
b60283e
added barchart script
Oct 26, 2021
e5f8282
made some changes to the scrolly telling component
Lindseyp314 Oct 26, 2021
52a4a0a
updated scrolly telling and merged into branch
Lindseyp314 Oct 26, 2021
afb65ce
scrolly-telling updates
Lindseyp314 Oct 29, 2021
b455ee3
Made it so that demographics charts show on page
Lindseyp314 Nov 2, 2021
ddd507f
added age chart
Nov 2, 2021
c1bae7c
ahhhhh
Nov 2, 2021
c6c50e0
Added scrolly telling feature to the markdown.
Lindseyp314 Nov 8, 2021
8bbaa02
started chart for demographic breakdown of charges
Lindseyp314 Nov 9, 2021
87307e7
adding bail violin chart
mattiesansev Nov 9, 2021
69fde18
working on outliars dropdown
mattiesansev Nov 9, 2021
26ff5c4
outliars working
mattiesansev Nov 9, 2021
13a008b
Update bail_charges_without_outliars.csv
mattiesansev Nov 9, 2021
98491c1
outliars dropdown works
mattiesansev Nov 9, 2021
3679649
Merge branch 'ucpd-budget-arrests' of https://github.com/dailybruin/t…
mattiesansev Nov 9, 2021
96d9cdb
barcharts
Nov 9, 2021
f677a22
changes
Nov 9, 2021
240aec3
markdown file
Nov 9, 2021
6bf48da
Made updates to the scrolly telling.
Lindseyp314 Nov 10, 2021
61187cd
Merge branch 'ucpd-budget-arrests' of https://github.com/dailybruin/t…
Lindseyp314 Nov 10, 2021
6f58468
Worked on adding a second axis to budget/arrest/stop chart
Lindseyp314 Nov 11, 2021
7840867
Made category by demographic chart and fixed sizing on scrolly telling
Lindseyp314 Nov 11, 2021
f1f9cf1
updated all charts to d3 v5
Lindseyp314 Nov 11, 2021
898babc
made some modifications for mobile, added captions for charts in scro…
Lindseyp314 Nov 12, 2021
c9fd853
Working on mobile for scroly telling
Lindseyp314 Nov 12, 2021
fa6586f
worked on formatting and colors for charts
Lindseyp314 Nov 13, 2021
5a4761d
changes to post
Nov 18, 2021
5604f51
post changes
Nov 18, 2021
9fedcd2
made changes to gridlines and size
Nov 18, 2021
81e2ff8
changing size of demographic charts
Nov 18, 2021
6611e33
legend on side
samxlow Nov 19, 2021
b2cf87d
mobile changes
Lindseyp314 Nov 19, 2021
4531baf
fixed merge conflicts
Lindseyp314 Nov 19, 2021
2fd7fa5
Mostly debugged mobile version of scrolly telling
Lindseyp314 Nov 19, 2021
d6be93c
fixed some bugs from mobile adjustments
Lindseyp314 Nov 19, 2021
8cd408f
stuff
Nov 22, 2021
ce02328
changes
Nov 22, 2021
d438b45
writing
Nov 22, 2021
59e9627
added more writing
Nov 22, 2021
3703d94
minor writing edits
Nov 22, 2021
8222784
css progress
samxlow Nov 22, 2021
e1b211b
more css commit
samxlow Nov 22, 2021
21104d3
css for age,race, gender mobile
samxlow Nov 22, 2021
ff50250
made updates to the mobile legend for scrolly telling barchart
Lindseyp314 Jan 4, 2022
c9c8818
Fixing merge conflicts
Lindseyp314 Jan 4, 2022
665b87c
making barcharts smaller
Jan 14, 2022
3566d09
one style and also dropdown
mattiesansev Jan 15, 2022
9dadca6
in progress mobile work
Lindseyp314 Jan 15, 2022
2536735
Accepted merges
Lindseyp314 Jan 15, 2022
12b68ed
fix violin plots, turn off debug mode
laurelrwoods Jan 17, 2022
55d942e
ucpd article teaser + introduction + format
vivianluk Jan 17, 2022
5ddcb14
Updated text in scrolly telling element and shifted steps to match ne…
Lindseyp314 Jan 19, 2022
8a0e7eb
fixed the transitions on mobile
Lindseyp314 Jan 19, 2022
484d2f1
Update bail_charges_without_outliars.csv
mattiesansev Jan 21, 2022
b9eda4b
Update bail_charges_with_outliars.csv
mattiesansev Jan 21, 2022
76c4567
style changes for violin
mattiesansev Jan 21, 2022
57f6ef7
merge conflicts
mattiesansev Jan 21, 2022
b580f57
got rid of weird zoom
mattiesansev Jan 21, 2022
4ee98f8
initial should include outliers i think
mattiesansev Jan 21, 2022
69d598d
trying to fix function error
mattiesansev Jan 21, 2022
d5f154d
bump ruby version
laurelrwoods Jan 21, 2022
c96d523
fix violin plot d3 issues
laurelrwoods Jan 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
adding bail violin chart
mattiesansev committed Nov 9, 2021
commit 87307e7c0aab55507129dfa2867d2fcf29c96293
9 changes: 7 additions & 2 deletions _posts/2021-9-28-ucpd-budget-arrests.md
Original file line number Diff line number Diff line change
@@ -11,9 +11,11 @@ og_image:
stylesheets:
- /js/posts/ucpd-budget-arrests/scrolly_test.css
scripts:
- //d3js.org/d3.v5.min.js
- //cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js
- //cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.min.js
- //cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.js
- //cdn.jsdelivr.net/npm/chart.js@2.8.0
- //cdn.plot.ly/plotly-2.4.2.min.js
- /js/posts/ucpd-budget-arrests/stacked-barchart.js
- //cdn.anychart.com/releases/8.0.1/js/anychart-core.min.js
- //cdn.anychart.com/releases/8.0.1/js/anychart-pie.min.js
@@ -26,6 +28,7 @@ scripts:
- //code.jquery.com/jquery-3.6.0.min.js
- /js/posts/ucpd-budget-arrests/scrolly_charts.js
- /js/posts/ucpd-budget-arrests/demographic_charges.js
- /js/posts/ucpd-budget-arrests/bail-violin.js
---

<div id="barchart-wrapper">
@@ -89,4 +92,6 @@ scripts:
<canvas id='bail-chart-ucpd'> </canvas>
</div>

More text blah blah blah
<p>More text blah blah blah</p>

<div id='myDiv'></div>
1,277 changes: 1,277 additions & 0 deletions datasets/ucpd-budget-arrests/ChargesBail.csv

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions js/posts/ucpd-budget-arrests/bail-violin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
d3.csv("https://raw.githubusercontent.com/dailybruin/the-stack/mattie/ucpdBail/datasets/ucpd/ChargesBail.csv", function( rows){
console.log("hi");
console.log(rows['Bail']);
function unpack(rows, key) {
console.log(rows);
return rows.map(function(row) { return row[key]; });
}

var data = [{
type: 'violin',
x: unpack(rows, 'Charges'),
y: unpack(rows, 'Bail'),
points: 'none',
box: {
visible: true
},
boxpoints: false,
line: {
color: 'black'
},
fillcolor: '#8dd3c7',
opacity: 0.6,
meanline: {
visible: true
},
x0: "Total Bill"
}]

var layout = {
title: "",
yaxis: {
zeroline: false
}
}

Plotly.newPlot('myDiv', data, layout);
});