From d057d89350e41b0577593d514f24ac239bf3f3de Mon Sep 17 00:00:00 2001 From: CloudLun Date: Fri, 29 Dec 2023 05:17:04 +0800 Subject: [PATCH] add data sources citation --- components/Map/Map.tsx | 10 ++++++++-- components/SidePanel/About.tsx | 17 ++++++++++++++--- context/MapContext.tsx | 10 ++++++---- 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/components/Map/Map.tsx b/components/Map/Map.tsx index 9d56e88..5f6c0cc 100644 --- a/components/Map/Map.tsx +++ b/components/Map/Map.tsx @@ -244,6 +244,8 @@ const Map = () => { "circle-radius": 4, 'circle-color': [ "case", + ["all", ["in", "Coalition Member", ["get", "Membership Status"]]], + "#812948", ["all", ["in", "Campaign Member", ["get", "Membership Status"]]], "#812948", "white" @@ -423,9 +425,13 @@ const Map = () => { m.setPaintProperty("members", "circle-color", [ "case", - ["all", ["==", ["get", "Name"], e.features[0].properties.Name], ["in", "Member", ["get", "Membership Status"]]], + ["all", ["==", ["get", "Name"], e.features[0].properties.Name], ["in", "Coalition Member", ["get", "Membership Status"]]], + "#812948", + ["all", ["==", ["get", "Name"], e.features[0].properties.Name], ["in", "Campaign Member", ["get", "Membership Status"]]], "#812948", - ["all", ["!=", ["get", "Name"], e.features[0].properties.Name], ["in", "Member", ["get", "Membership Status"]]], + ["all", ["!=", ["get", "Name"], e.features[0].properties.Name], ["in", "Coalition Member", ["get", "Membership Status"]]], + "#AB8190", + ["all", ["!=", ["get", "Name"], e.features[0].properties.Name], ["in", "Campaign Member", ["get", "Membership Status"]]], "#AB8190", "white" ]) diff --git a/components/SidePanel/About.tsx b/components/SidePanel/About.tsx index 226680a..5e1fb7e 100644 --- a/components/SidePanel/About.tsx +++ b/components/SidePanel/About.tsx @@ -28,7 +28,7 @@ const About = ({ expand, legislationsClickHandler }: Props) => {

ABOUT

{ - expand["About"] ? legislationsClickHandler("About")} /> : + expand["About"] ? legislationsClickHandler("About")} /> : }
@@ -77,10 +77,21 @@ const About = ({ expand, legislationsClickHandler }: Props) => {

BetaNYC is a civic organization dedicated to improving lives in New York through civic design, technology, and data. With an aim to improve access to public interest technology, the Civic Innovation Lab at BetaNYC provides assistance with research, data analysis, and data visualization. The Civic Innovation Lab at BetaNYC created this project in response to a Research and Data Assistance Request (RADAR) submitted by the Right to Counsel NYC Coalition.Follow this link to learn more about RADARs and how to submit a request!

-
+

BetaNYC Civic Innovation Lab Team

Ashley Louie (Director), Hao Lun Hung (Project Lead), Erik Brown, Hailee Hoa Luong

- +
+
+

Data Sources

+

This website visualizes and maps the New York statewide support for the Housing Courts Must Change! Campaign launched by Right to Counsel NYC Coalition. Much of the data visualized on this website is collected and maintained by staff and members of the Right to Counsel NYC Coalition. This website was launched in December 2023, and the data is updated periodically to reflect sponsorship updates to Senate, Assembly, and Right to Counsel NYC Coalition members and endorsers.

+
+
  • Right to Counsel NYC Coalition. (2023).

    Housing Courts Must Change! Legislation.

    Updated December 28, 2023.
  • +
  • Right to Counsel NYC Coalition. (2023).

    Housing Courts Must Change! Public Legislation Tracker.

    Updated December 28, 2023.
  • +
  • Right to Counsel NYC Coalition. (2023).

    Right to Counsel NYC Coalition Membership.

    Updated December 28, 2023.
  • +
  • NY Assembly districts [link to dataset]
    NYC Planning

    Political and Administrative Districts

    Updated October 6, 2022
  • +
  • NY Senate districts [link to dataset]
    NYC Planning

    Political and Administrative Districts

    Updated October 6, 2022
  • +
  • Zip code boundaries [link to dataset]
    Open Data Delaware

    Zip code boundaries for each of the 50 states

  • +
    ) diff --git a/context/MapContext.tsx b/context/MapContext.tsx index ecffd41..ccd321e 100644 --- a/context/MapContext.tsx +++ b/context/MapContext.tsx @@ -75,11 +75,11 @@ const MapProvider = ({ children }: Props) => { const targetPolygon = turf.polygon([coordinatesArray]) /* @ts-ignore */ let targetCentroid = turf.center(targetPolygon).geometry.coordinates - if(district === 48) targetCentroid[1] = targetCentroid[1] - 0.25 - if(district === 49) { + if (district === 48) targetCentroid[1] = targetCentroid[1] - 0.25 + if (district === 49) { targetCentroid[0] = targetCentroid[0] - 0.275 targetCentroid[1] = targetCentroid[1] + 0.1 - } + } const labelData = { 'type': 'FeatureCollection', 'features': [ @@ -159,7 +159,9 @@ const MapProvider = ({ children }: Props) => { map?.setPaintProperty("members", "circle-color", [ "case", - ["all", ["in", "Member", ["get", "Membership Status"]]], + ["all", ["in", "Coalition Member", ["get", "Membership Status"]]], + "#812948", + ["all", ["in", "Campaign Member", ["get", "Membership Status"]]], "#812948", "white" ],)