This vignette demonstrates how to use the nyc_events_sealevel function to explore projected extreme climate events and sea level rise for New York City.
The dataset provides projections under different climate scenarios, including: - Number of heatwaves per year - Cooling and heating degree days - Projected sea level rise
Researchers, city planners, and policymakers can use this information to understand future climate risks, prepare for extreme weather events, and plan adaptation strategies.
library(nycOpenData) library(dplyr) library(ggplot2) library(knitr)
sample_data <- nyc_events_sealevel(limit = 10) sample_data
This code retrieves 10 rows of data from NYC Open Data endpoint for extreme events and sea level rise projections.
summary_table <- sample_data %>% select(period, number_of_heatwaves_year, cooling_degree_days, heating_degree_days) %>% head(10) summary_table
This table gives a quick overview of projected extreme events for different scenarios.
ggplot(sample_data, aes(x = period, y = as.numeric(number_of_heatwaves_year))) + geom_col() + labs( title = "Projected Number of Heatwaves by Scenario", x = "Climate Scenario", y = "Number of Heatwaves" ) + theme(axis.text.x = element_text(angle = 45, hjust = 1))
This plot shows how the number of heatwaves is projected to change across scenarios. It helps visualize future climate risks at glance.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.