Skip to content

Commit

Permalink
Remove unused data model features related to unbuild "portal" feature (
Browse files Browse the repository at this point in the history
  • Loading branch information
macfarlandian committed Apr 1, 2021
1 parent 41afe34 commit 54420d0
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 446 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,23 @@ const content: TenantContent = {
name: "Test Tenant",
description: "test tenant description",
coBrandingCopy: "test tenant co-branding",
collections: {},
metrics: {
SentencePopulationCurrent: {
name: "test SentencePopulationCurrent name",
description: "test sentence population current description",
methodology: "test sentence population current methodology",
totalLabel: "test sentence population label",
},
SentenceTypesCurrent: {
name: "test SentenceTypesCurrent name",
description: "test SentenceTypesCurrent description",
methodology: "test SentenceTypesCurrent methodology",
},
ParolePopulationCurrent: {
name: "test ParolePopulationCurrent name",
description: "test ParolePopulationCurrent description",
methodology: "test ParolePopulationCurrent methodology",
totalLabel: "test parole population label",
},
ParolePopulationHistorical: {
name: "test ParolePopulationHistorical name",
description: "test ParolePopulationHistorical description",
methodology: "test ParolePopulationHistorical methodology",
},
},
Expand Down
37 changes: 0 additions & 37 deletions spotlight-client/src/contentApi/sources/us_nd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,35 +86,15 @@ const content: TenantContent = {
'<a href="https://www.docr.nd.gov">The North Dakota Department of Corrections and Rehabilitation (DOCR)</a> provides correctional services for the state of North Dakota. Our mission is to transform lives, influence change, and strengthen community. Transparency is a critical element of our mission; sharing information builds greater accountability between the DOCR and the communities we serve.',
coBrandingCopy:
'Produced in collaboration with <a href="https://www.docr.nd.gov">the North Dakota Department of Corrections and Rehabilitation</a>.',
collections: {
Sentencing: {
name: "Sentencing",
description: "description TK",
},
Prison: {
name: "Prison",
description: "description TK",
},
Probation: {
name: "Probation",
description: "description TK",
},
Parole: {
name: "Parole",
description: "description TK",
},
},
metrics: {
SentencePopulationCurrent: {
name: "Sentenced Population",
description: "description TK",
methodology: `This data includes all individuals that are currently incarcerated, on parole, or on probation
in North Dakota. ${demographicsBoilerplate} ${sentencingBoilerplate}`,
totalLabel: "Total people sentenced",
},
SentenceTypesCurrent: {
name: "Sentence Types",
description: "description TK",
methodology: `Incarceration includes any sentence that begins with a period of incarceration in a ND DOCR facility.
Probation includes any sentence that begins with a period of probation under the supervision of a
ND DOCR probation officer. <p>Of note, individuals’ current status (incarcerated or on supervision)
Expand All @@ -127,7 +107,6 @@ const content: TenantContent = {
},
PrisonPopulationCurrent: {
name: "Current Prison Population",
description: "description TK",
methodology: `This data includes all individuals that are currently incarcerated in a ND DOCR facility.
It does not include individuals incarcerated in county jails nor individuals currently
serving their prison sentence in the community through the Community Placement Program.
Expand All @@ -136,23 +115,20 @@ const content: TenantContent = {
},
PrisonPopulationHistorical: {
name: "Historical Prison Population",
description: "description TK",
methodology: `This data includes the number of people that were incarcerated in a ND DOCR facility on the
first day of each month over the last 20 years. It does not include individuals incarcerated
in county jails nor individuals serving their prison sentence in the community through the
Community Placement Program. ${demographicsBoilerplate} ${prisonBoilerplate}`,
},
PrisonAdmissionReasonsCurrent: {
name: "Reason for Incarceration",
description: "description TK",
methodology: `This data includes the original reason for admission for all individuals currently incarcerated
in a ND DOCR facility. When an individual is admitted to a state prison, the reason for the admission
is documented by prison officials. These categories are pulled from that documentation.
${demographicsBoilerplate} ${prisonBoilerplate}`,
},
PrisonStayLengthAggregate: {
name: "Length of Prison Stay",
description: "description TK",
methodology: `This data reports how long (in years) individuals spent in prison prior to their
first official release for a specific sentence. It includes individuals released
in the past 3 years who, prior to release, were serving a new sentence of
Expand All @@ -166,7 +142,6 @@ const content: TenantContent = {
},
PrisonReleaseTypeAggregate: {
name: "Placement After Prison",
description: "description TK",
methodology: `This data includes all individuals released in the last 3 years, including releases
directly from the Community Placement Program. When an individual is released from a
state prison, the reason for the release is documented by prison officials. These
Expand All @@ -176,7 +151,6 @@ const content: TenantContent = {
},
PrisonRecidivismRateHistorical: {
name: "Cumulative Recidivism Rates",
description: "description TK",
methodology: `This data reports reincarceration recidivism rates, which is the proportion of individuals
released from a ND DOCR facility that return to a ND DOCR facility at some point in the
future. The releases are grouped by the calendar year in which the release occurred, and
Expand All @@ -189,28 +163,24 @@ const content: TenantContent = {
},
PrisonRecidivismRateSingleFollowupHistorical: {
name: "Recidivism Rates Over Time",
description: "description TK",
methodology: `This data reports the reincarceration recidivism rate for a set number of years
since the release, for the 10 most recent release cohorts. ${demographicsBoilerplate}
${prisonBoilerplate}`,
},
ProbationPopulationCurrent: {
name: "Current Probation Population",
description: "description TK",
methodology: `This data includes people currently on probation in North Dakota.
${demographicsBoilerplate} ${probationBoilerplate} ${probationDistrictBoilerplate}`,
totalLabel: "Total people on probation",
},
ProbationPopulationHistorical: {
name: "Historical Probation Population",
description: "description TK",
methodology: `This data includes the number of people that were on probation in
North Dakota on the first day of each month over the last 20 years.
${demographicsBoilerplate} ${probationBoilerplate}`,
},
ProbationSuccessHistorical: {
name: "Historical Probation Completion Rates",
description: "description TK",
methodology: `This data reports the percentage of people projected to complete probation
in a given month who have successfully completed probation by the end of that month.
<p>Probation is considered successfully completed if the individual is discharged from
Expand All @@ -229,7 +199,6 @@ const content: TenantContent = {
},
ProbationRevocationsAggregate: {
name: "Reasons for Probation Revocation",
description: "description TK",
methodology: `This data includes people who were incarcerated in a DOCR facility within the last
3 years because their probation was revoked. Revocations are included based on the
date that the person was admitted to a DOCR facility because their probation was
Expand All @@ -255,7 +224,6 @@ const content: TenantContent = {
},
ProbationProgrammingCurrent: {
name: "Free Through Recovery Program Participation in Probation",
description: "description TK",
methodology: `This data includes the total number of people on probation who are actively
enrolled in Free Through Recovery (FTR). Free Through Recovery is run jointly
with the Department of Health and Human Services (DHS): as a result, FTR enrollment
Expand All @@ -264,21 +232,18 @@ const content: TenantContent = {
},
ParolePopulationCurrent: {
name: "Current Parole Population",
description: "description TK",
methodology: `This data includes people currently on parole in North Dakota.
${demographicsBoilerplate} ${paroleBoilerplate} ${paroleOfficerBoilerplate}`,
totalLabel: "Total people on parole",
},
ParolePopulationHistorical: {
name: "Historical Parole Population",
description: "description TK",
methodology: `This data includes the number of people that were on parole in North Dakota
on the first day of each month over the last 20 years. ${demographicsBoilerplate}
${paroleBoilerplate}`,
},
ParoleSuccessHistorical: {
name: "Historical Parole Completion Rates",
description: "description TK",
methodology: `This data reports the percentage of people projected to complete parole
in a given month who have successfully completed parole by the end of that month.
<p>Parole is considered successfully completed if an individual is discharged from
Expand All @@ -297,7 +262,6 @@ const content: TenantContent = {
},
ParoleRevocationsAggregate: {
name: "Reasons for Parole Revocation",
description: "description TK",
methodology: `This data includes people who were incarcerated in a DOCR facility within the
last 3 years because their parole was revoked. Revocations are included based on the date
that the person was admitted to a DOCR facility because their parole was revoked, not the
Expand All @@ -323,7 +287,6 @@ const content: TenantContent = {
},
ParoleProgrammingCurrent: {
name: "Free Through Recovery Program Participation in Parole",
description: "description TK",
methodology: `This data includes the total number of people on parole who are actively enrolled
in Free Through Recovery (FTR). Free Through Recovery is run jointly with the Department of
Health and Human Services (DHS): as a result, FTR enrollment is aggregated into the 8 DHS service
Expand Down
30 changes: 4 additions & 26 deletions spotlight-client/src/contentApi/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@

import type { Topology } from "topojson-specification";

export type NamedEntity = {
name: string;
description: string;
};

export type LocalityLabels = {
label: string;
entries: { id: string; label: string }[];
Expand All @@ -36,11 +31,10 @@ export function isTenantId(x: string): x is TenantId {
return TenantIdList.includes(x as TenantId);
}

export type TenantContent = NamedEntity & {
export type TenantContent = {
name: string;
description: string;
coBrandingCopy: string;
collections: {
[key in CollectionTypeId]?: CollectionContent;
};
metrics: {
[key in Extract<
MetricTypeId,
Expand All @@ -65,22 +59,6 @@ export type TenantContent = NamedEntity & {
racialDisparitiesNarrative?: RacialDisparitiesNarrativeContent;
};

// ============================
// Collection types

export const CollectionTypeIdList = [
"Sentencing",
"Prison",
"Probation",
"Parole",
] as const;
export type CollectionTypeId = typeof CollectionTypeIdList[number];
export function isCollectionTypeId(x: string): x is CollectionTypeId {
return CollectionTypeIdList.includes(x as CollectionTypeId);
}

type CollectionContent = NamedEntity;

// ============================
// Metric types

Expand Down Expand Up @@ -110,7 +88,7 @@ export function isMetricTypeId(x: string): x is MetricTypeId {
return MetricTypeIdList.includes(x as MetricTypeId);
}

type MetricContent = NamedEntity & { methodology: string };
type MetricContent = { name: string; methodology: string };

export type MapData = {
aspectRatio: number;
Expand Down
Loading

0 comments on commit 54420d0

Please sign in to comment.