1 of 13

IMAGINE BOSTON 2030

Using R-Shiny to keep ourselves accountable and empower the public

Mayor Martin J. Walsh

Mayor Martin J. Walsh

2 of 13

IMAGINE BOSTON 2030

  • First long-term plan in 50 years
  • Collaborating with >18 other City initiatives
  • 15,000 voices contributed
  • Data-driven approach
  • Resulted in 5 major goals

Mayor Martin J. Walsh

3 of 13

IB:2030 GOALS

Wanted a way to empower the public to hold the City accountable

  1. Encourage affordability, reduce displacement, and improve quality of life
  2. Increase access to opportunity
  3. Drive inclusive economic growth
  4. Promote a healthy environment and prepare for climate change
  5. Invest in open space, arts & culture, transportation, and infrastructure

Mayor Martin J. Walsh

4 of 13

IB:2030 METRICS AND DATA

  • Each goal has 3-4 metrics associated
  • Research Division at Boston Planning and Development Agency aggregated and analyzed data
  • Analytics Team visualized

Mayor Martin J. Walsh

5 of 13

Mayor Martin J. Walsh

6 of 13

BUILDING A TOOL FOR THE PUBLIC

  • Data visualizations are often inaccessible
  • Simple charts
    • Lines, bars, and maps
  • User inputs are clear

Mayor Martin J. Walsh

7 of 13

WHY SHINY

  • Quickly prototype and iterate while still being custom
  • Flexibility
    • Charts/visualizations
    • Dashboard layout - design guidelines
  • Ability to integrate other libraries

Mayor Martin J. Walsh

8 of 13

LIBRARIES WE RELY ON

Huge thanks to creators and contributors!

  • dplyr/tidyverse for data manipulation
  • Leaflet for mapping
  • Ploty for charts
  • Shinydashboard for layout
  • Colorbrewer for palettes

Mayor Martin J. Walsh

9 of 13

WILD CODE

  • Ended up with big, messy files with same stuff all over them
  • Copying and pasting all the time
  • Editing code in a thousand different places

Mayor Martin J. Walsh

10 of 13

ADOPTING MODULES

Taking pieces of code and making them reusable throughout an application

TITLE

SUB-TITLE

INPUT

DATA

SOURCE TEXT

Mayor Martin J. Walsh

11 of 13

CLEANER CODE, REUSABLE CHUNKS

Old ur.r

Old server.r

New files for same chart:

Less code, easier to read

Mayor Martin J. Walsh

12 of 13

BOSTON PUBLIC HEALTH COMMISSION

  • Wanted a way to make their data and analyses more accessible to the public
  • Conducted workshops to show how to use modules
  • Worked to build out more functionality and modules to meet needs
  • BPHC currently working on 2017 report using Shiny

Mayor Martin J. Walsh

13 of 13

THANK YOU

Kayla Patel

kayla.patel@boston.gov

@paylakatel

“PULL QUOTE TEXT. LABORITA CUS ETUS DANDAE DOLUPTATE EOLUM FACCUPTA MOLENDE MQUAES.”

Janet Doe�Boston City Councillor

Mayor Martin J. Walsh