In [1]:
setwd('/Users/erinlarson/Dropbox/Documents/GIT/DDESSS_Stream_Dream_Team')
library(dplyr)
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
In [7]:
data <- read.csv("Lat_Long_P_LandUse_StreamOrder.csv", head=T)
t(data[1,])
1
ActivityStartDate 2/7/01
mo 2
day 7
date 2001-02-07T00:00:00Z
MonitoringLocationIdentifier USGS-09498400
HydrologicCondition Stable, normal stage
HydrologicEvent Routine sample
ResultDetectionConditionText Not Detected
CharacteristicName Phosphorus
ResultSampleFractionText Total
ResultMeasureValue NA
ResultMeasure2 0
ResultMeasure_MeasureUnitCode
ResultStatusIdentifier Accepted
HUCEightDigitCode 15060103
DrainageAreaMeasure_MeasureValue 195
DrainageAreaMeasure_MeasureUnitCode sq mi
HUC8 15060103
PFOR2 73.918
PWETL2 0.01
PURB2 0.132
PAGT2 0.076
OrganizationIdentifier USGS-AZ
OrganizationFormalName USGS Arizona Water Science Center
MonitoringLocationIdentifier.1 USGS-09498400
MonitoringLocationName PINAL CREEK AT INSPIRATION DAM, NR GLOBE, AZ.
MonitoringLocationTypeName Stream
MonitoringLocationDescriptionText NA
HUCEightDigitCode.1 15060103
DrainageAreaMeasure_MeasureValue.1 195
DrainageAreaMeasure_MeasureUnitCode.1 sq mi
ContributingDrainageAreaMeasure_MeasureValue NA
ContributingDrainageAreaMeasure_MeasureUnitCode
LatitudeMeasure 33.57311
LongitudeMeasure -110.9012
SourceMapScaleNumeric NA
HorizontalAccuracyMeasure.MeasureValue 10
HorizontalAccuracyMeasure.MeasureUnitCode seconds
HorizontalCollectionMethodName Interpolated from MAP.
HorizontalCoordinateReferenceSystemDatumName NAD83
VerticalMeasure.MeasureValue 2740
VerticalMeasure.MeasureUnitCode feet
VerticalAccuracyMeasure.MeasureValue 20
VerticalAccuracyMeasure.MeasureUnitCode feet
VerticalCollectionMethodName Interpolated from topographic map.
VerticalCoordinateReferenceSystemDatumName NGVD29
CountryCode US
StateCode 4
CountyCode 7
AquiferName NA
FormationTypeText NA
AquiferTypeName NA
ConstructionDateText NA
WellDepthMeasure.MeasureValue NA
WellDepthMeasure.MeasureUnitCode NA
WellHoleDepthMeasure.MeasureValue NA
WellHoleDepthMeasure.MeasureUnitCode NA
ProviderName NWIS
HUC8.1 15060103
STRAHLER2 2.4
In [9]:
group_by(data, MonitoringLocationIdentifier) %>%
summarise(AvgLat = mean(LatitudeMeasure, na.rm = TRUE),
AvgLong = mean(LongitudeMeasure, na.rm = TRUE)
) %>% write.csv("SiteLatLong.csv")
Content source: ernlarson/DDESSS_Stream_Dream_Team
Similar notebooks: