Data

The following report identifies specific tax parcels in Downtown Syracuse, New York (USA).

View the dataset documentation here: Syracuse, NY Tax Parcel Data.


Required Packages

The following packages are required for this report and loaded with library().



Example Solutions

The following examples demonstrate how to use conditions to identify specific parcels.


Example: Tax Parcel Acres

Parcels with more than one acre are determined with variable acres and condition > 1.

  • Each value in variable acres is tested as greater than one, or > 1
  • Values in acres greater than one become TRUE, otherwise FALSE
  • All TRUE and FALSE values are stored in object these


##    Mode   FALSE    TRUE 
## logical     330      59


All TRUE and FALSE values, for each parcel, are converted into colors.



All tax parcels in downtown are mapped with plot(). Each parcel has one of two colors per the above code.




Example: Parcels with Single Families

Use variable landuse to determine how a tax parcel is used. Determine all possible values with unique().


##  [1] "Parking"            "Commercial"         "Parks"             
##  [4] "Community Services" "Vacant Land"        "Utilities"         
##  [7] "Apartment"          "Recreation"         "Schools"           
## [10] "Religious"          "Industrial"         "Single Family"


One of the values in landuse is “Single Family”. Therefore, the test is whether or not landuse is exactly equal to “Single Family”.



Questions & Solutions

The following questions ask you to map your results, write your answer, or both. The first question has been completed for you.



Question 1: Vacant Lots

Question: Where are the majority of vacant lots located in the downtown? Map your results.

Note: This solution has been provided for you.


##  [1] "Parking"            "Commercial"         "Parks"             
##  [4] "Community Services" "Vacant Land"        "Utilities"         
##  [7] "Apartment"          "Recreation"         "Schools"           
## [10] "Religious"          "Industrial"         "Single Family"


Now, we create our test statement, == "Vacant Land", and store the results in result.




Question 3: New Construction

Question: Where is new construction located in the city?. Map your results.

Note: You may use >= (greater than or equal) or > (greater than) 1980.


## [1] 46



Question: What proportion of commercial properties are built since 1980?

Answer: 14.35% of commercial properties were built since 1980.


##  [1] "Parking"            "Commercial"         "Parks"             
##  [4] "Community Services" "Vacant Land"        "Utilities"         
##  [7] "Apartment"          "Recreation"         "Schools"           
## [10] "Religious"          "Industrial"         "Single Family"
## [1] 14.35407



Question 6: Tax Delinquent Parcels

Question: What proportion of parcels have delinquent tax payments owed?

Answer: 14.65% of parcels have delinquent tax payments owed.


## [1] 14.65296



Question 7: Tax Delinquent Commercial Properties

Question I: What proportion of commercial properties are delinquent on taxes?

Question II: What proportion of delinquent tax bills are owed by commercial parcels?


Answer I: 11.96% of commercial properties are delinquent on taxes.

Answer II: 43.86% of delinquent tax dollars are owed by commercial parcels.


## [1] 0.1196172
## [1] 0.4385965



Question 8: Tax Delinquent Parcels by Land Use

Question: How many of each land use type are delinquent on taxes? Print a table of your results.


##                     group.delinqt
##                      FALSE TRUE
##   Apartment              6    0
##   Commercial           184   25
##   Community Services    15    2
##   Industrial             2    2
##   Parking               62   16
##   Parks                  8    0
##   Recreation             5    0
##   Religious              6    0
##   Schools                4    0
##   Single Family          1    0
##   Utilities              6    0
##   Vacant Land           33   12



————

DELETE THIS LINE & ALL LINES BELOW IF NOT ATTEPTING CHALLENGES

————



Challenge III: Total Commercial Value

Instructions: What is the total value of all of the commercial parcels in Downtown?

Answer: The total value of all commercial parcels is $317,067,000.


## [1] 317067000
##          Apartment         Commercial Community Services         Industrial 
##           38753600          317067000          158780600           15477700 
##            Parking              Parks         Recreation          Religious 
##           72228540            2315900           56290600            5655600 
##            Schools      Single Family          Utilities        Vacant Land 
##           14201500             110000           25803200            6330500



Challenge IV: Total Non-Commercial Value

Question: What is the total value of all of the non-commercial parcels in Downtown?

Answer: The total value of all non-commercial parcels is $395,947,740.


## [1] 395947740



————

DELETE THIS LINE & ALL LINES BELOW BEFORE SUBMITTING

————



Tips & Tricks

Consider the following tips for completing this assignment.


Creating Logical Values

Recall that logical values are TRUE and FALSE. To produce logical values, we test vaues against a condition, e.g. “greater than”.


## [1] FALSE FALSE  TRUE  TRUE  TRUE


Logical Values as Numeric Values

Recall that logical values are TRUE and FALSE, representing 1 and 0, respectively.


## [1] 1
## [1] 0


Logical Values & Arithmetic

Because TRUE and FALSE are actually numeric, we can use sum() for total TRUE values, e.g.


## [1] 4
## [1] 0.6666667


Logicals for Subsetting

A subset is a smaller collection of observations (rows) from a larger dataset. Create a subset by placing a logical vector in lieu of row positions.



How to Submit

Use the following instructions to submit your assignment, which may vary depending on your course’s platform.


Knitting to HTML

When you have completed your assignment, click the “Knit” button to render your .RMD file into a .HTML report.


Special Instructions

Perform the following depending on your course’s platform:

  • Canvas: Upload both your .RMD and .HTML files to the appropriate link
  • Blackboard or iCollege: Compress your .RMD and .HTML files in a .ZIP file and upload to the appropriate link

.HTML files are preferred but not allowed by all platforms.


Before You Submit

Remember to ensure the following before submitting your assignment.

  1. Name your files using this format: Lab-##-LastName.rmd and Lab-##-LastName.html
  2. Show both the solution for your code and write out your answers in the body text
  3. Do not show excessive output; truncate your output, e.g. with function head()
  4. Follow appropriate styling conventions, e.g. spaces after commas, etc.
  5. Above all, ensure that your conventions are consistent

See Google’s R Style Guide for examples of common conventions.



Common Knitting Issues

.RMD files are knit into .HTML and other formats procedural, or line-by-line.

  • An error in code when knitting will halt the process; error messages will tell you the specific line with the error
  • Certain functions like install.packages() or setwd() are bound to cause errors in knitting
  • Altering a dataset or variable in one chunk will affect their use in all later chunks
  • If an object is “not found”, make sure it was created or loaded with library() in a previous chunk

If All Else Fails: If you cannot determine and fix the errors in a code chunk that’s preventing you from knitting your document, add eval = FALSE inside the brackets of {r} at the beginning of a chunk to ensure that R does not attempt to evaluate it, that is: {r eval = FALSE}. This will prevent an erroneous chunk of code from halting the knitting process.