Neighborhood map built for the Ridgewood Tenants Union.
You'll need to download and install both R and RStudio.
This project uses renv
to handle dependency management. To get this project set up on your own system, open the project in RStudio (and open the .Rproj
file), install renv
(install.packages("renv")
), and run renv::init()
.
Edit .env_sample
to fill in the variables and save it as .env
.
You can get your own Census API key here.
The credentials for the Housing Data Coalition's instance of NYCDB can be found in a pinned message in the #tech channel.
The file create-tract-data.R
prepares all the indicator values and tract geometries for the map and saves the files in app/data
. Census tract geometries and American Community Survey data are accessed using the package tidycensus
. The rest of the indicators are prepared with a long SQL query on a a copy of NYCDB, which is a PostgreSQL database loaded with a variety of NYC housing datasets created using the nycdb
python library maintained by the Housing Data Coalition.
In addition to the values for all these indicators, there is a manually created csv file (indicator-info.csv
) with additional information about each indicator used in the app for formatting values and creating human-readable variable names.
The interactive map is created using the shiny
package. For more details on how this app is constructed see the README.md
in the app directory.
To deploy the app locally run shiny::runApp("app")
.
The app is published for free on shinyapps.io using rsconnect::deployApp("app")
. For more details on using shinyapps.io see this helpful guide.