Urban Code Library

The goal of this library is to compile the range of amazing resources available across Urban for coding. Whether you’re just starting out with a language and want to learn how to get started, or are looking for code on a data task that you know someone else has probably already written, this is the site for you!

All of the code that you find on this website is also linked to repositories on Github so that you can download the code separately. Code is available for R, Python, STATA, and SAS.

How to Use the Library

This website is meant to be a user friendly way to view code and figure out what would be relevant and helpful to use. There’s a tab for R, Python, STATA, and SAS and within each of those you can navigate to whatever code is relevant to you. Code is generally broken down into three categories:

  • Formal Tutorial which offer trainings on how to do general coding processes

  • Code Samples which are small snippets of code for concrete small tasks

  • Dataset specific code which is code relevant to specific datasets that are commonly used at Urban like ACS data or LODES employment data.

Upload Code

We want uploading code to be as easy as possible while still ensuring reproducibility and legibility so here are a few guidelines for how to add code to the library through the form below:

  1. Comment code thoroughly

  2. Where possible, use fully replicable examples

  3. If using specific datasets or dependencies, provide links and instructions on how or where you obtained data. Alternatively, you can upload the data to this Box folder and we will store publicly. We will also link to the public data in the code you upload.

  4. If uploading code directly from a Github repository, it might be prudent to provide a link to the repository at the beginning of the README file

In the queue

Code, tutorials, or features that are in the queue to be added to the website include:

  • Tutorial on working with surveys
  • External Links pages
  • Machine learning tutorials

Reach out if you have any interest in helping to develop resources, or more you’d like to see added to the list through the form below!

Feedback

The code library is meant to constantly grow and expand! We want this to be an evolving resource for staff to access helpful code and trainings. We’d love to hear what you want to see added to the website. This can be code, training, or any other resource.

Contact Info

Please don’t hesitate to contact code_library@urban.org with any feedback or questions about the code library!