Git Product home page Git Product logo

demo-2024-rmed-rspatial's Introduction

An Introduction to Tidy R Spatial Packages: Incorporating Historic Sociodemographic Data from the US Census and Visualizing Geographic Distributions

1. Overview

This repository contains an introductory demo to using spatial packages in R, prepared for the R Medicine 2024 conference. The demo will walk you through downloading Census data, merging in health data, exploring the data with summary statistics, and creating geographic maps to explore geographic distributions of the variables.

2. Folder Structure

We have organized relevant files in the following folders:

  • code: Code for the demo
  • data: Health data needed for the demo
  • images: Supportive images for the demo

3. Data Sources

We used two primary data sources for the following features in this demo:

4. Requirements

You will need the following software, R packages, and data to complete the demo.

4.1 Software and R Packages

  1. Download the following software:
  • R
  • RStudio or another R graphical user interface
  1. Run the following code in R to install the following packages:

install.packages(c('tidyverse','tidycensus','readr','sf','ggspatial','patchwork'), dependencies = TRUE)

  1. We used the following versions of software and packages:
  • Software:
    • R: 4.2.2 ("Innocent and trusting")
    • RStudio: 2024.04.1+748 ("Chocolate Cosmos")
  • Packages:
    • tidyverse: 1.3.2
    • tidycensus: 1.3.2
    • readr: 2.1.3
    • sf: 1.0.9
    • ggspatial: 1.1.9
    • patchwork: 1.2.0

4.2 Data

  • U.S. Centers for Disease Control and Prevention PLACES 2020
  • U.S. American Community Survey, 5-year estimates from 2017-2021
    • To download the data, refer to our code: code/demo-rspatial.Rmd

5. Cloning this Repository with RStudio

Below are steps to clone this repository to your local device with RStudio. Please refer to this link for more information about using git in RStudio.

  1. On top this page, click on Code and copy the link to this git repository (starts with https://github.com/...).
  2. Open RStudio.
  3. In RStudio, click on FileNew Project...Version ControlGit.
  4. Under "Repository URL", paste the link of the git repository.
  5. Under "Project directory name", name your project directory.
  6. Under "Create project as subdirectory of:", select the folder in which you would like your project directory to be located.
  7. Click on Create Project when you are done to clone your repository!

demo-2024-rmed-rspatial's People

Contributors

phispu avatar cmehranbod avatar

Stargazers

Philip Chase avatar  avatar  avatar Ana Bravo avatar  avatar  avatar

Watchers

 avatar

Forkers

mufflyt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.