Skip to content

Commit

Permalink
Merge branch 'develop' into fix-traffic-stops-pie-chart-overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Afani97 authored Oct 4, 2023
2 parents b48a50e + 854c730 commit 9812b29
Show file tree
Hide file tree
Showing 18 changed files with 26,129 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,6 @@ deploy/roles
docker-compose.override.yml
htmlcov
nc/notebooks/**/**.html
nc/notebooks/2023-07-raleigh-contraband/input/Contraband.txt
nc/notebooks/2023-07-raleigh-contraband/input/Contraband.txt.zip
acs*.json
9 changes: 4 additions & 5 deletions docs/dev-setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ To use ``psql`` locally, make sure you have the following env variables loaded

export DJANGO_SETTINGS_MODULE=traffic_stops.settings.local
export PGHOST=127.0.0.1
export PGPORT=54344
export PGPORT=9051
export PGUSER=postgres
export PGDATABASE=traffic_stops
export DATABASE_URL=postgres://127.0.0.1:54344/traffic_stops
export DATABASE_URL_NC=postgres://127.0.0.1:54344/traffic_stops_nc
export PGDATABASE=traffic_stops_nc
export DATABASE_URL=postgres://127.0.0.1:${PGPORT}/traffic_stops
export DATABASE_URL_NC=postgres://127.0.0.1:${PGPORT}/traffic_stops_nc

To setup your local environment you should create a virtualenv and install the
necessary requirements::
Expand All @@ -107,7 +107,6 @@ Migrate the project databases::

(traffic-stops)$ ./migrate_all_dbs.sh


Frontend setup::

(traffic-stops)$ cd frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,15 @@ export const ChartTitle = styled(H2)`
export const ButtonsWrapper = styled.div`
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
gap: 10px;
gap: 30px;
@media (${phoneOnly}) {
width: 90%;
margin: 0 auto;
flex-direction: column;
gap: 0;
& button {
margin: 0.5em 0;
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/Components/Charts/ChartSections/ShareList.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react';
import * as S from './ShareList.styled';

// Deps
import TwitterLogo from '../../../img/twitter_logo_blue.png';
import FacebookLogo from '../../../img/f_logo_RGB-Blue_58.png';
import TwitterLogo from '../../../img/x-logo-black.png';
import FacebookLogo from '../../../img/meta_logo_primary.svg';

function ShareList({ shareUrl, twitterTitle, onPressHandler }) {
return (
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/Components/Charts/ChartSections/ShareList.styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ export const ShareList = styled.div`
flex-direction: row;
align-items: center;
margin-right: 1.5em;
gap: 15px;
@media (${phoneOnly}) {
margin: 0;
justify-content: center;
margin-top: 1.5em;
}
`;

export const ShareItem = styled.a`
margin: 0 1.5em;
margin: 0;
`;

export const FBLogo = styled.img`
height: 32px;
width: 32px;
height: 75px;
width: 150px;
`;

export const TWLogo = styled.img`
height: 32px;
width: 32px;
height: 25px;
width: 25px;
`;
Binary file removed frontend/src/img/f_logo_RGB-Blue_58.png
Binary file not shown.
1 change: 1 addition & 0 deletions frontend/src/img/meta_logo_primary.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed frontend/src/img/twitter_logo_blue.png
Binary file not shown.
Binary file added frontend/src/img/x-logo-black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
10.0
14
1 SQLCHAR 0 12 "" 1 ContrabandID ""
2 SQLCHAR 0 12 "" 2 SearchID ""
3 SQLCHAR 0 12 "" 3 PersonID ""
4 SQLCHAR 0 12 "" 4 StopID ""
5 SQLCHAR 0 41 "" 5 Ounces ""
6 SQLCHAR 0 41 "" 6 Pounds ""
7 SQLCHAR 0 41 "" 7 Pints ""
8 SQLCHAR 0 41 "" 8 Gallons ""
9 SQLCHAR 0 41 "" 9 Dosages ""
10 SQLCHAR 0 41 "" 10 Grams ""
11 SQLCHAR 0 41 "" 11 Kilos ""
12 SQLCHAR 0 41 "" 12 Money ""
13 SQLCHAR 0 41 "" 13 Weapons ""
14 SQLCHAR 0 41 "\r\n" 14 DollarAmt ""
13 changes: 13 additions & 0 deletions nc/notebooks/2023-07-raleigh-contraband/input/SEARCH_format.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
10.0
11
1 SQLCHAR 0 12 "" 1 SearchID ""
2 SQLCHAR 0 12 "" 2 StopID ""
3 SQLCHAR 0 12 "" 3 PersonID ""
4 SQLCHAR 0 5 "" 4 Type ""
5 SQLCHAR 0 3 "" 5 VehicleSearch ""
6 SQLCHAR 0 3 "" 6 DriverSearch ""
7 SQLCHAR 0 3 "" 7 PassengerSearch ""
8 SQLCHAR 0 3 "" 8 PropertySearch ""
9 SQLCHAR 0 3 "" 9 VehicleSeized ""
10 SQLCHAR 0 3 "" 10 PersonalPropertySeized ""
11 SQLCHAR 0 3 "\r\n" 11 OtherPropertySeized ""
17 changes: 17 additions & 0 deletions nc/notebooks/2023-07-raleigh-contraband/input/STOP_format.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
10.0
15
1 SQLCHAR 0 12 "" 1 StopID ""
2 SQLCHAR 0 100 "" 2 AgencyDescription SQL_Latin1_General_CP1_CI_AS
3 SQLCHAR 0 24 "" 3 StopDate ""
4 SQLCHAR 0 5 "" 4 Purpose ""
5 SQLCHAR 0 5 "" 5 Action ""
6 SQLCHAR 0 3 "" 6 DriverArrest ""
7 SQLCHAR 0 3 "" 7 PassengerArrest ""
8 SQLCHAR 0 3 "" 8 EncounterForce ""
9 SQLCHAR 0 3 "" 9 EngageForce ""
10 SQLCHAR 0 3 "" 10 OfficerInjury ""
11 SQLCHAR 0 3 "" 11 DriverInjury ""
12 SQLCHAR 0 3 "" 12 PassengerInjury ""
13 SQLCHAR 0 10 "" 13 OfficerId SQL_Latin1_General_CP1_CI_AS
14 SQLCHAR 0 15 "" 14 StopLocation SQL_Latin1_General_CP1_CI_AS
15 SQLCHAR 0 20 "\r\n" 15 StopCity SQL_Latin1_General_CP1_CI_AS
2,767 changes: 2,767 additions & 0 deletions nc/notebooks/2023-07-raleigh-contraband/raleigh-contraband-graph-2022.ipynb

Large diffs are not rendered by default.

4,895 changes: 4,895 additions & 0 deletions nc/notebooks/2023-09-durham-contraband/durham-contraband-graph-2020.ipynb

Large diffs are not rendered by default.

4,944 changes: 4,944 additions & 0 deletions nc/notebooks/2023-09-durham-contraband/durham-contraband-graph-2021.ipynb

Large diffs are not rendered by default.

4,895 changes: 4,895 additions & 0 deletions nc/notebooks/2023-09-durham-contraband/durham-contraband-graph-2022.ipynb

Large diffs are not rendered by default.

3,620 changes: 3,620 additions & 0 deletions nc/notebooks/2023-09-durham-contraband/durham-contraband-graph-over-time.ipynb

Large diffs are not rendered by default.

4,943 changes: 4,943 additions & 0 deletions nc/notebooks/2023-09-durham-contraband/durham-contraband-graph.ipynb

Large diffs are not rendered by default.

0 comments on commit 9812b29

Please sign in to comment.