Skip to content

Seattle Eviction Data for cRaggy 2019

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

pdxrlang/craggy_2019

 
 

Repository files navigation

craggy2019


Table of Contents

  1. cRaggy is Back - Looking at Housing and Evictions in King County

  2. Data Source

  3. Accessing the data

    3.1 Add your code to the existing source code
    3.2 Use the craggy2019 package from your own independent project

  4. Examples and kick-starters

  5. Notes and resources

  6. License


lifecycle

Disclaimer: this package is experimental and intended for use simply as an informal exercise for working with data in the R language. Read the NEWS.md for recent updates.


cRaggy is Back - Looking at Housing and Evictions in King County

cRaggy, our data exploration and visualization activity is back! For those of you unfamiliar with cRaggy, the Portland R User Group makes a large dataset available for visualization and analysis, so that you can present and share your results, visualizations, and insights about the dataset.

We will be looking at a combination of housing data and eviction data for King County, Washington, United States, hoping to gain insights about the nature of evictions in King County. This dataset comes courtesy of the planners of the 2019 Symposium for Data Science and Statistics.

We encourage you to collaborate together and work on visualizations! Our goal is to encourage collaboration and share our code and insights.

In September, we'll have a visualization gallery and lightning talks about the visualizations and insights you've come up with. Event information will be posted on our Meetup page.

All are welcome. Participation in cRaggy requires agreeing to the Code of Conduct

Data Source

King County Eviction Data for cRaggy 2019.

This dataset came from the SDSS 2019 Data Hack Activity.

Accessing the data

This project is organized as an R package, which contains the data and includes some examples of reading, exploring, analyzing, and visualizing the data. There are several ways to use this project.

Add your code to the existing source code

Context: You want to use the existing sample code and write your own code within the same source structure of this package. You might want to contribute some of your code back to this project, but you are not sure about that yet.

Solution: Fork the project, so that you can work in your own version. A "fork" is linked back to the original code, so that you can contribute changes later, if you so choose, by making a Pull Request.

  1. Fork this project, which creates a separate copy in your Github account.
  2. Clone the repository that is now forked in your Github account to your local machine.
  3. Open the copy on your local machine in RStudio.
  4. Click on the Build > Install and Restart button, which in the default application configuration is in the Environment, History, ... pane in the upper right of the application window.
  5. The package will be built, installed in your local package library, and loaded into your session. When you see library(craggy2019) executed in the console, then the build and load is complete and your environment is ready for you to use the package.
  6. Now you can use the base::system.file function to reference a data file within the loaded package. For example,
    readr::read_csv(system.file("extdata", "evictions.csv", package = "craggy2019"))
    This will read data from the loaded package in the R Session, not from the file system.
  7. Alternatively, you can refer to the data files through the file system in the inst/extdata directory. For example,
    here::here("inst", "extdata", "evictions.csv")`.
  8. As you write code and perhaps add more data, you will commit those changes with git on your local machine. From time to time, you should push those changes to your Github account. Since you forked the project, those changes will only affect your repository, not the pdxlang/craggy_2019 repository from which you forked.
  9. As mentioned previously, you can make a Pull Request from your forked repository to the original pdxlang/craggy_2019 repository, in order to have your code merged into the original source. However, we do not explain how to do that here.

Use the craggy2019 package from your own independent project

Context: You already have a project where you want to write code to read, explore, analyze, and visualize the Evictions data. You do not want to write your code within the framework of this craggy2019 package source code.

Solution: You need to install and load this craggy2019 package in your local environment, so that you can access the data that it contains. However, you do not need to fork or clone the pdxlang/craggy_2019 repository.

  1. Install the craggy2019 package:
        install.packages("remotes")
        library(remotes)
        remotes::install_github("pdxrlang/craggy_2019")
        # Note: Unfortunately, the repository name and package name do not match!
        library(craggy2019)
  2. Now you can use the base::system.file function to reference a data file within the package. For example,
    readr::read_csv(system.file("extdata", "evictions.csv", package = "craggy2019"))
    This will read data from the loaded package in the R Session, not from the file system.
  3. FYI: With system.file, you do not reference the inst directory level, which is the root level for the data files in the source code, but it is not the root level for the data in the loaded package. When a package is loaded, everything within the inst directory is placed at the root level of the package. So you start at the extdata directory level, which is the level that holds all of the data files that we are using for this project.
  4. FYI: inst/extdata is the R package convention for where data is placed within a package. Almost all packages follow that convention, so we followed it for this project too.

Examples and kick-starters

These examples can help you start analyzing the data:

Notes and resources

See the NEWS for recent code changes, as well as links to resources outside of this project.

License

This code is licensed under the MIT License.

About

Seattle Eviction Data for cRaggy 2019

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%