Skip to main content

jbrnbrg

Tag: package

JavaScript in RStudio with r2d3

RStudio, an IDE for R, has made tons of improvements over the past 5 years and one of them is the ability to run non-R code (including the output from said non-R code) inline, within an RMarkdown document. In light of this functionality, today’s post will run through an example of how to run JavaScript - specifically, d3.js, a JS library for “manipulating documents based on data” - within RStudio using the library r2d3.

Basic EDA for Multilevel Data in R

Multilevel data is data that includes repeated measures of the same subject or variables over some period of time e.g: A five-year study on the test scores of students grouped by cohorts and classes across a state’s K-12 schools Patient satisfaction of care grouped by attending doctors and their respective practices Police use of force incidents by race of suspect grouped by precinct, patrol, and arresting officer Analysts can encounter data of this type in just about any conceivable industry that produces data and the grouping structure must be fully understood to properly explore, model, and simulate before creating any usable insight.

StreetEasy Neighborhood Rentals & CrossTalk

At this point it’s pretty well-established that the pandemic has had a tremendous impact on human life around the world and particularly within New York City’s five boroughs. At the time of this post, over 10% of the USA’s 209K+ deaths have come from NYC alone (23,852). The death-toll from the pandemic is staggering on its own - and continues to shock in its reach - but the addition of the shutdown (and continued restrictions - even in Phase 4 of the reopening) has had a compounding effect on all aspects of socioeconomic activity in the city.

Web Scraping for Public Health Data

Part of the new normal for many data analytics professionals is being able to obtain Covid-19 data by geographic location. To address this need, today’s post is going to walk through how to scrape the repo for the NYC Department of Health and Mental Hygiene using the flexible rvest library to to create a time-series of positive cases by NYC zip code.

Updating this Site with blogdown

The shutdown related to the global pandemic has freed up some time for me and that seemed like a good enough reason to update the look of my website. In today’s post, I will share my experience with blogdown as well as the resources I used to make the update. Background Up until now, I had been using the PyCharm IDE along with Jekyll to create posts from .

Linear Mixed Effect Models with lme4

This post is going to follow along and expand on a well-known tutorial for Mixed Effect Linear Models by Bodo Winters, a lecturer in Cognitive Linguistics at the University of Birmingham, Dept. of English Language and Applied Linguistics. While this tutorial will generally follow Winter’s, I have added additional detail for EDA, expanded the details re: code & errors that are encountered, and added notes from many other sources on Mixed Effect Models (see the Sources section at the end for links) - let’s get started!

Binary Response and GGally

If I am working on data with a binary response, I like to use the GGally package for its ggpairs function. It provides a way to look at a lot of different data types at the same time but the setup and customization can be a little daunting. In this example, which leverages this crime data, I demonstrate how ggpairs can be used to reveal a lot of information in a single figure.