Borough of Emmaus MS4 Program Internship

In 2017, I was an intern for the Borough of Emmaus, a small borough of roughly 11,000 people located in eastern Pennsylvania. While employed, I was tasked with creating a map of the entire borough that was required to show certain datasets and information. The information that was required included storm water pipes, water flow direction, outfalls, inlets, bodies of water, retention areas (present and proposed), manhole covers, and elevation contours. All of this information was required by a program being run by the State of Pennsylvania entitled the “MS4 program”. Creating of the program was done to comply with the federal clean water act, with the main goal being cleaning up the pollutants in our bodies of water.

 

One of the main challenges I was working with regarding this project was that I was the only person employed by the Borough that knew how to work a GIS software, let alone know what GIS even is. This was an obstacle I did not think I was getting myself in to. Trying to explain the processes that were happening and needed to be completed to other borough employees was challenging. Another facet of this issue was that I didn’t have a single person to bounce ideas off of o anyone to ask a question to if I got stuck. For someone that never worked a job using GIS and still completing their bachelor’s degree, this was a massive learning curve. Another major problem I had to deal with was the borough didn’t have any type of GIS data readily available. Some datasets I had to download (like borough boundaries and aerial imagery), while others I had to manually create by myself. All of the storm water pipes were hand drawn onto paper maps by the water department and I had to spend quite a lot of time digitizing every pipe segment as well as inputting the attribute data associated with each segment. For one man to complete nearly one thousand pipe segments, this took some time.

 

Once all of the leg work was completed and compiled onto a functioning map, it was then able to be submitted. For the borough, since they did not have any GIS professionals on staff, they first sent the finished map to be revised by an engineering firm that specialized in this municipal storm water program. A few weeks later, they approved the map and it was submitted to the state department of environmental protection.

 

As seen below, this map is only a subsection of the much larger map. Subsections were created to be able to get much better resolution of every storm water pipe and so the water department could carry these maps with ease.

 

 

All in all this project and internship was a difficult task for me at the time and made me learn a lot about GIS and the GIS profession in a short amount of time. Just because a project may sound easy doesn’t necessarily mean it will be just that. A lot of times there are various issues and problems that are encountered which increase the difficulty of the project. It is important to learn and adapt to every project that comes in front of a GIS user, and I learned doing this will make you a much better GIS professional in the future.

Courses Offered Fall 2018

The following courses are being offered Fall 2018. All times are 5:30pm to 8pm. Please refer to Banner for more information.

Monday

  • GUS 8065 – Cartographic Design (required)

Tuesday

  • GUS 5067 – GIS and Location Analysis (elective)
  • GUS 5161 – Statistics for Urban Spatial Analysis

Wednesday

  • GUS 5062 – Fundamentals of GIS
  • GUS 8067 – Spatial Database Design (required)

Thursday

  • GUS 5062 – Fundamentals of GIS
  • GUS 5063 – Remote Sensing (elective)

Friday

  • GUS 9187 – GIS Capstone (required, does not meet every week)

Courses Offered Spring 2018

The following courses are being offered Spring 2018. All times are 5:30pm to 8pm. Please refer to Banner for more information.

Monday

  • GUS 8068 – Web Mapping and Map Servers (elective) – Prof. Gardener

Tuesday

  • GUS 5062 – Fundamentals of GIS – Prof. Kaylor
  • GUS 5067 – GIS and Location Analysis (elective) – Prof. Mennis
  • GUS 5073 – Geovisualization (elective) – Prof. Middel

Wednesday

  • GUS 5066 – Environmental Applications of GIS (elective) – Prof. Dahal
  • GUS 5072 – Advanced Remote Sensing (elective) – Prof. Gutierrez-Velez

Thursday

  • GUS 5062 – Fundamentals of GIS – Prof. Gardener
  • GUS 5065 – Urban GIS (elective) – Prof. Kaylor
  • GUS 8066 – Application Development (required) – Prof. Hachadoorian

Friday

  • GUS 9187 – GIS Capstone (required, does not meet every week) – Prof. Hachadoorian

Using FFmpeg as an Animation Conversion Command Line Tool

Editing maps and doing data analysis, that’s my thing! But when it comes to video editing, I’m a bit out of my league. In addition to that, I have no expensive software that will make things look cool and fun. Or at least I thought I didn’t.

FFmpeg is “a complete, cross-platform solution to record, convert and stream audio and video.” You can download it here. This tool is limitless when it comes to production.

So, working with the time series images that I created from the precipitation data and working with FFmpeg, I was able to create an animation!

You’ll be working in command line window so you need to know where that lives. For me and my Windows 10 computer, it lives here … “C:\Windows\WinSxS\amd64_microsoft-windows-explorer-shortcuts_31bf3856ad364e35_10.0.10586.0_none_443d824ebb4341e2\01 – Command Prompt.lnk” but it may be easier just hitting the windows start button and typing command prompt.

ffmpeg -framerate 24 -i Rplot_%04d.png output.mp4

My images were named Rplot_0001.png. If your image was named img_001.jpeg you would refer to your image as img%03d.jpeg. That took me a few minutes to figure out but after I hit enter, I had a time series precipitation video. I wasn’t very specific in my frame rate but you can be. I received a lot of help from this FFmpeg wiki.

imagestovideo

Plotting Time Series Graphs for Animation with MapMate Package in R

Animations can be a little tough to create but luckily, Matthew Leonawicz has created a package for R that plots and saves images easily called MapMate. The map portion of the package I have yet to master, as it is globe based and my project was to map a static city. But the time series climate data of precipitation that I collected from The National Oceanic and Atmospheric Administration Department of Commerce was a great project to produce an animation.

Needed for the images to save is ImageMagick which is a free download.

The first step to creating an animation was to make a sequential numeric column named FrameID for the order of plotting. The next step was to identify the x limits and the y limits.

climate1 <- climate
climate1$FrameID <- 1:nrow(climate1)                  
xlim <- range(climate1$Date)
ylim <- range(climate1$Percip)
save_ts(climate1, x = "Date", y = "Percip", id = "FrameID", col = "grey",
         xlm = xlim, ylm = ylim, dir = "C:/Users/tuf29742/Documents/Vector Control/Animation/")

With x as the date and the y as the precipitation, and a specified location for the images to be saved, this image creator took roughly 30 minutes to produce 3,159 images for animation. Below are just 5 images from the package capture.

These images could now be used in a video editor to create an animation. I would check out Matt’s MapMate Instructional Page for more fun with animation!

Working with Time Series Data in R

Time series analysis is very useful in economics but I have been using it in my studies of mosquitoes and climate change in environmental health. The relationship that I am examining is whether or not the climate change had any effect on increased mosquito quantity within trapping areas over 17+ years. The first step of that process is to see if there was a change in climate over the 17+ years that match the mosquito collection data.

The mosquito season starts in May and ends in October, and it is common for field workers to set traps every Monday through Thursday, leave them for 24 hours and then collect the traps to have the mosquitoes tested. So, all precipitation and temperature data was collected from The National Oceanic and Atmospheric Administration Department of Commerce.

Working within R and using the Stats package, I was able to transform the dataframe into a time series class and visualize over time.

library(stats)print(climate)
class(climate)
length(climate)

Results :

print(climate)
Temp Percip       Date       time
1      55   0.00   5/1/2000 2000-05-01
2      59   0.09   5/2/2000 2000-05-02
3      60   0.00   5/3/2000 2000-05-03
...
class(climate)
[1] "tbl_df"     "tbl"        "data.frame"
length(climate)
[1] 4

Now, we transform the dataframe to a ts object

climatets <- ts(climate, start = 1, frequency = 1)
print(climatets)
length(climatets)

Results :

> climatets <- ts(climate, start = 1, frequency = 1) Warning message: In data.matrix(data) : NAs introduced by coercion
print(climatets)
Time Series:
Start = 1
End = 3159
Frequency = 1
Temp Percip Date
1   55   0.00   NA
2   59   0.09   NA
3   60   0.00   NA
...
length(climatets)
[1] 12636
plot(climatets)


It is common for string dates to be eliminated in the time series transformation. If you would like to keep them for labeling purposes, I would investigate ?as.POSIXlt() for date time numeric conversion.

You can see that there is a slight upward trend in temperature over the 17+ years. But for the most part, the climate over the 17 years doesn’t change much in trend. Which tells me that if there has been an increase in mosquito quantity at trapping sites, it may not be connected to temperature.

This way of visualizing data is essential in making predictive modeling and recognizing trends.

Alternative Graphics Editor

As someone that is about to lose access to my Temple sponsored software one of the things I’m going to miss the most is Adobe Illustrator (AI). The Cartographic Design requirement for the PSM in GIS really made it clear how a few simple image adjustments using a program like Illustrator can make a map product exported from ArcGIS or QGIS look thousands of times better. Luckily while attending a recent Technical Workshop at Azavea one of the lightning talks was about improving product visualization. The speaker Jeff Frankl, User Experience Designer at Azavea demonstrated Figma.com, an online alternative to AI. Currently Figma is free to use as an individual, with the ability to have three active projects stored for 30 days. The user interface is very similar to AI, but if you’re new to both programs there are plenty of instructional videos, the major difference being that Figma projects can be shared online and worked on collaboratively.

There are also plenty of other free or low cost design products like Inkspace and GIMP there is a pretty thorough list available at this link.