This application was created with the intention for Howard Center Data Journalists to quickly note train lines that transport coal, aiding an ongoing investigation. This app was not designed with any other applications in mind.
- Download required libraries and any other necessary packages
- Check the local directory for the zipped .geojson file of train lines in the U.S.
- Unzip it and move it to the GeoJson files
- FILL IN the "global.r" script to run desired file
- alltrains <- st_read("xxx.geojson") . . . change xxx to file name
- If using RStudio: click the green "Run App"" button on the top right of the scripts frame
- If using Visual Studio Code: click arrow run button on top right while in "server.r" pane
- None of the rail lines will immediately load, they will load once you have selected a specific state or territory from the drop down
- Click the rectangle selector on the top left of the map to select rail lines to alter
- Users then have the ability to change the "Transports_coal" value by selecting the drop down menu and clicking "Yes", "No", "Unknown" in addition to adding “Evidence” to back up their decision
- Zoom in enough and a button to “Color Rail Lines” appears allowing users to see the different rail lines by their specific id to discern different tracks easily
- The “Full Data View” pane allows users to view the entire data frame of the .geojson file they uploaded to the “global.r” script
- Clicking the update button saves and displays the changes locally
- Clicking the save button creates a zipped and normal .geojson file with all the changes made
- Labeling process started with mines listed in a company’s coal origin directory/coal mine guide. Each company had one except for the Canadian lines, which don’t serve mines in the U.S.
- The line closest to the listed mine(s) were labeled, if there is a stretch of multiple mines along an isolated line, the entire line segment was labeled “yes.”
- For some lines that veered off from the main line, logical assumption was used to infer that the entire line must carry coal based on the locations of plants and ports in the state. For example, coal likely travels along a South Dakota isolated line miles away from the only three plants in the state to rejoin the main stretch of track
- Other lines were labeled based on other resources provided by companies, such as BNSF’s coal energy map. The stretches of lines listed as “main coal lines” were all labeled “yes.”
- CPKC lines were labeled “yes” based on their proximity to coal-powered plants. The company confirmed the listed plants on their bulk map were served by CPKC carrying coal, so the closest CPKC line to the plant was labeled
- This folder contains all mapping resources used to label lines
- Coal origin guides are available for CSX, BNSF, NS and UP. There are additional resources for CSX, which also have 11 coal rate district maps, or more detailed maps of a smaller area.
- For the two Canadian lines that run through the U.S. (Canadian National and Canadian Pacific Kansas City), there’s resources showing general movement of coal (CN) and a map showing power plants served (CPKC)
This app was created by Theodore Rose for the Howard Center for Investigative Journalism