Сгруппированные вычисления могут помочь вам интерпретировать большие наборы данных, такие как данные timeseries. В таких вычислениях вы используете сгруппированную переменную, чтобы разделить набор данных в группы и применить функцию к каждой группе. Сгруппированная переменная содержит значения, такие как периоды времени или местоположения станции, которые можно использовать, чтобы сгруппировать другие значения данных, такие как температурные показания или атмосферные концентрации газа. В MATLAB® можно хранить такие данные в таблицах или расписаниях. Со сгруппированными вычислениями в таблице можно часто вычислять оперативные результаты, в одной таблице, вместо того, чтобы выломать данные в отдельные таблицы и объединить результаты позже.
В этом примере показано, как импортировать диоксид азота (NO2) данные Агентства по охране окружающей среды (EPA) США в таблицу и сделать сгруппированные вычисления на этих данных. NO2 является одним из Воздушных Загрязнителей Критериев, отрегулированных в соответствии с Законом о чистом воздухе США. Это токсично отдельно и является также ключевым компонентом фотохимического смога, который приводит к производству озона уровня земли. NO2 производится посредством высокотемпературных процессов, которые могут разделить газы азота и кислорода и позволить им повторно объединиться. Естественные процессы вносят NO2 в атмосферу, но также - деятельность человека, такая как сгорание в автомобильных механизмах и электростанциях, молнии и записи биомассы. Концентрация NO2 в атмосфере также под влиянием фотохимического циклического повторения между НЕ и NO2, атмосферный транспорт, и в конечном счете оксидирование к азотной кислоте, вызывая кислотный дождь. Различные процессы вносят NO2 в атмосферу на различных масштабах времени, ведя к (дневной) ежедневной газете, еженедельно, и ежегодные циклы в ее атмосферной концентрации. Анализ timeseries таких данных полагается в большой степени на сгруппированные вычисления, чтобы исследовать различное периодическое поведение или усреднить данные в зависимости от времени, чтобы сгладить высокочастотную изменчивость и показать долгосрочные тренды.
Пример сначала показывает, как сделать очистку предварительных данных, включая преобразование таблицы к расписанию. Затем это показывает простые способы сгруппировать данные одной сгруппированной переменной и вычислить ежегодные средние концентрации NO2. Это также показывает, как сгруппировать данные NO2 двумя сгруппированными переменными вместе, время и местоположение, включив вычисления, которые находят местоположения, превышающие стандарты EPA неоднократно. Можно также сгруппировать данные NO2 периодом времени, чтобы искать ежедневные или ежегодные циклы. Наконец это показывает, как применить функцию, которая требует, чтобы входные параметры от нескольких табличных переменных нашли времена, в которые максимальные концентрации NO2 произошли на каждом сайте.
Во-первых, импортируйте данные NO2 из базы данных Air Quality System (AQS), обеспеченной EPA. Эти данные состоят из почасовых измерений концентраций NO2 от наружных мониторов по Соединенным Штатам, Пуэрто-Рико и Американским Виргинским островам. Это хранится в виде набора заархивированных электронных таблиц, один в течение каждого года начиная с 1 980.
Загружайте каждый час измерения NO2 в течение лет 1985–1989. Можно загрузить и разархивировать сжатые электронные таблицы при помощи unzip
функция. Результатом является набор файлов в вашей текущей папке с именами, такими как hourly_42602_1985.csv
. Здесь, 42602
код EPA для NO2. (Данные Агентства по охране окружающей среды США. Системная Витрина данных Качества воздуха, доступная через https://www.epa.gov/airdata. Полученный доступ 15 июля 2021.)
yrs = string(1985:1989); urls = "https://aqs.epa.gov/aqsweb/airdata/hourly_42602_" + yrs + ".zip"; fnames = strings(numel(yrs),1); for ii = 1:numel(yrs) fnames(ii) = unzip(urls(ii)); end fnames
fnames = 5×1 string
"hourly_42602_1985.csv"
"hourly_42602_1986.csv"
"hourly_42602_1987.csv"
"hourly_42602_1988.csv"
"hourly_42602_1989.csv"
Импортируйте данные из электронных таблиц в таблицу. Запустите путем составления пустой таблицы. Затем импортируйте данные из электронных таблиц, один за другим, при помощи readtable
функция и добавление его к таблице.
Создайте настройки импорта, которые справка задает как readtable
импортирует табличные данные. Чтобы создать настройки импорта на основе содержимого электронных таблиц, используйте detectImportOptions
функция. Считайте все текстовые данные в табличные переменные то хранилище строки. Можно также указать, что только заданные табличные переменные имеют определенные типы данных. Задавать это только TimeGMT
и TimeLocal
табличные переменные хранят времена как duration
массивы, используйте setvaropts
функция.
NO2data = table; opts = detectImportOptions(fnames(1),"TextType","string"); opts = setvaropts(opts,["TimeGMT","TimeLocal"],"Type","duration","InputFormat","hh:mm");
Импортируйте данные из электронных таблиц при помощи readtable
функция. Можно вертикально конкатенировать таблицы, которые вы читаете в том, так, чтобы все данные были в одной большой таблице.
Электронные таблицы имеют имена столбцов, такие как "Time GMT"
, то, что вы не можете использовать в качестве идентификаторов MATLAB. Когда предупреждающие сообщения указывают, readtable
преобразует эти имена на имена табличной переменной, которые являются допустимыми идентификаторами MATLAB, такими как TimeGMT
. Когда имя табличной переменной является также допустимым идентификатором MATLAB, легче получить доступ к переменной при помощи записи через точку, как в NO2data.TimeGMT
.
for ii = 1:numel(yrs) NO2data = [NO2data; readtable(fnames(ii),opts)]; end
Warning: Column headers from the file were modified to make them valid MATLAB identifiers before creating variable names for the table. The original column headers are saved in the VariableDescriptions property. Set 'VariableNamingRule' to 'preserve' to use the original column headers as table variable names.
Warning: Column headers from the file were modified to make them valid MATLAB identifiers before creating variable names for the table. The original column headers are saved in the VariableDescriptions property. Set 'VariableNamingRule' to 'preserve' to use the original column headers as table variable names.
Warning: Column headers from the file were modified to make them valid MATLAB identifiers before creating variable names for the table. The original column headers are saved in the VariableDescriptions property. Set 'VariableNamingRule' to 'preserve' to use the original column headers as table variable names.
Warning: Column headers from the file were modified to make them valid MATLAB identifiers before creating variable names for the table. The original column headers are saved in the VariableDescriptions property. Set 'VariableNamingRule' to 'preserve' to use the original column headers as table variable names.
Warning: Column headers from the file were modified to make them valid MATLAB identifiers before creating variable names for the table. The original column headers are saved in the VariableDescriptions property. Set 'VariableNamingRule' to 'preserve' to use the original column headers as table variable names.
Отобразите NO2data
. Это имеет 24 переменных, хранящих демонстрационные измерения NO2, местоположения сайта, имена состояния, времена и много других данных.
NO2data
NO2data=11294497×24 table
StateCode CountyCode SiteNum ParameterCode POC Latitude Longitude Datum ParameterName DateLocal TimeLocal DateGMT TimeGMT SampleMeasurement UnitsOfMeasure MDL Uncertainty Qualifier MethodType MethodCode MethodName StateName CountyName DateOfLastChange
_________ __________ _______ _____________ ___ ________ _________ _______ ________________________ __________ _________ __________ _______ _________________ ___________________ ___ ___________ _________ __________ __________ __________________________________ _________ __________ ________________
4 1 7 42602 1 34.128 -109.31 "WGS84" "Nitrogen dioxide (NO2)" 1985-01-02 01:00 1985-01-02 08:00 0 "Parts per billion" 5 "" "" "Non-FRM" 14 "INSTRUMENTAL - CHEMILUMINESCENCE" "Arizona" "Apache" ""
4 1 7 42602 1 34.128 -109.31 "WGS84" "Nitrogen dioxide (NO2)" 1985-01-02 02:00 1985-01-02 09:00 0 "Parts per billion" 5 "" "" "Non-FRM" 14 "INSTRUMENTAL - CHEMILUMINESCENCE" "Arizona" "Apache" ""
4 1 7 42602 1 34.128 -109.31 "WGS84" "Nitrogen dioxide (NO2)" 1985-01-02 03:00 1985-01-02 10:00 0 "Parts per billion" 5 "" "" "Non-FRM" 14 "INSTRUMENTAL - CHEMILUMINESCENCE" "Arizona" "Apache" ""
4 1 7 42602 1 34.128 -109.31 "WGS84" "Nitrogen dioxide (NO2)" 1985-01-02 04:00 1985-01-02 11:00 0 "Parts per billion" 5 "" "" "Non-FRM" 14 "INSTRUMENTAL - CHEMILUMINESCENCE" "Arizona" "Apache" ""
4 1 7 42602 1 34.128 -109.31 "WGS84" "Nitrogen dioxide (NO2)" 1985-01-02 05:00 1985-01-02 12:00 0 "Parts per billion" 5 "" "" "Non-FRM" 14 "INSTRUMENTAL - CHEMILUMINESCENCE" "Arizona" "Apache" ""
4 1 7 42602 1 34.128 -109.31 "WGS84" "Nitrogen dioxide (NO2)" 1985-01-02 06:00 1985-01-02 13:00 0 "Parts per billion" 5 "" "" "Non-FRM" 14 "INSTRUMENTAL - CHEMILUMINESCENCE" "Arizona" "Apache" ""
4 1 7 42602 1 34.128 -109.31 "WGS84" "Nitrogen dioxide (NO2)" 1985-01-02 08:00 1985-01-02 15:00 0 "Parts per billion" 5 "" "" "Non-FRM" 14 "INSTRUMENTAL - CHEMILUMINESCENCE" "Arizona" "Apache" ""
4 1 7 42602 1 34.128 -109.31 "WGS84" "Nitrogen dioxide (NO2)" 1985-01-02 09:00 1985-01-02 16:00 0 "Parts per billion" 5 "" "" "Non-FRM" 14 "INSTRUMENTAL - CHEMILUMINESCENCE" "Arizona" "Apache" ""
4 1 7 42602 1 34.128 -109.31 "WGS84" "Nitrogen dioxide (NO2)" 1985-01-02 10:00 1985-01-02 17:00 0 "Parts per billion" 5 "" "" "Non-FRM" 14 "INSTRUMENTAL - CHEMILUMINESCENCE" "Arizona" "Apache" ""
4 1 7 42602 1 34.128 -109.31 "WGS84" "Nitrogen dioxide (NO2)" 1985-01-02 16:00 1985-01-02 23:00 1 "Parts per billion" 5 "" "" "Non-FRM" 14 "INSTRUMENTAL - CHEMILUMINESCENCE" "Arizona" "Apache" ""
4 1 7 42602 1 34.128 -109.31 "WGS84" "Nitrogen dioxide (NO2)" 1985-01-02 17:00 1985-01-03 00:00 1 "Parts per billion" 5 "" "" "Non-FRM" 14 "INSTRUMENTAL - CHEMILUMINESCENCE" "Arizona" "Apache" ""
4 1 7 42602 1 34.128 -109.31 "WGS84" "Nitrogen dioxide (NO2)" 1985-01-02 18:00 1985-01-03 01:00 1 "Parts per billion" 5 "" "" "Non-FRM" 14 "INSTRUMENTAL - CHEMILUMINESCENCE" "Arizona" "Apache" ""
4 1 7 42602 1 34.128 -109.31 "WGS84" "Nitrogen dioxide (NO2)" 1985-01-02 19:00 1985-01-03 02:00 0 "Parts per billion" 5 "" "" "Non-FRM" 14 "INSTRUMENTAL - CHEMILUMINESCENCE" "Arizona" "Apache" ""
4 1 7 42602 1 34.128 -109.31 "WGS84" "Nitrogen dioxide (NO2)" 1985-01-02 20:00 1985-01-03 03:00 0 "Parts per billion" 5 "" "" "Non-FRM" 14 "INSTRUMENTAL - CHEMILUMINESCENCE" "Arizona" "Apache" ""
4 1 7 42602 1 34.128 -109.31 "WGS84" "Nitrogen dioxide (NO2)" 1985-01-02 21:00 1985-01-03 04:00 0 "Parts per billion" 5 "" "" "Non-FRM" 14 "INSTRUMENTAL - CHEMILUMINESCENCE" "Arizona" "Apache" ""
4 1 7 42602 1 34.128 -109.31 "WGS84" "Nitrogen dioxide (NO2)" 1985-01-02 22:00 1985-01-03 05:00 0 "Parts per billion" 5 "" "" "Non-FRM" 14 "INSTRUMENTAL - CHEMILUMINESCENCE" "Arizona" "Apache" ""
⋮
Затем подготовьте NO2data
для анализа путем очистки данных. Очистка данных является процессом обнаружения и исправления (или удаление) части набора данных, которые или повреждены, неточны, или не важны. Можно также преобразовать табличные переменные так, чтобы у них были типы данных, которые могут быть более удобными для анализа, такими как categorical
или datetime
массивы.
Например, табличная переменная SampleMeasurement
имеет измерения концентрации NO2. Концентрации ниже предела обнаружения метода (MDL) ненадежны. Чтобы исключить их из анализа, найдите строки где SampleMeasurement
ниже MDL. Установите те элементы на NaN
.
NO2data.SampleMeasurement(NO2data.SampleMeasurement < NO2data.MDL) = NaN;
Составьте таблицу, которая содержит только подмножество переменных, которые относятся к этому примеру. Можно использовать табличное индексирование, чтобы составить таблицу, которая имеет все строки (заданный двоеточием) и только те переменные, которые вы называете.
NO2data = NO2data(:,["DateLocal","TimeLocal","SampleMeasurement","StateName","CountyName","SiteNum","Latitude","Longitude"])
NO2data=11294497×8 table
DateLocal TimeLocal SampleMeasurement StateName CountyName SiteNum Latitude Longitude
__________ _________ _________________ _________ __________ _______ ________ _________
1985-01-02 01:00 NaN "Arizona" "Apache" 7 34.128 -109.31
1985-01-02 02:00 NaN "Arizona" "Apache" 7 34.128 -109.31
1985-01-02 03:00 NaN "Arizona" "Apache" 7 34.128 -109.31
1985-01-02 04:00 NaN "Arizona" "Apache" 7 34.128 -109.31
1985-01-02 05:00 NaN "Arizona" "Apache" 7 34.128 -109.31
1985-01-02 06:00 NaN "Arizona" "Apache" 7 34.128 -109.31
1985-01-02 08:00 NaN "Arizona" "Apache" 7 34.128 -109.31
1985-01-02 09:00 NaN "Arizona" "Apache" 7 34.128 -109.31
1985-01-02 10:00 NaN "Arizona" "Apache" 7 34.128 -109.31
1985-01-02 16:00 NaN "Arizona" "Apache" 7 34.128 -109.31
1985-01-02 17:00 NaN "Arizona" "Apache" 7 34.128 -109.31
1985-01-02 18:00 NaN "Arizona" "Apache" 7 34.128 -109.31
1985-01-02 19:00 NaN "Arizona" "Apache" 7 34.128 -109.31
1985-01-02 20:00 NaN "Arizona" "Apache" 7 34.128 -109.31
1985-01-02 21:00 NaN "Arizona" "Apache" 7 34.128 -109.31
1985-01-02 22:00 NaN "Arizona" "Apache" 7 34.128 -109.31
⋮
Объедините локальную дату и время в одну метку времени. Новый Timestamp
табличной переменной является datetime
массив. Удалите DateLocal
и TimeLocal
переменные, потому что они теперь избыточны.
NO2data.Timestamp = NO2data.DateLocal + NO2data.TimeLocal;
NO2data.Timestamp.Format = "default";
NO2data.DateLocal = [];
NO2data.TimeLocal = [];
Чтобы категоризировать данные позже, преобразуйте StateName
и CountyName
переменные к categorical
массивы, сначала стирая пробелы из имен. Существуют зафиксированные наборы состояния и имен графства в данных, которые делают удобным создать категории на основе их.
NO2data.StateName = categorical(erase(NO2data.StateName," ")); NO2data.CountyName = categorical(erase(NO2data.CountyName," "));
Переименуйте SampleMeasurement
переменная к MeasuredNO2
. Один способ переименовать табличные переменные при помощи VariableNames
свойство таблицы.
NO2data.Properties.VariableNames("SampleMeasurement") = "MeasuredNO2";
Преобразуйте NO2data
к расписанию. datetime
значения в Timestamp
теперь времена строки, которые помечают строки расписания. Даты и времена исходной таблицы были в отдельных переменных. Чтобы поместить данные как эти данные в расписание, более удобно импортировать данные как таблицу, и затем объединить разделять переменные даты и времени в один datetime
переменная. Затем преобразуйте модифицированную таблицу при помощи table2timetable
функция.
NO2data = table2timetable(NO2data)
NO2data=11294497×6 timetable
Timestamp MeasuredNO2 StateName CountyName SiteNum Latitude Longitude
____________________ ___________ _________ __________ _______ ________ _________
02-Jan-1985 01:00:00 NaN Arizona Apache 7 34.128 -109.31
02-Jan-1985 02:00:00 NaN Arizona Apache 7 34.128 -109.31
02-Jan-1985 03:00:00 NaN Arizona Apache 7 34.128 -109.31
02-Jan-1985 04:00:00 NaN Arizona Apache 7 34.128 -109.31
02-Jan-1985 05:00:00 NaN Arizona Apache 7 34.128 -109.31
02-Jan-1985 06:00:00 NaN Arizona Apache 7 34.128 -109.31
02-Jan-1985 08:00:00 NaN Arizona Apache 7 34.128 -109.31
02-Jan-1985 09:00:00 NaN Arizona Apache 7 34.128 -109.31
02-Jan-1985 10:00:00 NaN Arizona Apache 7 34.128 -109.31
02-Jan-1985 16:00:00 NaN Arizona Apache 7 34.128 -109.31
02-Jan-1985 17:00:00 NaN Arizona Apache 7 34.128 -109.31
02-Jan-1985 18:00:00 NaN Arizona Apache 7 34.128 -109.31
02-Jan-1985 19:00:00 NaN Arizona Apache 7 34.128 -109.31
02-Jan-1985 20:00:00 NaN Arizona Apache 7 34.128 -109.31
02-Jan-1985 21:00:00 NaN Arizona Apache 7 34.128 -109.31
02-Jan-1985 22:00:00 NaN Arizona Apache 7 34.128 -109.31
⋮
Учитывая размер расписания, очевидно, что существует много тысяч почасовых измерений в каждом состоянии. Один способ вычислить количество измерений для каждого состояния состоит в том, чтобы суммировать количество строк, которые имеют конкретное состояние как категорию. Например, вычислите количество измерений для Аляски, и затем для Аризоны.
numAlaska = sum(NO2data.StateName=="Alaska")
numAlaska = 7071
numArizona = sum(NO2data.StateName=="Arizona")
numArizona = 142793
Это утомительно, чтобы выполнить это вычисление многократно или сохранить промежуточные результаты во многих переменных или подтаблицах. Вместо этого MATLAB обеспечивает функции, что данные группы в таблицах и применяют функции к каждой оперативной группе. Например, используйте groupcounts
функционируйте, чтобы сгруппировать данные в NO2data
по состояниям в StateName
и считайте строки в каждой группе. Вместо того, чтобы вызвать sum
много раз вызовите groupcounts
однажды.
NO2counts = groupcounts(NO2data,"StateName")
NO2counts=42×3 table
StateName GroupCount Percent
__________________ __________ ________
Alaska 7071 0.062606
Arizona 1.4279e+05 1.2643
Arkansas 40723 0.36056
California 3.4015e+06 30.116
Colorado 2.2394e+05 1.9827
Connecticut 1.2615e+05 1.1169
Delaware 75185 0.66568
DistrictOfColumbia 74988 0.66393
Florida 2.1172e+05 1.8746
Georgia 74971 0.66378
Illinois 4.407e+05 3.9019
Indiana 3.3058e+05 2.927
Kansas 10625 0.094072
Kentucky 2.8789e+05 2.549
Louisiana 1.6914e+05 1.4976
Maryland 1.2565e+05 1.1125
⋮
Чтобы отсортировать результаты в таблице или расписании, используйте sortrows
функция. Сортировка gc
на его GroupCount
переменная от самого высокого до самого низкого значения.
sortedNO2counts = sortrows(NO2counts,"GroupCount","descend")
sortedNO2counts=42×3 table
StateName GroupCount Percent
_____________ __________ _______
California 3.4015e+06 30.116
Pennsylvania 8.2796e+05 7.3307
Missouri 4.8609e+05 4.3038
Texas 4.7163e+05 4.1758
Illinois 4.407e+05 3.9019
Virginia 3.4464e+05 3.0514
Massachusetts 3.3833e+05 2.9956
Indiana 3.3058e+05 2.927
NewJersey 3.2862e+05 2.9095
Montana 2.8886e+05 2.5576
Kentucky 2.8789e+05 2.549
NorthDakota 2.7822e+05 2.4633
Ohio 2.7478e+05 2.4329
Oklahoma 2.4477e+05 2.1672
NewYork 2.3126e+05 2.0475
Wisconsin 2.3079e+05 2.0434
⋮
Чтобы вычислить другую статистику, используйте groupsummary
функция. Например, найдите максимальную концентрацию NO2 измеренной в каждом состоянии.
NO2max = groupsummary(NO2data,"StateName","max","MeasuredNO2"); sortedNO2max = sortrows(NO2max,"max_MeasuredNO2","descend")
sortedNO2max=42×3 table
StateName GroupCount max_MeasuredNO2
____________ __________ _______________
Nevada 64821 743.5
California 3.4015e+06 540
Indiana 3.3058e+05 500
Colorado 2.2394e+05 462
NewYork 2.3126e+05 451
Tennessee 1.9592e+05 410
Ohio 2.7478e+05 403
Kentucky 2.8789e+05 368
Pennsylvania 8.2796e+05 357
Minnesota 90293 328
Missouri 4.8609e+05 326
Connecticut 1.2615e+05 319
Oklahoma 2.4477e+05 318
NewHampshire 25598 312
Delaware 75185 300
Louisiana 1.6914e+05 286
⋮
Как альтернатива, можно использовать varfun
функция с "GroupingVariables"
аргумент значения имени для сгруппированных вычислений. Но groupsummary
функция более проста и выполняет большинство тех же сгруппированных вычислений как varfun
.
Функционирует, такие как groupcounts
, groupsummary
, и varfun
работайте одинаково хорошо над таблицами и расписаниями. Но расписания также обеспечивают retime
и synchronize
функции, которые могут выполнить основанные на времени вычисления при помощи их времен строки. Можно сгруппировать данные о расписании ко времени и выполнить вычисления на данных в периодах времени. retime
функция является наилучшим вариантом для таких случаев.
Например, сгруппируйте данные в NO2data
в ежегодные периоды времени. Найдите максимальную концентрацию NO2 в течение каждого года.
yearlyMaxNO2 = retime(NO2data(:,"MeasuredNO2"),"yearly","max")
yearlyMaxNO2=5×1 timetable
Timestamp MeasuredNO2
___________ ___________
01-Jan-1985 407.3
01-Jan-1986 500
01-Jan-1987 497
01-Jan-1988 743.5
01-Jan-1989 462
Это вычисление полезно, если у вас есть временные ряды. В этом случае, данные в MeasuredNO2
переменная прибывает из нескольких сайтов. Более полезный анализ должен сгруппироваться и к году и к сайту.
EPA США имеет два Национальных стандарта качества воздуха (NAAQS) для NO2. Местоположение не в соответствии с NAAQS если также:
Ежегодное среднее значение превышает 53 части на миллиард
98-я процентиль 1-часовых ежедневных максимальных концентраций, усредненных более чем 3 года, превышает 100 частей на миллиард (ppb)
Анализируйте данные в NO2data
найти местоположения, которые не являются в соответствии с первым стандартом, где ежегодное среднее значение превысило 53 части на миллиард. Существует три различных способа приблизиться к этому анализу. То, что имеют общего три подхода, - то, что можно сгруппировать данные и ко времени и к сайту, чтобы вычислить ежегодные средние значения сайтом.
Чтобы найти сайты, которые не выполняют NAAQS, вычислите среднее значение для каждого сайта на каждый год. В то время как NO2data
не включает уникальные идентификаторы для сайтов, можно использовать имена состояния, имена графства и числа сайта вместе, чтобы однозначно определить сайты качества воздуха.
Времена строки NO2data
datetime
значения. Извлеките их компоненты года и добавьте новую переменную в NO2data
названный Year
. Вычислите ежегодные средние значения для каждого сайта при помощи groupsummary
с StateName
, CountyName
, SiteNum
, и Year
как сгруппированные переменные.
NO2data.Year = year(NO2data.Timestamp); meanNO2bySite = groupsummary(NO2data,["StateName","CountyName","SiteNum","Year"],"mean","MeasuredNO2")
meanNO2bySite=1585×6 table
StateName CountyName SiteNum Year GroupCount mean_MeasuredNO2
_________ ______________ _______ ____ __________ ________________
Alaska KenaiPeninsula 1004 1989 7071 9.7986
Arizona Apache 7 1985 5920 7.75
Arizona Apache 7 1986 2059 6.7857
Arizona Apache 7 1988 1981 7.1391
Arizona Apache 7 1989 3861 6.9146
Arizona Apache 8 1985 6007 5.9138
Arizona Apache 8 1986 1999 6.1875
Arizona Apache 8 1988 1924 6.3333
Arizona Apache 8 1989 3771 7.2619
Arizona Apache 9 1985 5852 6.7021
Arizona Apache 9 1986 1942 7.6579
Arizona Apache 9 1988 2068 8.5333
Arizona Apache 9 1989 3813 6.9604
Arizona Apache 10 1985 5905 8.4406
Arizona Apache 10 1986 2009 7.3333
Arizona Apache 10 1988 2117 7.2381
⋮
Чтобы найти сайты, которые имеют самый высокий средний NO2, отсортируйте расписание.
sortedMeanNO2bySite = sortrows(meanNO2bySite,"mean_MeasuredNO2","descend")
sortedMeanNO2bySite=1585×6 table
StateName CountyName SiteNum Year GroupCount mean_MeasuredNO2
__________ __________ _______ ____ __________ ________________
California LosAngeles 1103 1988 8272 61.526
California LosAngeles 1103 1986 8083 61.266
California LosAngeles 1103 1985 8217 59.965
California LosAngeles 1105 1985 1194 58.399
California LosAngeles 1002 1986 8084 57.422
California LosAngeles 1002 1985 8159 57.401
California LosAngeles 1701 1989 8299 57.118
California LosAngeles 1701 1986 8229 55.924
California LosAngeles 1103 1989 8135 55.335
California LosAngeles 1701 1987 8284 54.864
California LosAngeles 1601 1989 8201 54.685
California LosAngeles 1701 1985 8341 54.147
California LosAngeles 1103 1987 8150 54.092
California LosAngeles 1601 1988 7546 53.828
California LosAngeles 1601 1985 8307 53.377
California LosAngeles 2005 1989 8225 53.174
⋮
Можно составить таблицу, которая включает только те сайты чрезмерные 53 части на миллиард при помощи логической индексации. Создайте логический вектор, который указывает на строки где mean_MeasuredNO2
больше 53. Используйте тот вектор в качестве индекса, чтобы получить соответствие со строками от meanNO2bySite
.
exceeded53ppb = meanNO2bySite.mean_MeasuredNO2 > 53; sitesExceed53ppb = meanNO2bySite(exceeded53ppb,:)
sitesExceed53ppb=19×6 table
StateName CountyName SiteNum Year GroupCount mean_MeasuredNO2
__________ __________ _______ ____ __________ ________________
California LosAngeles 2 1988 8278 53.17
California LosAngeles 1002 1985 8159 57.401
California LosAngeles 1002 1986 8084 57.422
California LosAngeles 1002 1988 8176 53.004
California LosAngeles 1103 1985 8217 59.965
California LosAngeles 1103 1986 8083 61.266
California LosAngeles 1103 1987 8150 54.092
California LosAngeles 1103 1988 8272 61.526
California LosAngeles 1103 1989 8135 55.335
California LosAngeles 1105 1985 1194 58.399
California LosAngeles 1601 1985 8307 53.377
California LosAngeles 1601 1988 7546 53.828
California LosAngeles 1601 1989 8201 54.685
California LosAngeles 1701 1985 8341 54.147
California LosAngeles 1701 1986 8229 55.924
California LosAngeles 1701 1987 8284 54.864
⋮
Иногда поворот или реорганизация статистики, вычисленной от табличных данных, облегчают видеть и анализировать результаты, особенно когда вы смотрите на отношение между двумя сгруппированными переменными. Например, можно создать сводную таблицу для ежегодного среднего NO2 сайтом. Путем поворота можно составить таблицу, где каждый сайт перечисляет ежегодный средний NO2 в своей собственной табличной переменной, показывая отношение между годом и сайтом. В MATLAB можно создать сводные таблицы при помощи stack
и unstack
функции, которые складывают и распаковывают табличные переменные в более высокие или более широкие форматы.
Осложнением в этом случае является тот NO2data
имеет три сгруппированных переменные, которые вместе однозначно определяют сайты: утвердите имя, имя графства и номер сайта. Чтобы создать сводную таблицу, сначала объедините эти три табличных переменные в одну переменную. Преобразуйте StateName
, CountyName
, и SiteNum
в строки и добавляют их вместе. Замените пробелы и тире с символами нижнего подчеркивания, и периоды стирания и круглые скобки. Имена в SiteID
уникальные идентификаторы сайта.
siteID = string(NO2data.StateName) + "_" + string(NO2data.CountyName) + "_" + string(NO2data.SiteNum); siteID = replace(siteID,[" ","-"],"_"); siteID = erase(siteID,[".","(",")"]);
Добавьте SiteID
к NO2data
как новая табличная переменная. Вычислите ежегодные средние значения при помощи groupsummary
, но на этот раз используйте SiteID
как сгруппированная переменная.
NO2data.SiteID = categorical(siteID); meanNO2bySiteID = groupsummary(NO2data,["SiteID","Year"],"mean","MeasuredNO2")
meanNO2bySiteID=1585×4 table
SiteID Year GroupCount mean_MeasuredNO2
__________________________ ____ __________ ________________
Alaska_KenaiPeninsula_1004 1989 7071 9.7986
Arizona_Apache_10 1985 5905 8.4406
Arizona_Apache_10 1986 2009 7.3333
Arizona_Apache_10 1988 2117 7.2381
Arizona_Apache_10 1989 4282 6.9929
Arizona_Apache_11 1985 5262 8.4264
Arizona_Apache_11 1986 1960 7.587
Arizona_Apache_11 1988 2063 8.0471
Arizona_Apache_11 1989 4266 7.5714
Arizona_Apache_7 1985 5920 7.75
Arizona_Apache_7 1986 2059 6.7857
Arizona_Apache_7 1988 1981 7.1391
Arizona_Apache_7 1989 3861 6.9146
Arizona_Apache_8 1985 6007 5.9138
Arizona_Apache_8 1986 1999 6.1875
Arizona_Apache_8 1988 1924 6.3333
⋮
Чтобы создать сводную таблицу, используйте unstack
функция. Каждый уникальный сайт в SiteID
переменная meanNO2bySiteID
становится именем отдельной табличной переменной в выходе, pivotedMeanNO2bySiteID
, и сопоставили ежегодные средние значения с тем сайтом. Эта распаковывающая операция состоит в том, как можно создать сводную таблицу в MATLAB.
pivotedMeanNO2bySiteID = unstack(meanNO2bySiteID,"mean_MeasuredNO2","SiteID","GroupingVariable","Year")
pivotedMeanNO2bySiteID=5×443 table
Year Alaska_KenaiPeninsula_1004 Arizona_Apache_10 Arizona_Apache_11 Arizona_Apache_7 Arizona_Apache_8 Arizona_Apache_9 Arizona_Maricopa_3002 Arizona_Maricopa_3003 Arizona_Pima_1011 Arizona_Pima_19 Arizona_Pima_2 Arkansas_Pulaski_1002 California_Alameda_1001 California_Alameda_3 California_Butte_2 California_ContraCosta_1002 California_ContraCosta_2 California_ContraCosta_3 California_ContraCosta_3001 California_ElDorado_9 California_Fresno_241 California_Fresno_242 California_Fresno_5 California_Fresno_6 California_Fresno_7 California_Kern_232 California_Kern_4 California_Kern_5001 California_Kern_6 California_Kern_6001 California_Kern_7 California_LosAngeles_1002 California_LosAngeles_1103 California_LosAngeles_1105 California_LosAngeles_113 California_LosAngeles_1201 California_LosAngeles_1301 California_LosAngeles_16 California_LosAngeles_1601 California_LosAngeles_1701 California_LosAngeles_2 California_LosAngeles_2005 California_LosAngeles_2401 California_LosAngeles_4002 California_LosAngeles_4101 California_LosAngeles_5001 California_LosAngeles_6002 California_LosAngeles_7001 California_LosAngeles_8001 California_Marin_1 California_Mendocino_7 California_Monterey_1002 California_Napa_3 California_Orange_1 California_Orange_1002 California_Orange_5001 California_Plumas_1001 California_Riverside_5001 California_Riverside_6001 California_Riverside_8001 California_Sacramento_1 California_Sacramento_10 California_Sacramento_1001 California_Sacramento_2 California_Sacramento_5002 California_Sacramento_6 California_SanBernardino_1 California_SanBernardino_1004 California_SanBernardino_12 California_SanBernardino_2002 California_SanBernardino_3 California_SanBernardino_4001 California_SanBernardino_6 California_SanBernardino_7002 California_SanBernardino_9004 California_SanDiego_1 California_SanDiego_1002 California_SanDiego_1004 California_SanDiego_1006 California_SanDiego_1007 California_SanDiego_3 California_SanDiego_5 California_SanDiego_6 California_SanFrancisco_4 California_SanFrancisco_5 California_SanJoaquin_1002 California_SanLuisObispo_1004 California_SanLuisObispo_2001 California_SanLuisObispo_2002 California_SanLuisObispo_4001 California_SanMateo_1001 California_SantaBarbara_10 California_SantaBarbara_1010 California_SantaBarbara_1011 California_SantaBarbara_1012 California_SantaBarbara_1013 California_SantaBarbara_1014 California_SantaBarbara_1015 California_SantaBarbara_1016 California_SantaBarbara_1017 California_SantaBarbara_1018 California_SantaBarbara_1019 California_SantaBarbara_1020 California_SantaBarbara_1021 California_SantaBarbara_1025 California_SantaBarbara_1026 California_SantaBarbara_1027 California_SantaBarbara_1030 California_SantaBarbara_2002 California_SantaBarbara_2004 California_SantaBarbara_2005 California_SantaBarbara_4002 California_SantaBarbara_4003 California_SantaBarbara_4004 California_SantaBarbara_5001 California_SantaBarbara_8 California_SantaBarbara_9 California_SantaClara_2004 California_SantaCruz_3 California_Shasta_1001 California_Shasta_6 California_Solano_4 California_Sonoma_3 California_Stanislaus_1003 California_Stanislaus_1004 California_Stanislaus_5 California_Tulare_2002 California_Ventura_1003 California_Ventura_2002 California_Ventura_2003 California_Ventura_3001 California_Ventura_5 California_Ventura_6 California_Ventura_7001 Colorado_Adams_3001 Colorado_Arapahoe_1002 Colorado_Arapahoe_3 Colorado_Denver_2 Colorado_ElPaso_4 Colorado_ElPaso_6001 Colorado_ElPaso_6003 Colorado_ElPaso_6004 Colorado_ElPaso_6005 Colorado_ElPaso_6006 Colorado_ElPaso_6009 Colorado_ElPaso_6011 Colorado_ElPaso_6013 Connecticut_Fairfield_113 Connecticut_Fairfield_123 Connecticut_Hartford_1003 Connecticut_NewHaven_1123 Delaware_NewCastle_2002 Delaware_NewCastle_3001 DistrictOfColumbia_DistrictofColumbia_17 DistrictOfColumbia_DistrictofColumbia_25 Florida_Duval_32 Florida_Duval_70 Florida_Hillsborough_1052 Florida_Hillsborough_1055 Florida_Miami_Dade_27 Florida_Miami_Dade_4002 Florida_Orange_2002 Florida_PalmBeach_1004 Florida_PalmBeach_1101 Florida_Pinellas_18 Georgia_DeKalb_2 Georgia_Fulton_48 Illinois_Cook_1002 Illinois_Cook_1102 Illinois_Cook_1601 Illinois_Cook_3101 Illinois_Cook_3102 Illinois_Cook_3601 Illinois_Cook_37 Illinois_Cook_39 Illinois_Cook_40 Illinois_Cook_4002 Illinois_Cook_4003 Illinois_Cook_4004 Illinois_Cook_4005 Illinois_Cook_45 Illinois_Cook_53 Illinois_Cook_63 Illinois_DuPage_1003 Illinois_SaintClair_10 Indiana_Allen_6 Indiana_Clark_3 Indiana_Jasper_2 Indiana_Jasper_3 Indiana_Jefferson_1 Indiana_Knox_4 Indiana_Lake_1016 Indiana_Marion_30 Indiana_Marion_57 Indiana_Marion_65 Indiana_Marion_70 Indiana_Porter_15 Indiana_Porter_16 Indiana_Posey_1 Indiana_Posey_1002 Indiana_Posey_2 Indiana_Spencer_2 Indiana_Spencer_6 Indiana_Sullivan_1 Indiana_Tippecanoe_1001 Indiana_Vanderburgh_1001 Indiana_Vanderburgh_1002 Indiana_Vigo_1012 Kansas_Wyandotte_1 Kentucky_Boone_7 Kentucky_Boyd_10 Kentucky_Campbell_1001 Kentucky_Daviess_5 Kentucky_Fayette_12 Kentucky_Henderson_13 Kentucky_Jefferson_1020 Kentucky_McCracken_1024 Kentucky_Trigg_1 Louisiana_Calcasieu_100 Louisiana_EastBatonRouge_4 Louisiana_Jefferson_1001 Louisiana_Orleans_12 Louisiana_WestBatonRouge_1 Maryland_AnneArundel_19 Maryland_BaltimoreCity_40 Maryland_Baltimore_10 Maryland_Baltimore_3001 Massachusetts_Bristol_1004 Massachusetts_Essex_5 Massachusetts_Hampden_15 Massachusetts_Hampden_16 Massachusetts_Hampden_17 Massachusetts_Hampshire_4002 Massachusetts_Norfolk_8 Massachusetts_Norfolk_9 Massachusetts_Suffolk_1003 Massachusetts_Suffolk_2 Massachusetts_Suffolk_21 Massachusetts_Suffolk_35 Massachusetts_Suffolk_36 Massachusetts_Suffolk_37 Massachusetts_Worcester_20 Michigan_Dickinson_901 Michigan_Dickinson_902 Michigan_Kent_20 Michigan_Midland_940 Michigan_Midland_941 Michigan_Oakland_902 Michigan_Wayne_16 Michigan_Wayne_19 Michigan_Wayne_29 Minnesota_Carlton_6316 Minnesota_Hennepin_50 Minnesota_Hennepin_953 Minnesota_Ramsey_1 Minnesota_Ramsey_3 Minnesota_Ramsey_864 Minnesota_Wright_7 Missouri_Atchison_1 Missouri_Atchison_2 Missouri_Clay_25 Missouri_Clay_5 Missouri_Greene_14 Missouri_Greene_36 Missouri_Jackson_33 Missouri_Platte_23 Missouri_SaintCharles_1002 Missouri_SaintLouis_1 Missouri_SaintLouis_3001 Missouri_SaintLouis_5001 Missouri_SaintLouis_6 Missouri_SaintLouis_7001 Missouri_StLouisCity_72 Missouri_StLouisCity_80 Montana_Missoula_34 Montana_Rosebud_700 Montana_Rosebud_701 Montana_Rosebud_702 Montana_Rosebud_704 Montana_Rosebud_760 Montana_Rosebud_761 Montana_Rosebud_762 Nevada_Clark_1001 Nevada_Clark_16 Nevada_Clark_557 Nevada_Washoe_15 Nevada_Washoe_16 NewHampshire_Hillsborough_16 NewJersey_Bergen_1 NewJersey_Camden_3 NewJersey_Essex_1003 NewJersey_Essex_11 NewJersey_Hudson_6 NewJersey_Morris_3001 NewJersey_Union_4 NewJersey_Union_5001 NewMexico_Bernalillo_15 NewMexico_Bernalillo_23 NewMexico_Catron_1 NewMexico_Eddy_3 NewMexico_SanJuan_14 NewYork_Bronx_74 NewYork_Erie_2 NewYork_Erie_5 NewYork_Essex_5 NewYork_Nassau_5 NewYork_NewYork_10 NewYork_NewYork_56 NewYork_NewYork_63 NorthCarolina_Forsyth_22 NorthCarolina_Forsyth_7 NorthCarolina_Mecklenburg_34 NorthCarolina_Wake_14 NorthDakota_Burke_1 NorthDakota_Dunn_3 NorthDakota_Mercer_1 NorthDakota_Mercer_101 NorthDakota_Mercer_102 NorthDakota_Mercer_103 NorthDakota_Mercer_104 NorthDakota_Oliver_101 NorthDakota_Oliver_2 Ohio_Cuyahoga_2003 Ohio_Cuyahoga_33 Ohio_Cuyahoga_43 Ohio_Franklin_4 Ohio_Hamilton_1013 Ohio_Hamilton_35 Ohio_Hamilton_4002 Ohio_Jefferson_1012 Ohio_Montgomery_29 Ohio_Pickaway_1 Ohio_Pickaway_1001 Ohio_Stark_16 Oklahoma_Cleveland_44 Oklahoma_Cleveland_49 Oklahoma_Kay_600 Oklahoma_Muskogee_167 Oklahoma_Oklahoma_1037 Oklahoma_Oklahoma_33 Oklahoma_Tulsa_127 Oklahoma_Tulsa_174 Oklahoma_Tulsa_191 Oregon_Multnomah_80 Pennsylvania_Allegheny_3 Pennsylvania_Allegheny_31 Pennsylvania_Allegheny_8 Pennsylvania_Beaver_14 Pennsylvania_Berks_9 Pennsylvania_Blair_801 Pennsylvania_Bucks_12 Pennsylvania_Cambria_11 Pennsylvania_Dauphin_401 Pennsylvania_Delaware_2 Pennsylvania_Erie_10 Pennsylvania_Erie_3 Pennsylvania_Lackawanna_2006 Pennsylvania_Lancaster_7 Pennsylvania_Lawrence_15 Pennsylvania_Lehigh_4 Pennsylvania_Luzerne_1101 Pennsylvania_Montgomery_13 Pennsylvania_Northampton_17 Pennsylvania_Perry_301 Pennsylvania_Philadelphia_22 Pennsylvania_Philadelphia_23 Pennsylvania_Philadelphia_29 Pennsylvania_Philadelphia_4 Pennsylvania_Philadelphia_47 Pennsylvania_Washington_200 Pennsylvania_Washington_5 Pennsylvania_York_8 RhodeIsland_Providence_12 RhodeIsland_Providence_19 SouthCarolina_Aiken_3 SouthCarolina_Barnwell_1 SouthCarolina_Lexington_5 SouthCarolina_Richland_1006 Tennessee_Bradley_102 Tennessee_Davidson_10 Tennessee_Davidson_11 Tennessee_Giles_1 Tennessee_Maury_106 Tennessee_McMinn_101 Tennessee_Rutherford_101 Tennessee_Shelby_24 Tennessee_Sullivan_7 Tennessee_Sullivan_9 Tennessee_Williamson_103 Texas_Bexar_36 Texas_Brazoria_1003 Texas_Dallas_44 Texas_Dallas_45 Texas_Dallas_55 Texas_Dallas_69 Texas_ElPaso_27 Texas_ElPaso_37 Texas_Galveston_1002 Texas_Gregg_1 Texas_Harris_1034 Texas_Harris_1035 Texas_Harris_1037 Texas_Harris_24 Texas_Harris_26 Texas_Harris_47 Texas_Harris_7001 Texas_Jefferson_9 Texas_Orange_1001 Texas_Tarrant_1002 Texas_Tarrant_1003 Texas_Travis_17 Utah_Davis_1 Utah_SaltLake_3001 Utah_Utah_2 Utah_Weber_1 Vermont_Chittenden_3 Vermont_Rutland_2 Virginia_AlexandriaCity_9 Virginia_Arlington_20 Virginia_FairfaxCity_5 Virginia_Fairfax_1004 Virginia_Fairfax_18 Virginia_Fairfax_5001 Virginia_Henrico_14 Virginia_NorfolkCity_23 Virginia_RichmondCity_21 Virginia_Roanoke_1004 Virginia_VirginiaBeachCity_7 Washington_King_80 Washington_King_82 WestVirginia_Cabell_6 WestVirginia_Greenbrier_1 WestVirginia_Hancock_1004 WestVirginia_Kanawha_4 WestVirginia_Ohio_7 Wisconsin_Columbia_8 Wisconsin_Kenosha_1001 Wisconsin_Kenosha_16 Wisconsin_Milwaukee_41 Wisconsin_Milwaukee_80 Wisconsin_Rock_1002 Wisconsin_Rock_1004
____ __________________________ _________________ _________________ ________________ ________________ ________________ _____________________ _____________________ _________________ _______________ ______________ _____________________ _______________________ ____________________ __________________ ___________________________ ________________________ ________________________ ___________________________ _____________________ _____________________ _____________________ ___________________ ___________________ ___________________ ___________________ _________________ ____________________ _________________ ____________________ _________________ __________________________ __________________________ __________________________ _________________________ __________________________ __________________________ ________________________ __________________________ __________________________ _______________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________ ______________________ ________________________ _________________ ___________________ ______________________ ______________________ ______________________ _________________________ _________________________ _________________________ _______________________ ________________________ __________________________ _______________________ __________________________ _______________________ __________________________ _____________________________ ___________________________ _____________________________ __________________________ _____________________________ __________________________ _____________________________ _____________________________ _____________________ ________________________ ________________________ ________________________ ________________________ _____________________ _____________________ _____________________ _________________________ _________________________ __________________________ _____________________________ _____________________________ _____________________________ _____________________________ ________________________ __________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ _________________________ _________________________ __________________________ ______________________ ______________________ ___________________ ___________________ ___________________ __________________________ __________________________ _______________________ ______________________ _______________________ _______________________ _______________________ _______________________ ____________________ ____________________ _______________________ ___________________ ______________________ ___________________ _________________ _________________ ____________________ ____________________ ____________________ ____________________ ____________________ ____________________ ____________________ ____________________ _________________________ _________________________ _________________________ _________________________ _______________________ _______________________ ________________________________________ ________________________________________ ________________ ________________ _________________________ _________________________ _____________________ _______________________ ___________________ ______________________ ______________________ ___________________ ________________ _________________ __________________ __________________ __________________ __________________ __________________ __________________ ________________ ________________ ________________ __________________ __________________ __________________ __________________ ________________ ________________ ________________ ____________________ ______________________ _______________ _______________ ________________ ________________ ___________________ ______________ _________________ _________________ _________________ _________________ _________________ _________________ _________________ _______________ __________________ _______________ _________________ _________________ __________________ _______________________ ________________________ ________________________ _________________ __________________ ________________ ________________ ______________________ __________________ ___________________ _____________________ _______________________ _______________________ ________________ _______________________ __________________________ ________________________ ____________________ __________________________ _______________________ _________________________ _____________________ _______________________ __________________________ _____________________ ________________________ ________________________ ________________________ ____________________________ _______________________ _______________________ __________________________ _______________________ ________________________ ________________________ ________________________ ________________________ __________________________ ______________________ ______________________ ________________ ____________________ ____________________ ____________________ _________________ _________________ _________________ ______________________ _____________________ ______________________ __________________ __________________ ____________________ __________________ ___________________ ___________________ ________________ _______________ __________________ __________________ ___________________ __________________ __________________________ _____________________ ________________________ ________________________ _____________________ ________________________ _______________________ _______________________ ___________________ ___________________ ___________________ ___________________ ___________________ ___________________ ___________________ ___________________ _________________ _______________ ________________ ________________ ________________ ____________________________ __________________ __________________ ____________________ __________________ __________________ _____________________ _________________ ____________________ _______________________ _______________________ __________________ ________________ ____________________ ________________ ______________ ______________ _______________ ________________ __________________ __________________ __________________ ________________________ _______________________ ____________________________ _____________________ ___________________ __________________ ____________________ ______________________ ______________________ ______________________ ______________________ ______________________ ____________________ __________________ ________________ ________________ _______________ __________________ ________________ __________________ ___________________ __________________ _______________ __________________ _____________ _____________________ _____________________ ________________ _____________________ ______________________ ____________________ __________________ __________________ __________________ ___________________ ________________________ _________________________ ________________________ ______________________ ____________________ ______________________ _____________________ _______________________ ________________________ _______________________ ____________________ ___________________ ____________________________ ________________________ ________________________ _____________________ _________________________ __________________________ ___________________________ ______________________ ____________________________ ____________________________ ____________________________ ___________________________ ____________________________ ___________________________ _________________________ ___________________ _________________________ _________________________ _____________________ ________________________ _________________________ ___________________________ _____________________ _____________________ _____________________ _________________ ___________________ ____________________ ________________________ ___________________ ____________________ ____________________ ________________________ ______________ ___________________ _______________ _______________ _______________ _______________ _______________ _______________ ____________________ _____________ _________________ _________________ _________________ _______________ _______________ _______________ _________________ _________________ _________________ __________________ __________________ _______________ ____________ __________________ ___________ ____________ ____________________ _________________ _________________________ _____________________ ______________________ _____________________ ___________________ _____________________ ___________________ _______________________ ________________________ _____________________ ____________________________ __________________ __________________ _____________________ _________________________ _________________________ ______________________ ___________________ ____________________ ______________________ ____________________ ______________________ ______________________ ___________________ ___________________
1989 9.7986 6.9929 7.5714 6.9146 7.2619 6.9604 NaN NaN 19.756 25.689 27.227 12.066 26.196 22.652 16.322 17.069 23.601 23.539 20.121 14.488 17.632 20.123 32.092 NaN 25.63 21.521 33.682 13.708 NaN 22.502 17.431 51.026 55.335 NaN 33.294 39.365 46.157 39.372 54.685 57.118 51.135 53.174 44.575 42.93 29.629 39.111 37.877 19.853 NaN 22.555 NaN 14.988 18.075 47.195 37.19 43.02 NaN 24.132 32.392 37.062 20.855 25.009 18.622 17.045 17.725 25.017 26.622 44.851 13.684 37.511 NaN 19.918 16.094 NaN 41.653 27.655 32.466 37.276 18.508 35.96 30.693 27.044 27.493 NaN 26.059 25.598 11.694 16.023 17.585 13.495 24.317 27.267 12.192 6.8022 7.4621 6.0716 6.024 9.3787 9.406 11.892 9.7051 9.7773 18.279 9.1268 9.2821 8.3069 9.3139 7.2573 18.54 14.527 NaN NaN 6.433 6.6575 NaN 16.863 NaN 34.421 11.895 NaN 16.747 20.459 17.455 NaN 14.707 26.935 23.164 14.554 27.47 18.231 19.073 11.033 13.273 NaN 29.366 NaN 22.103 40.313 NaN 12.714 16.409 19.683 23.401 11.403 16.267 23.618 25.598 25.759 NaN 20.889 28.421 33.532 28.746 25.898 19.397 16.372 NaN 22.114 NaN 14.271 18.42 13.979 14.196 NaN 16.546 19.791 28.933 23.9 NaN 17.284 31.36 29.417 29.535 26.866 34.424 NaN 27.441 23.05 29.568 24.884 NaN NaN 32.554 25.617 22.677 13.897 NaN NaN NaN NaN NaN 34.163 NaN 21.582 25.471 23.033 NaN NaN NaN NaN 13.036 9.8545 9.4845 NaN NaN NaN NaN NaN 32.844 NaN 16.385 20.575 14.368 19.911 23.832 26.838 15.57 NaN NaN 20.097 15.164 22.077 17.042 18.46 35.227 NaN 25.526 NaN NaN NaN 28.953 NaN 12.54 21.528 26.423 29.594 32.31 32.13 24.06 26.43 23.926 26.179 11.332 8.6171 18.412 12.076 11.082 NaN 25.104 NaN 25.591 8.1999 22.078 25.228 NaN NaN 20.237 11.668 NaN NaN 17.968 12.712 NaN 16.544 NaN 13.007 16.678 22.031 20.57 21.325 17.047 23.86 26.534 20.372 14.493 11.466 10.188 8.66 9.169 9.8034 8.0625 10.547 NaN 35.57 30.477 NaN NaN 22.833 34.686 25.264 32.765 33.182 31.38 16.314 37.654 23.908 NaN 19.504 NaN 12.437 14.919 NaN 19.656 24.038 7.9884 29.446 41.977 49.448 NaN 15.668 13.546 19.253 13.737 6.5652 6.7879 8.9777 NaN 7.9715 7.7364 10.251 NaN 8.9198 NaN 33.657 24.804 NaN NaN 29.817 27.515 23.01 NaN NaN 12.49 NaN NaN 14.216 13.302 10.997 13.619 16.072 NaN 13.431 20.415 15.932 25.838 28.295 25.79 20.556 23.377 NaN 24.989 19.175 22.115 NaN NaN 16.646 22.342 18.152 19.69 21.258 19.031 NaN NaN 10.934 NaN NaN 32.935 29.186 39.744 20.817 20.624 22.6 23.634 NaN 10.253 7.9022 NaN 10.265 13.636 NaN 14.546 NaN 10.882 13.834 6.6817 26.657 19.766 NaN 7.2863 NaN NaN NaN 17.914 13.754 21.998 NaN 22.736 NaN NaN 21.837 23.29 27.548 17.805 NaN 23.565 NaN 13.025 14.187 18.882 NaN 18.128 21.987 32.907 29.279 28.75 19.088 15.678 31.226 26.319 23.639 27.847 22.203 29.668 16.617 20.578 24.855 15.169 20.507 NaN NaN 16.234 8.3624 20.15 22.11 19.306 10.498 NaN 17.218 20.235 28.515 NaN NaN
1985 NaN 8.4406 8.4264 7.75 5.9138 6.7021 24.546 15.514 18.531 NaN 24.518 11.748 26.308 22.396 15.87 15.428 23.182 21.806 17.941 15.142 NaN NaN 31.365 19.75 20.952 26.921 30.993 NaN NaN NaN NaN 57.401 59.965 58.399 38.492 39.672 52.548 NaN 53.377 54.147 50.289 50.162 47.958 50.114 NaN NaN NaN 17.384 43.92 24.229 NaN 15.855 18.447 43.104 29.302 42.811 NaN 20.183 NaN 35.461 22.077 NaN 18.823 18.546 NaN 20.747 26.424 39.996 NaN 37.844 38.204 NaN 13.073 21.232 NaN 27.568 27.879 32.718 17.111 NaN 31.908 NaN 25.372 28.254 NaN 20.258 11.732 15.251 17.762 13.598 22.81 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 18.188 NaN 11.797 NaN NaN NaN NaN 15.398 29.84 NaN NaN 11.09 NaN 20.359 17.994 NaN NaN 22.091 22.5 NaN NaN 20.857 19.645 11.459 NaN 27.996 28.659 19.921 NaN 47.934 23.989 NaN NaN NaN NaN NaN NaN NaN NaN NaN 27.085 21.763 30.71 29.012 25.01 36.44 28.321 16.73 11.309 19.458 16.542 11.3 17.428 11.708 NaN 14.395 17.472 15.937 27.001 22.592 24.021 17.317 34.109 NaN NaN 27.304 34.9 42.464 27.823 NaN NaN NaN 24.622 24.338 NaN NaN 22.475 NaN 16.508 12.728 11.049 11.159 NaN NaN 21.894 20.817 NaN 18.893 13.242 13.404 NaN 24.704 NaN 10.191 10.965 10.863 NaN 12.02 14.059 12.323 NaN 13.912 17.453 21.639 13.276 18.625 25.127 23.747 16.189 7.3081 12.353 24.902 16.618 24.532 22.192 20.122 35.846 18.22 26.679 18.263 22.122 25.231 NaN NaN NaN NaN NaN 24.399 39.768 30.652 NaN NaN 25.344 NaN 11.918 9.3198 NaN NaN NaN 16.595 8.6867 22.76 NaN NaN 18.871 NaN NaN 21.701 NaN NaN NaN NaN 16.102 10.219 8.6515 NaN 25.521 15.02 13.793 22.332 20.21 19.638 15.016 NaN 34.309 23.916 NaN 12.593 12.093 8.9425 10.568 9.4729 8.9321 9.3806 33.51 NaN 27.971 NaN 27.348 NaN 33.968 27.979 30.159 33.573 32.32 15.408 42.927 23.856 19.197 NaN 7.2632 NaN 17.908 32.466 19.512 24.49 6.1648 33.617 42.346 NaN NaN 15.117 NaN 19.708 NaN NaN 6.1797 9.0852 7.6016 8.3062 7.0871 9.0084 7.6155 NaN NaN 29.908 22.072 25.342 18.026 29.099 29.067 19.529 22.141 NaN NaN 19.598 19.67 NaN NaN NaN 13.974 17.06 16.525 12.774 20.443 19.25 NaN 29.692 27.063 23.138 23.368 18.04 25.828 20.217 22.045 24.373 17.031 NaN 23.05 19.274 21.778 19.444 21.536 23.813 21.589 10.948 31.667 NaN 34.406 33.719 36.223 19.809 18.619 25.262 26.242 NaN NaN 8.916 NaN 7.8505 13.259 NaN NaN 13.02 NaN 12.057 NaN 18.537 19.75 17.573 NaN 16.809 15.465 22.288 18.562 15.853 NaN 24.654 19.713 14.71 11.741 21.096 25.421 28.928 17.341 15.587 23.676 14.588 14.603 11.179 20.275 23.15 NaN NaN 38.119 31.138 31.073 16.922 NaN 29.671 24.991 23.347 25.148 21.04 25.784 NaN NaN 23.05 14.758 18.108 19.799 34.428 16.663 8.6705 18.629 23.72 17.997 11.788 14.625 14.075 18.757 26.559 14.536 13.956
Это представление ежегодных средних значений сайтом имеет преимущество и недостаток.
Легче посмотреть на короткие пятилетние временные ряды для каждого сайта. После распаковывания каждый сайт имеет свою собственную переменную в pivotedMeanNO2bySiteID
. Можно легко сравнить сайты друг с другом.
Более трудно отсортировать и выбрать самые большие значения через вертевшуюся таблицу целого. После распаковывания, pivotedMeanNO2bySiteID
имеет 443 переменных. Сложенная версия, meanNO2bySite
, имеет только семь переменных.
К данным группы в NO2data
к году и другой сгруппированной переменной, было необходимо добавить Year
как дополнительная переменная. Кроме того, выход от groupsummary
таблица, даже когда вход является расписанием. Но предположите, что вы хотите сохранить результаты в расписании вместо этого. retime
функция может также произвести ежегодные сводные данные. Но это может сгруппировать данные только ко времени. К данным группы сайтом и к году, перестройте NO2data
так, чтобы можно было вызвать retime
на расписании, где концентрации NO2 уже сгруппированы сайтом.
Сгруппируйте необработанные данные в NO2data
сайтом при помощи unstack
функция. Выходное расписание имеет отдельную переменную для каждого сайта. Это расписание выглядит похожим на сводную таблицу. Но вместо того, чтобы иметь средние значения или некоторую другую статистическую величину, NO2bySite
имеет все необработанные данные. Это только реорганизовано. Для дальнейшего удобства отсортируйте строки расписания к их временам строки так, чтобы самые ранние метки времени были на первом месте.
NO2bySite = unstack(NO2data,"MeasuredNO2","SiteID","GroupingVariable","Timestamp"); NO2bySite = sortrows(NO2bySite)
NO2bySite=43824×442 timetable
Timestamp Alaska_KenaiPeninsula_1004 Arizona_Apache_10 Arizona_Apache_11 Arizona_Apache_7 Arizona_Apache_8 Arizona_Apache_9 Arizona_Maricopa_3002 Arizona_Maricopa_3003 Arizona_Pima_1011 Arizona_Pima_19 Arizona_Pima_2 Arkansas_Pulaski_1002 California_Alameda_1001 California_Alameda_3 California_Butte_2 California_ContraCosta_1002 California_ContraCosta_2 California_ContraCosta_3 California_ContraCosta_3001 California_ElDorado_9 California_Fresno_241 California_Fresno_242 California_Fresno_5 California_Fresno_6 California_Fresno_7 California_Kern_232 California_Kern_4 California_Kern_5001 California_Kern_6 California_Kern_6001 California_Kern_7 California_LosAngeles_1002 California_LosAngeles_1103 California_LosAngeles_1105 California_LosAngeles_113 California_LosAngeles_1201 California_LosAngeles_1301 California_LosAngeles_16 California_LosAngeles_1601 California_LosAngeles_1701 California_LosAngeles_2 California_LosAngeles_2005 California_LosAngeles_2401 California_LosAngeles_4002 California_LosAngeles_4101 California_LosAngeles_5001 California_LosAngeles_6002 California_LosAngeles_7001 California_LosAngeles_8001 California_Marin_1 California_Mendocino_7 California_Monterey_1002 California_Napa_3 California_Orange_1 California_Orange_1002 California_Orange_5001 California_Plumas_1001 California_Riverside_5001 California_Riverside_6001 California_Riverside_8001 California_Sacramento_1 California_Sacramento_10 California_Sacramento_1001 California_Sacramento_2 California_Sacramento_5002 California_Sacramento_6 California_SanBernardino_1 California_SanBernardino_1004 California_SanBernardino_12 California_SanBernardino_2002 California_SanBernardino_3 California_SanBernardino_4001 California_SanBernardino_6 California_SanBernardino_7002 California_SanBernardino_9004 California_SanDiego_1 California_SanDiego_1002 California_SanDiego_1004 California_SanDiego_1006 California_SanDiego_1007 California_SanDiego_3 California_SanDiego_5 California_SanDiego_6 California_SanFrancisco_4 California_SanFrancisco_5 California_SanJoaquin_1002 California_SanLuisObispo_1004 California_SanLuisObispo_2001 California_SanLuisObispo_2002 California_SanLuisObispo_4001 California_SanMateo_1001 California_SantaBarbara_10 California_SantaBarbara_1010 California_SantaBarbara_1011 California_SantaBarbara_1012 California_SantaBarbara_1013 California_SantaBarbara_1014 California_SantaBarbara_1015 California_SantaBarbara_1016 California_SantaBarbara_1017 California_SantaBarbara_1018 California_SantaBarbara_1019 California_SantaBarbara_1020 California_SantaBarbara_1021 California_SantaBarbara_1025 California_SantaBarbara_1026 California_SantaBarbara_1027 California_SantaBarbara_1030 California_SantaBarbara_2002 California_SantaBarbara_2004 California_SantaBarbara_2005 California_SantaBarbara_4002 California_SantaBarbara_4003 California_SantaBarbara_4004 California_SantaBarbara_5001 California_SantaBarbara_8 California_SantaBarbara_9 California_SantaClara_2004 California_SantaCruz_3 California_Shasta_1001 California_Shasta_6 California_Solano_4 California_Sonoma_3 California_Stanislaus_1003 California_Stanislaus_1004 California_Stanislaus_5 California_Tulare_2002 California_Ventura_1003 California_Ventura_2002 California_Ventura_2003 California_Ventura_3001 California_Ventura_5 California_Ventura_6 California_Ventura_7001 Colorado_Adams_3001 Colorado_Arapahoe_1002 Colorado_Arapahoe_3 Colorado_Denver_2 Colorado_ElPaso_4 Colorado_ElPaso_6001 Colorado_ElPaso_6003 Colorado_ElPaso_6004 Colorado_ElPaso_6005 Colorado_ElPaso_6006 Colorado_ElPaso_6009 Colorado_ElPaso_6011 Colorado_ElPaso_6013 Connecticut_Fairfield_113 Connecticut_Fairfield_123 Connecticut_Hartford_1003 Connecticut_NewHaven_1123 Delaware_NewCastle_2002 Delaware_NewCastle_3001 DistrictOfColumbia_DistrictofColumbia_17 DistrictOfColumbia_DistrictofColumbia_25 Florida_Duval_32 Florida_Duval_70 Florida_Hillsborough_1052 Florida_Hillsborough_1055 Florida_Miami_Dade_27 Florida_Miami_Dade_4002 Florida_Orange_2002 Florida_PalmBeach_1004 Florida_PalmBeach_1101 Florida_Pinellas_18 Georgia_DeKalb_2 Georgia_Fulton_48 Illinois_Cook_1002 Illinois_Cook_1102 Illinois_Cook_1601 Illinois_Cook_3101 Illinois_Cook_3102 Illinois_Cook_3601 Illinois_Cook_37 Illinois_Cook_39 Illinois_Cook_40 Illinois_Cook_4002 Illinois_Cook_4003 Illinois_Cook_4004 Illinois_Cook_4005 Illinois_Cook_45 Illinois_Cook_53 Illinois_Cook_63 Illinois_DuPage_1003 Illinois_SaintClair_10 Indiana_Allen_6 Indiana_Clark_3 Indiana_Jasper_2 Indiana_Jasper_3 Indiana_Jefferson_1 Indiana_Knox_4 Indiana_Lake_1016 Indiana_Marion_30 Indiana_Marion_57 Indiana_Marion_65 Indiana_Marion_70 Indiana_Porter_15 Indiana_Porter_16 Indiana_Posey_1 Indiana_Posey_1002 Indiana_Posey_2 Indiana_Spencer_2 Indiana_Spencer_6 Indiana_Sullivan_1 Indiana_Tippecanoe_1001 Indiana_Vanderburgh_1001 Indiana_Vanderburgh_1002 Indiana_Vigo_1012 Kansas_Wyandotte_1 Kentucky_Boone_7 Kentucky_Boyd_10 Kentucky_Campbell_1001 Kentucky_Daviess_5 Kentucky_Fayette_12 Kentucky_Henderson_13 Kentucky_Jefferson_1020 Kentucky_McCracken_1024 Kentucky_Trigg_1 Louisiana_Calcasieu_100 Louisiana_EastBatonRouge_4 Louisiana_Jefferson_1001 Louisiana_Orleans_12 Louisiana_WestBatonRouge_1 Maryland_AnneArundel_19 Maryland_BaltimoreCity_40 Maryland_Baltimore_10 Maryland_Baltimore_3001 Massachusetts_Bristol_1004 Massachusetts_Essex_5 Massachusetts_Hampden_15 Massachusetts_Hampden_16 Massachusetts_Hampden_17 Massachusetts_Hampshire_4002 Massachusetts_Norfolk_8 Massachusetts_Norfolk_9 Massachusetts_Suffolk_1003 Massachusetts_Suffolk_2 Massachusetts_Suffolk_21 Massachusetts_Suffolk_35 Massachusetts_Suffolk_36 Massachusetts_Suffolk_37 Massachusetts_Worcester_20 Michigan_Dickinson_901 Michigan_Dickinson_902 Michigan_Kent_20 Michigan_Midland_940 Michigan_Midland_941 Michigan_Oakland_902 Michigan_Wayne_16 Michigan_Wayne_19 Michigan_Wayne_29 Minnesota_Carlton_6316 Minnesota_Hennepin_50 Minnesota_Hennepin_953 Minnesota_Ramsey_1 Minnesota_Ramsey_3 Minnesota_Ramsey_864 Minnesota_Wright_7 Missouri_Atchison_1 Missouri_Atchison_2 Missouri_Clay_25 Missouri_Clay_5 Missouri_Greene_14 Missouri_Greene_36 Missouri_Jackson_33 Missouri_Platte_23 Missouri_SaintCharles_1002 Missouri_SaintLouis_1 Missouri_SaintLouis_3001 Missouri_SaintLouis_5001 Missouri_SaintLouis_6 Missouri_SaintLouis_7001 Missouri_StLouisCity_72 Missouri_StLouisCity_80 Montana_Missoula_34 Montana_Rosebud_700 Montana_Rosebud_701 Montana_Rosebud_702 Montana_Rosebud_704 Montana_Rosebud_760 Montana_Rosebud_761 Montana_Rosebud_762 Nevada_Clark_1001 Nevada_Clark_16 Nevada_Clark_557 Nevada_Washoe_15 Nevada_Washoe_16 NewHampshire_Hillsborough_16 NewJersey_Bergen_1 NewJersey_Camden_3 NewJersey_Essex_1003 NewJersey_Essex_11 NewJersey_Hudson_6 NewJersey_Morris_3001 NewJersey_Union_4 NewJersey_Union_5001 NewMexico_Bernalillo_15 NewMexico_Bernalillo_23 NewMexico_Catron_1 NewMexico_Eddy_3 NewMexico_SanJuan_14 NewYork_Bronx_74 NewYork_Erie_2 NewYork_Erie_5 NewYork_Essex_5 NewYork_Nassau_5 NewYork_NewYork_10 NewYork_NewYork_56 NewYork_NewYork_63 NorthCarolina_Forsyth_22 NorthCarolina_Forsyth_7 NorthCarolina_Mecklenburg_34 NorthCarolina_Wake_14 NorthDakota_Burke_1 NorthDakota_Dunn_3 NorthDakota_Mercer_1 NorthDakota_Mercer_101 NorthDakota_Mercer_102 NorthDakota_Mercer_103 NorthDakota_Mercer_104 NorthDakota_Oliver_101 NorthDakota_Oliver_2 Ohio_Cuyahoga_2003 Ohio_Cuyahoga_33 Ohio_Cuyahoga_43 Ohio_Franklin_4 Ohio_Hamilton_1013 Ohio_Hamilton_35 Ohio_Hamilton_4002 Ohio_Jefferson_1012 Ohio_Montgomery_29 Ohio_Pickaway_1 Ohio_Pickaway_1001 Ohio_Stark_16 Oklahoma_Cleveland_44 Oklahoma_Cleveland_49 Oklahoma_Kay_600 Oklahoma_Muskogee_167 Oklahoma_Oklahoma_1037 Oklahoma_Oklahoma_33 Oklahoma_Tulsa_127 Oklahoma_Tulsa_174 Oklahoma_Tulsa_191 Oregon_Multnomah_80 Pennsylvania_Allegheny_3 Pennsylvania_Allegheny_31 Pennsylvania_Allegheny_8 Pennsylvania_Beaver_14 Pennsylvania_Berks_9 Pennsylvania_Blair_801 Pennsylvania_Bucks_12 Pennsylvania_Cambria_11 Pennsylvania_Dauphin_401 Pennsylvania_Delaware_2 Pennsylvania_Erie_10 Pennsylvania_Erie_3 Pennsylvania_Lackawanna_2006 Pennsylvania_Lancaster_7 Pennsylvania_Lawrence_15 Pennsylvania_Lehigh_4 Pennsylvania_Luzerne_1101 Pennsylvania_Montgomery_13 Pennsylvania_Northampton_17 Pennsylvania_Perry_301 Pennsylvania_Philadelphia_22 Pennsylvania_Philadelphia_23 Pennsylvania_Philadelphia_29 Pennsylvania_Philadelphia_4 Pennsylvania_Philadelphia_47 Pennsylvania_Washington_200 Pennsylvania_Washington_5 Pennsylvania_York_8 RhodeIsland_Providence_12 RhodeIsland_Providence_19 SouthCarolina_Aiken_3 SouthCarolina_Barnwell_1 SouthCarolina_Lexington_5 SouthCarolina_Richland_1006 Tennessee_Bradley_102 Tennessee_Davidson_10 Tennessee_Davidson_11 Tennessee_Giles_1 Tennessee_Maury_106 Tennessee_McMinn_101 Tennessee_Rutherford_101 Tennessee_Shelby_24 Tennessee_Sullivan_7 Tennessee_Sullivan_9 Tennessee_Williamson_103 Texas_Bexar_36 Texas_Brazoria_1003 Texas_Dallas_44 Texas_Dallas_45 Texas_Dallas_55 Texas_Dallas_69 Texas_ElPaso_27 Texas_ElPaso_37 Texas_Galveston_1002 Texas_Gregg_1 Texas_Harris_1034 Texas_Harris_1035 Texas_Harris_1037 Texas_Harris_24 Texas_Harris_26 Texas_Harris_47 Texas_Harris_7001 Texas_Jefferson_9 Texas_Orange_1001 Texas_Tarrant_1002 Texas_Tarrant_1003 Texas_Travis_17 Utah_Davis_1 Utah_SaltLake_3001 Utah_Utah_2 Utah_Weber_1 Vermont_Chittenden_3 Vermont_Rutland_2 Virginia_AlexandriaCity_9 Virginia_Arlington_20 Virginia_FairfaxCity_5 Virginia_Fairfax_1004 Virginia_Fairfax_18 Virginia_Fairfax_5001 Virginia_Henrico_14 Virginia_NorfolkCity_23 Virginia_RichmondCity_21 Virginia_Roanoke_1004 Virginia_VirginiaBeachCity_7 Washington_King_80 Washington_King_82 WestVirginia_Cabell_6 WestVirginia_Greenbrier_1 WestVirginia_Hancock_1004 WestVirginia_Kanawha_4 WestVirginia_Ohio_7 Wisconsin_Columbia_8 Wisconsin_Kenosha_1001 Wisconsin_Kenosha_16 Wisconsin_Milwaukee_41 Wisconsin_Milwaukee_80 Wisconsin_Rock_1002 Wisconsin_Rock_1004
____________________ __________________________ _________________ _________________ ________________ ________________ ________________ _____________________ _____________________ _________________ _______________ ______________ _____________________ _______________________ ____________________ __________________ ___________________________ ________________________ ________________________ ___________________________ _____________________ _____________________ _____________________ ___________________ ___________________ ___________________ ___________________ _________________ ____________________ _________________ ____________________ _________________ __________________________ __________________________ __________________________ _________________________ __________________________ __________________________ ________________________ __________________________ __________________________ _______________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________ ______________________ ________________________ _________________ ___________________ ______________________ ______________________ ______________________ _________________________ _________________________ _________________________ _______________________ ________________________ __________________________ _______________________ __________________________ _______________________ __________________________ _____________________________ ___________________________ _____________________________ __________________________ _____________________________ __________________________ _____________________________ _____________________________ _____________________ ________________________ ________________________ ________________________ ________________________ _____________________ _____________________ _____________________ _________________________ _________________________ __________________________ _____________________________ _____________________________ _____________________________ _____________________________ ________________________ __________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ _________________________ _________________________ __________________________ ______________________ ______________________ ___________________ ___________________ ___________________ __________________________ __________________________ _______________________ ______________________ _______________________ _______________________ _______________________ _______________________ ____________________ ____________________ _______________________ ___________________ ______________________ ___________________ _________________ _________________ ____________________ ____________________ ____________________ ____________________ ____________________ ____________________ ____________________ ____________________ _________________________ _________________________ _________________________ _________________________ _______________________ _______________________ ________________________________________ ________________________________________ ________________ ________________ _________________________ _________________________ _____________________ _______________________ ___________________ ______________________ ______________________ ___________________ ________________ _________________ __________________ __________________ __________________ __________________ __________________ __________________ ________________ ________________ ________________ __________________ __________________ __________________ __________________ ________________ ________________ ________________ ____________________ ______________________ _______________ _______________ ________________ ________________ ___________________ ______________ _________________ _________________ _________________ _________________ _________________ _________________ _________________ _______________ __________________ _______________ _________________ _________________ __________________ _______________________ ________________________ ________________________ _________________ __________________ ________________ ________________ ______________________ __________________ ___________________ _____________________ _______________________ _______________________ ________________ _______________________ __________________________ ________________________ ____________________ __________________________ _______________________ _________________________ _____________________ _______________________ __________________________ _____________________ ________________________ ________________________ ________________________ ____________________________ _______________________ _______________________ __________________________ _______________________ ________________________ ________________________ ________________________ ________________________ __________________________ ______________________ ______________________ ________________ ____________________ ____________________ ____________________ _________________ _________________ _________________ ______________________ _____________________ ______________________ __________________ __________________ ____________________ __________________ ___________________ ___________________ ________________ _______________ __________________ __________________ ___________________ __________________ __________________________ _____________________ ________________________ ________________________ _____________________ ________________________ _______________________ _______________________ ___________________ ___________________ ___________________ ___________________ ___________________ ___________________ ___________________ ___________________ _________________ _______________ ________________ ________________ ________________ ____________________________ __________________ __________________ ____________________ __________________ __________________ _____________________ _________________ ____________________ _______________________ _______________________ __________________ ________________ ____________________ ________________ ______________ ______________ _______________ ________________ __________________ __________________ __________________ ________________________ _______________________ ____________________________ _____________________ ___________________ __________________ ____________________ ______________________ ______________________ ______________________ ______________________ ______________________ ____________________ __________________ ________________ ________________ _______________ __________________ ________________ __________________ ___________________ __________________ _______________ __________________ _____________ _____________________ _____________________ ________________ _____________________ ______________________ ____________________ __________________ __________________ __________________ ___________________ ________________________ _________________________ ________________________ ______________________ ____________________ ______________________ _____________________ _______________________ ________________________ _______________________ ____________________ ___________________ ____________________________ ________________________ ________________________ _____________________ _________________________ __________________________ ___________________________ ______________________ ____________________________ ____________________________ ____________________________ ___________________________ ____________________________ ___________________________ _________________________ ___________________ _________________________ _________________________ _____________________ ________________________ _________________________ ___________________________ _____________________ _____________________ _____________________ _________________ ___________________ ____________________ ________________________ ___________________ ____________________ ____________________ ________________________ ______________ ___________________ _______________ _______________ _______________ _______________ _______________ _______________ ____________________ _____________ _________________ _________________ _________________ _______________ _______________ _______________ _________________ _________________ _________________ __________________ __________________ _______________ ____________ __________________ ___________ ____________ ____________________ _________________ _________________________ _____________________ ______________________ _____________________ ___________________ _____________________ ___________________ _______________________ ________________________ _____________________ ____________________________ __________________ __________________ _____________________ _________________________ _________________________ ______________________ ___________________ ____________________ ______________________ ____________________ ______________________ ______________________ ___________________ ___________________
01-Jan-1985 00:00:00 NaN NaN NaN NaN NaN NaN 30 NaN 40 NaN NaN NaN 20 20 10 30 30 20 60 20 NaN NaN 50 NaN NaN 10 30 NaN NaN NaN NaN 120 130 110 90 10 120 NaN 90 60 50 110 90 110 NaN NaN NaN 30 80 30 NaN 20 20 10 10 60 NaN 10 NaN 10 20 NaN 10 20 NaN 20 NaN NaN NaN 10 NaN NaN 10 20 NaN 40 20 70 10 NaN 40 NaN 40 40 NaN NaN 20 10 10 10 20 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 10 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 20 20 NaN NaN NaN 10 NaN NaN NaN NaN NaN NaN NaN 7 5 NaN 15 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 28 32 32 50 30 36 40 10 NaN 18 9 NaN NaN 7 NaN 10 10 NaN 17.5 NaN NaN NaN NaN NaN NaN NaN 10 8 NaN NaN NaN NaN NaN NaN NaN NaN 16 NaN 7 19 23 9 NaN NaN NaN NaN NaN NaN 13 NaN NaN NaN NaN NaN NaN 6 NaN NaN NaN 11 NaN 17 20 13 NaN NaN NaN NaN NaN NaN NaN 5 15 10 26 36 NaN NaN 35 7 18 19 NaN NaN NaN NaN NaN 31 49 44 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 9 NaN NaN 8 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 6.3 NaN 24 13 13 17 NaN 22 31 NaN 15 12 NaN NaN NaN NaN NaN 8.4 NaN 20.7 NaN 40 NaN 28 NaN 34 35 26 17 37 32 8 NaN NaN NaN NaN 21 6 12 NaN 23 36 NaN NaN 12 NaN 21 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 18 NaN 18 15 17 15 20 18 NaN NaN 21 NaN NaN NaN NaN NaN NaN 5.3 NaN 6.3 18.5 NaN 18 23 15 31 8 39 9 22 46 20 NaN 24 20 16 26 22 31 32 19 40 NaN 40 30 NaN NaN NaN 23 13 NaN NaN NaN NaN 5.3 NaN NaN NaN NaN NaN NaN NaN NaN 11.5 6.4 NaN 10 NaN NaN NaN NaN NaN 20 20 10 NaN NaN 10 10 10 NaN 10 NaN 10 NaN NaN NaN NaN NaN 30 NaN 40 NaN NaN 35 25 39.3 36.1 34.5 39.8 NaN NaN 20 NaN 21 20 30 14 NaN 15 19 NaN NaN NaN NaN NaN 11 NaN NaN
01-Jan-1985 01:00:00 NaN NaN NaN NaN NaN NaN 30 NaN 40 NaN NaN 12 10 30 20 30 30 20 60 NaN NaN NaN 30 NaN NaN 20 20 NaN NaN NaN NaN 120 140 80 90 10 120 NaN 90 60 50 110 80 100 NaN NaN NaN 30 100 30 NaN 10 20 10 10 60 NaN 20 NaN 10 20 NaN 10 20 NaN 20 20 30 NaN 10 20 NaN 10 30 NaN 40 20 60 10 NaN 40 NaN 40 50 NaN NaN 10 10 20 30 20 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 10 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 20 20 NaN NaN NaN NaN NaN NaN 20 NaN NaN NaN 10 8 7 NaN 18 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 28 30 34 50 30 34 41 10 NaN 18 8 NaN NaN 9 NaN 9 10 NaN 20.1 NaN NaN NaN NaN NaN NaN NaN 9 8 NaN NaN NaN NaN NaN NaN NaN NaN 18 NaN NaN 19 20 NaN NaN NaN NaN 10 NaN NaN 10 NaN NaN NaN NaN NaN NaN 6 NaN NaN NaN 11 NaN 10 21 10 NaN NaN NaN NaN NaN NaN NaN 15 8 15 15 35 NaN NaN 35 8 20 17 NaN NaN NaN NaN NaN 30 43 40 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 6.9 NaN NaN 11 NaN NaN 6 NaN NaN NaN NaN NaN NaN NaN NaN NaN 6.3 NaN 25 15 13 17 NaN 24 34 NaN 19 9 7 NaN NaN NaN NaN 10.6 NaN 31.8 NaN 40 NaN 28 NaN 35 36 27 20 38 31 12 NaN NaN NaN NaN 21 6 11 NaN 32 36 NaN NaN 12 NaN 20 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 18 NaN 18 19 15 12 20 15 NaN NaN 16 NaN NaN NaN NaN NaN NaN 6.3 NaN 6.3 18.5 NaN 19 24 16 33 9 35 10 22 44 18 NaN 25 25 17 24 24 36 33 18 30 NaN 40 30 NaN NaN NaN 23 19 NaN NaN NaN NaN 5.3 NaN NaN NaN NaN NaN NaN NaN NaN 15.1 6.1 NaN 10 NaN NaN 10 NaN NaN 20 20 10 NaN NaN 10 10 10 NaN 10 NaN 10 NaN NaN NaN NaN NaN 20 NaN 40 NaN NaN 32 25 34.5 32.9 29.2 39.8 NaN NaN 15 6 21 20 20 18 NaN 10 20 NaN NaN NaN NaN NaN NaN NaN NaN
⋮
В этом формате можно легко отобразить необработанные данные на графике при помощи stackedplot
функция. Этот график показывает концентрации NO2 для каждого сайта в зависимости от времени.
stackedplot(NO2bySite)
Чтобы создать расписание, которое является также сводной таблицей, используйте retime
вычислить ежегодные средние значения.
meanNO2bySiteTT = retime(NO2bySite,"yearly","mean")
meanNO2bySiteTT=5×442 timetable
Timestamp Alaska_KenaiPeninsula_1004 Arizona_Apache_10 Arizona_Apache_11 Arizona_Apache_7 Arizona_Apache_8 Arizona_Apache_9 Arizona_Maricopa_3002 Arizona_Maricopa_3003 Arizona_Pima_1011 Arizona_Pima_19 Arizona_Pima_2 Arkansas_Pulaski_1002 California_Alameda_1001 California_Alameda_3 California_Butte_2 California_ContraCosta_1002 California_ContraCosta_2 California_ContraCosta_3 California_ContraCosta_3001 California_ElDorado_9 California_Fresno_241 California_Fresno_242 California_Fresno_5 California_Fresno_6 California_Fresno_7 California_Kern_232 California_Kern_4 California_Kern_5001 California_Kern_6 California_Kern_6001 California_Kern_7 California_LosAngeles_1002 California_LosAngeles_1103 California_LosAngeles_1105 California_LosAngeles_113 California_LosAngeles_1201 California_LosAngeles_1301 California_LosAngeles_16 California_LosAngeles_1601 California_LosAngeles_1701 California_LosAngeles_2 California_LosAngeles_2005 California_LosAngeles_2401 California_LosAngeles_4002 California_LosAngeles_4101 California_LosAngeles_5001 California_LosAngeles_6002 California_LosAngeles_7001 California_LosAngeles_8001 California_Marin_1 California_Mendocino_7 California_Monterey_1002 California_Napa_3 California_Orange_1 California_Orange_1002 California_Orange_5001 California_Plumas_1001 California_Riverside_5001 California_Riverside_6001 California_Riverside_8001 California_Sacramento_1 California_Sacramento_10 California_Sacramento_1001 California_Sacramento_2 California_Sacramento_5002 California_Sacramento_6 California_SanBernardino_1 California_SanBernardino_1004 California_SanBernardino_12 California_SanBernardino_2002 California_SanBernardino_3 California_SanBernardino_4001 California_SanBernardino_6 California_SanBernardino_7002 California_SanBernardino_9004 California_SanDiego_1 California_SanDiego_1002 California_SanDiego_1004 California_SanDiego_1006 California_SanDiego_1007 California_SanDiego_3 California_SanDiego_5 California_SanDiego_6 California_SanFrancisco_4 California_SanFrancisco_5 California_SanJoaquin_1002 California_SanLuisObispo_1004 California_SanLuisObispo_2001 California_SanLuisObispo_2002 California_SanLuisObispo_4001 California_SanMateo_1001 California_SantaBarbara_10 California_SantaBarbara_1010 California_SantaBarbara_1011 California_SantaBarbara_1012 California_SantaBarbara_1013 California_SantaBarbara_1014 California_SantaBarbara_1015 California_SantaBarbara_1016 California_SantaBarbara_1017 California_SantaBarbara_1018 California_SantaBarbara_1019 California_SantaBarbara_1020 California_SantaBarbara_1021 California_SantaBarbara_1025 California_SantaBarbara_1026 California_SantaBarbara_1027 California_SantaBarbara_1030 California_SantaBarbara_2002 California_SantaBarbara_2004 California_SantaBarbara_2005 California_SantaBarbara_4002 California_SantaBarbara_4003 California_SantaBarbara_4004 California_SantaBarbara_5001 California_SantaBarbara_8 California_SantaBarbara_9 California_SantaClara_2004 California_SantaCruz_3 California_Shasta_1001 California_Shasta_6 California_Solano_4 California_Sonoma_3 California_Stanislaus_1003 California_Stanislaus_1004 California_Stanislaus_5 California_Tulare_2002 California_Ventura_1003 California_Ventura_2002 California_Ventura_2003 California_Ventura_3001 California_Ventura_5 California_Ventura_6 California_Ventura_7001 Colorado_Adams_3001 Colorado_Arapahoe_1002 Colorado_Arapahoe_3 Colorado_Denver_2 Colorado_ElPaso_4 Colorado_ElPaso_6001 Colorado_ElPaso_6003 Colorado_ElPaso_6004 Colorado_ElPaso_6005 Colorado_ElPaso_6006 Colorado_ElPaso_6009 Colorado_ElPaso_6011 Colorado_ElPaso_6013 Connecticut_Fairfield_113 Connecticut_Fairfield_123 Connecticut_Hartford_1003 Connecticut_NewHaven_1123 Delaware_NewCastle_2002 Delaware_NewCastle_3001 DistrictOfColumbia_DistrictofColumbia_17 DistrictOfColumbia_DistrictofColumbia_25 Florida_Duval_32 Florida_Duval_70 Florida_Hillsborough_1052 Florida_Hillsborough_1055 Florida_Miami_Dade_27 Florida_Miami_Dade_4002 Florida_Orange_2002 Florida_PalmBeach_1004 Florida_PalmBeach_1101 Florida_Pinellas_18 Georgia_DeKalb_2 Georgia_Fulton_48 Illinois_Cook_1002 Illinois_Cook_1102 Illinois_Cook_1601 Illinois_Cook_3101 Illinois_Cook_3102 Illinois_Cook_3601 Illinois_Cook_37 Illinois_Cook_39 Illinois_Cook_40 Illinois_Cook_4002 Illinois_Cook_4003 Illinois_Cook_4004 Illinois_Cook_4005 Illinois_Cook_45 Illinois_Cook_53 Illinois_Cook_63 Illinois_DuPage_1003 Illinois_SaintClair_10 Indiana_Allen_6 Indiana_Clark_3 Indiana_Jasper_2 Indiana_Jasper_3 Indiana_Jefferson_1 Indiana_Knox_4 Indiana_Lake_1016 Indiana_Marion_30 Indiana_Marion_57 Indiana_Marion_65 Indiana_Marion_70 Indiana_Porter_15 Indiana_Porter_16 Indiana_Posey_1 Indiana_Posey_1002 Indiana_Posey_2 Indiana_Spencer_2 Indiana_Spencer_6 Indiana_Sullivan_1 Indiana_Tippecanoe_1001 Indiana_Vanderburgh_1001 Indiana_Vanderburgh_1002 Indiana_Vigo_1012 Kansas_Wyandotte_1 Kentucky_Boone_7 Kentucky_Boyd_10 Kentucky_Campbell_1001 Kentucky_Daviess_5 Kentucky_Fayette_12 Kentucky_Henderson_13 Kentucky_Jefferson_1020 Kentucky_McCracken_1024 Kentucky_Trigg_1 Louisiana_Calcasieu_100 Louisiana_EastBatonRouge_4 Louisiana_Jefferson_1001 Louisiana_Orleans_12 Louisiana_WestBatonRouge_1 Maryland_AnneArundel_19 Maryland_BaltimoreCity_40 Maryland_Baltimore_10 Maryland_Baltimore_3001 Massachusetts_Bristol_1004 Massachusetts_Essex_5 Massachusetts_Hampden_15 Massachusetts_Hampden_16 Massachusetts_Hampden_17 Massachusetts_Hampshire_4002 Massachusetts_Norfolk_8 Massachusetts_Norfolk_9 Massachusetts_Suffolk_1003 Massachusetts_Suffolk_2 Massachusetts_Suffolk_21 Massachusetts_Suffolk_35 Massachusetts_Suffolk_36 Massachusetts_Suffolk_37 Massachusetts_Worcester_20 Michigan_Dickinson_901 Michigan_Dickinson_902 Michigan_Kent_20 Michigan_Midland_940 Michigan_Midland_941 Michigan_Oakland_902 Michigan_Wayne_16 Michigan_Wayne_19 Michigan_Wayne_29 Minnesota_Carlton_6316 Minnesota_Hennepin_50 Minnesota_Hennepin_953 Minnesota_Ramsey_1 Minnesota_Ramsey_3 Minnesota_Ramsey_864 Minnesota_Wright_7 Missouri_Atchison_1 Missouri_Atchison_2 Missouri_Clay_25 Missouri_Clay_5 Missouri_Greene_14 Missouri_Greene_36 Missouri_Jackson_33 Missouri_Platte_23 Missouri_SaintCharles_1002 Missouri_SaintLouis_1 Missouri_SaintLouis_3001 Missouri_SaintLouis_5001 Missouri_SaintLouis_6 Missouri_SaintLouis_7001 Missouri_StLouisCity_72 Missouri_StLouisCity_80 Montana_Missoula_34 Montana_Rosebud_700 Montana_Rosebud_701 Montana_Rosebud_702 Montana_Rosebud_704 Montana_Rosebud_760 Montana_Rosebud_761 Montana_Rosebud_762 Nevada_Clark_1001 Nevada_Clark_16 Nevada_Clark_557 Nevada_Washoe_15 Nevada_Washoe_16 NewHampshire_Hillsborough_16 NewJersey_Bergen_1 NewJersey_Camden_3 NewJersey_Essex_1003 NewJersey_Essex_11 NewJersey_Hudson_6 NewJersey_Morris_3001 NewJersey_Union_4 NewJersey_Union_5001 NewMexico_Bernalillo_15 NewMexico_Bernalillo_23 NewMexico_Catron_1 NewMexico_Eddy_3 NewMexico_SanJuan_14 NewYork_Bronx_74 NewYork_Erie_2 NewYork_Erie_5 NewYork_Essex_5 NewYork_Nassau_5 NewYork_NewYork_10 NewYork_NewYork_56 NewYork_NewYork_63 NorthCarolina_Forsyth_22 NorthCarolina_Forsyth_7 NorthCarolina_Mecklenburg_34 NorthCarolina_Wake_14 NorthDakota_Burke_1 NorthDakota_Dunn_3 NorthDakota_Mercer_1 NorthDakota_Mercer_101 NorthDakota_Mercer_102 NorthDakota_Mercer_103 NorthDakota_Mercer_104 NorthDakota_Oliver_101 NorthDakota_Oliver_2 Ohio_Cuyahoga_2003 Ohio_Cuyahoga_33 Ohio_Cuyahoga_43 Ohio_Franklin_4 Ohio_Hamilton_1013 Ohio_Hamilton_35 Ohio_Hamilton_4002 Ohio_Jefferson_1012 Ohio_Montgomery_29 Ohio_Pickaway_1 Ohio_Pickaway_1001 Ohio_Stark_16 Oklahoma_Cleveland_44 Oklahoma_Cleveland_49 Oklahoma_Kay_600 Oklahoma_Muskogee_167 Oklahoma_Oklahoma_1037 Oklahoma_Oklahoma_33 Oklahoma_Tulsa_127 Oklahoma_Tulsa_174 Oklahoma_Tulsa_191 Oregon_Multnomah_80 Pennsylvania_Allegheny_3 Pennsylvania_Allegheny_31 Pennsylvania_Allegheny_8 Pennsylvania_Beaver_14 Pennsylvania_Berks_9 Pennsylvania_Blair_801 Pennsylvania_Bucks_12 Pennsylvania_Cambria_11 Pennsylvania_Dauphin_401 Pennsylvania_Delaware_2 Pennsylvania_Erie_10 Pennsylvania_Erie_3 Pennsylvania_Lackawanna_2006 Pennsylvania_Lancaster_7 Pennsylvania_Lawrence_15 Pennsylvania_Lehigh_4 Pennsylvania_Luzerne_1101 Pennsylvania_Montgomery_13 Pennsylvania_Northampton_17 Pennsylvania_Perry_301 Pennsylvania_Philadelphia_22 Pennsylvania_Philadelphia_23 Pennsylvania_Philadelphia_29 Pennsylvania_Philadelphia_4 Pennsylvania_Philadelphia_47 Pennsylvania_Washington_200 Pennsylvania_Washington_5 Pennsylvania_York_8 RhodeIsland_Providence_12 RhodeIsland_Providence_19 SouthCarolina_Aiken_3 SouthCarolina_Barnwell_1 SouthCarolina_Lexington_5 SouthCarolina_Richland_1006 Tennessee_Bradley_102 Tennessee_Davidson_10 Tennessee_Davidson_11 Tennessee_Giles_1 Tennessee_Maury_106 Tennessee_McMinn_101 Tennessee_Rutherford_101 Tennessee_Shelby_24 Tennessee_Sullivan_7 Tennessee_Sullivan_9 Tennessee_Williamson_103 Texas_Bexar_36 Texas_Brazoria_1003 Texas_Dallas_44 Texas_Dallas_45 Texas_Dallas_55 Texas_Dallas_69 Texas_ElPaso_27 Texas_ElPaso_37 Texas_Galveston_1002 Texas_Gregg_1 Texas_Harris_1034 Texas_Harris_1035 Texas_Harris_1037 Texas_Harris_24 Texas_Harris_26 Texas_Harris_47 Texas_Harris_7001 Texas_Jefferson_9 Texas_Orange_1001 Texas_Tarrant_1002 Texas_Tarrant_1003 Texas_Travis_17 Utah_Davis_1 Utah_SaltLake_3001 Utah_Utah_2 Utah_Weber_1 Vermont_Chittenden_3 Vermont_Rutland_2 Virginia_AlexandriaCity_9 Virginia_Arlington_20 Virginia_FairfaxCity_5 Virginia_Fairfax_1004 Virginia_Fairfax_18 Virginia_Fairfax_5001 Virginia_Henrico_14 Virginia_NorfolkCity_23 Virginia_RichmondCity_21 Virginia_Roanoke_1004 Virginia_VirginiaBeachCity_7 Washington_King_80 Washington_King_82 WestVirginia_Cabell_6 WestVirginia_Greenbrier_1 WestVirginia_Hancock_1004 WestVirginia_Kanawha_4 WestVirginia_Ohio_7 Wisconsin_Columbia_8 Wisconsin_Kenosha_1001 Wisconsin_Kenosha_16 Wisconsin_Milwaukee_41 Wisconsin_Milwaukee_80 Wisconsin_Rock_1002 Wisconsin_Rock_1004
___________ __________________________ _________________ _________________ ________________ ________________ ________________ _____________________ _____________________ _________________ _______________ ______________ _____________________ _______________________ ____________________ __________________ ___________________________ ________________________ ________________________ ___________________________ _____________________ _____________________ _____________________ ___________________ ___________________ ___________________ ___________________ _________________ ____________________ _________________ ____________________ _________________ __________________________ __________________________ __________________________ _________________________ __________________________ __________________________ ________________________ __________________________ __________________________ _______________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________ ______________________ ________________________ _________________ ___________________ ______________________ ______________________ ______________________ _________________________ _________________________ _________________________ _______________________ ________________________ __________________________ _______________________ __________________________ _______________________ __________________________ _____________________________ ___________________________ _____________________________ __________________________ _____________________________ __________________________ _____________________________ _____________________________ _____________________ ________________________ ________________________ ________________________ ________________________ _____________________ _____________________ _____________________ _________________________ _________________________ __________________________ _____________________________ _____________________________ _____________________________ _____________________________ ________________________ __________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ _________________________ _________________________ __________________________ ______________________ ______________________ ___________________ ___________________ ___________________ __________________________ __________________________ _______________________ ______________________ _______________________ _______________________ _______________________ _______________________ ____________________ ____________________ _______________________ ___________________ ______________________ ___________________ _________________ _________________ ____________________ ____________________ ____________________ ____________________ ____________________ ____________________ ____________________ ____________________ _________________________ _________________________ _________________________ _________________________ _______________________ _______________________ ________________________________________ ________________________________________ ________________ ________________ _________________________ _________________________ _____________________ _______________________ ___________________ ______________________ ______________________ ___________________ ________________ _________________ __________________ __________________ __________________ __________________ __________________ __________________ ________________ ________________ ________________ __________________ __________________ __________________ __________________ ________________ ________________ ________________ ____________________ ______________________ _______________ _______________ ________________ ________________ ___________________ ______________ _________________ _________________ _________________ _________________ _________________ _________________ _________________ _______________ __________________ _______________ _________________ _________________ __________________ _______________________ ________________________ ________________________ _________________ __________________ ________________ ________________ ______________________ __________________ ___________________ _____________________ _______________________ _______________________ ________________ _______________________ __________________________ ________________________ ____________________ __________________________ _______________________ _________________________ _____________________ _______________________ __________________________ _____________________ ________________________ ________________________ ________________________ ____________________________ _______________________ _______________________ __________________________ _______________________ ________________________ ________________________ ________________________ ________________________ __________________________ ______________________ ______________________ ________________ ____________________ ____________________ ____________________ _________________ _________________ _________________ ______________________ _____________________ ______________________ __________________ __________________ ____________________ __________________ ___________________ ___________________ ________________ _______________ __________________ __________________ ___________________ __________________ __________________________ _____________________ ________________________ ________________________ _____________________ ________________________ _______________________ _______________________ ___________________ ___________________ ___________________ ___________________ ___________________ ___________________ ___________________ ___________________ _________________ _______________ ________________ ________________ ________________ ____________________________ __________________ __________________ ____________________ __________________ __________________ _____________________ _________________ ____________________ _______________________ _______________________ __________________ ________________ ____________________ ________________ ______________ ______________ _______________ ________________ __________________ __________________ __________________ ________________________ _______________________ ____________________________ _____________________ ___________________ __________________ ____________________ ______________________ ______________________ ______________________ ______________________ ______________________ ____________________ __________________ ________________ ________________ _______________ __________________ ________________ __________________ ___________________ __________________ _______________ __________________ _____________ _____________________ _____________________ ________________ _____________________ ______________________ ____________________ __________________ __________________ __________________ ___________________ ________________________ _________________________ ________________________ ______________________ ____________________ ______________________ _____________________ _______________________ ________________________ _______________________ ____________________ ___________________ ____________________________ ________________________ ________________________ _____________________ _________________________ __________________________ ___________________________ ______________________ ____________________________ ____________________________ ____________________________ ___________________________ ____________________________ ___________________________ _________________________ ___________________ _________________________ _________________________ _____________________ ________________________ _________________________ ___________________________ _____________________ _____________________ _____________________ _________________ ___________________ ____________________ ________________________ ___________________ ____________________ ____________________ ________________________ ______________ ___________________ _______________ _______________ _______________ _______________ _______________ _______________ ____________________ _____________ _________________ _________________ _________________ _______________ _______________ _______________ _________________ _________________ _________________ __________________ __________________ _______________ ____________ __________________ ___________ ____________ ____________________ _________________ _________________________ _____________________ ______________________ _____________________ ___________________ _____________________ ___________________ _______________________ ________________________ _____________________ ____________________________ __________________ __________________ _____________________ _________________________ _________________________ ______________________ ___________________ ____________________ ______________________ ____________________ ______________________ ______________________ ___________________ ___________________
01-Jan-1985 NaN 8.4406 8.4264 7.75 5.9138 6.7021 24.546 15.514 18.531 NaN 24.518 11.748 26.308 22.396 15.87 15.428 23.182 21.806 35.881 15.142 NaN NaN 31.365 19.75 20.952 26.921 30.993 NaN NaN NaN NaN 57.401 59.965 58.399 38.492 39.672 52.548 NaN 53.377 54.147 50.289 50.162 47.958 50.114 NaN NaN NaN 17.384 43.92 24.229 NaN 15.855 18.447 43.104 29.302 42.811 NaN 20.183 NaN 35.461 22.077 NaN 18.823 18.546 NaN 20.747 26.424 39.996 NaN 37.844 38.204 NaN 13.073 21.232 NaN 27.568 27.879 32.718 17.111 NaN 31.908 NaN 25.372 28.254 NaN 20.258 11.732 15.251 17.762 13.598 22.81 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 18.188 NaN 11.797 NaN NaN NaN NaN 15.398 29.84 NaN NaN 11.09 NaN 20.359 17.994 NaN NaN 22.091 22.5 NaN NaN 20.857 19.645 11.459 NaN 27.996 28.659 19.921 NaN 47.934 23.989 NaN NaN NaN NaN NaN NaN NaN NaN NaN 27.085 21.763 30.71 29.012 25.01 36.44 28.321 16.73 11.309 19.458 16.542 11.3 17.428 11.708 NaN 14.395 17.472 15.937 27.001 22.592 24.021 17.317 34.109 NaN NaN 27.304 34.9 42.464 27.823 NaN NaN NaN 24.622 24.338 NaN NaN 22.475 NaN 16.508 12.728 11.049 11.159 NaN NaN 21.894 20.817 NaN 18.893 13.242 13.404 NaN 24.704 NaN 10.191 10.965 10.863 NaN 12.02 14.059 12.323 NaN 13.912 17.453 21.639 13.276 18.625 25.127 23.747 16.189 7.3081 12.353 24.902 16.618 24.532 22.192 20.122 35.846 18.22 26.679 18.263 22.122 25.231 NaN NaN NaN NaN NaN 24.399 39.768 30.652 NaN NaN 25.344 NaN 11.918 9.3198 NaN NaN NaN 16.595 8.6867 22.76 NaN NaN 18.871 NaN NaN 21.701 NaN NaN NaN NaN 16.102 10.219 8.6515 NaN 25.521 15.02 13.793 22.332 20.21 19.638 15.016 NaN 52.023 23.916 NaN 12.593 12.093 8.9425 10.568 9.4729 8.9321 9.3806 33.51 NaN 27.971 NaN 27.348 NaN 33.968 27.979 30.159 33.573 32.32 15.408 42.927 23.856 19.197 NaN 7.2632 NaN 17.908 32.466 19.512 24.49 6.1648 33.617 42.346 NaN NaN 15.117 NaN 19.708 NaN NaN 6.1797 9.0852 7.6016 8.3062 7.0871 9.0084 7.6155 NaN NaN 29.908 22.072 25.342 18.026 29.099 29.067 19.529 22.141 NaN NaN 19.598 19.67 NaN NaN NaN 13.974 17.06 16.525 12.774 20.443 19.25 NaN 29.692 27.063 23.138 23.368 18.04 25.828 20.217 22.045 24.373 17.031 NaN 23.05 19.274 21.778 19.444 21.536 23.813 21.589 10.948 31.667 NaN 34.406 33.719 36.223 19.809 18.619 25.262 26.242 NaN NaN 8.916 NaN 7.8505 13.259 NaN NaN 13.02 NaN 12.057 NaN 18.537 19.75 17.573 NaN 16.809 15.465 22.288 18.562 15.853 NaN 24.654 19.713 14.71 11.741 21.096 25.421 28.928 17.341 15.587 23.676 14.588 14.603 11.179 20.275 23.15 NaN NaN 38.119 31.138 31.073 16.922 NaN 29.671 24.991 23.347 25.148 21.04 25.784 NaN NaN 23.05 14.758 18.108 19.799 34.428 16.663 8.6705 18.629 23.72 17.997 11.788 14.625 14.075 18.757 26.559 14.536 13.956
01-Jan-1986 NaN 7.3333 7.587 6.7857 6.1875 7.6579 NaN 10.816 20.043 NaN 24.036 12.383 25.817 22.413 15.932 15.513 23.238 22.14 38.407 14.519 19.512 NaN 32.125 16.135 19.994 23.927 30.657 NaN NaN NaN NaN 57.422 61.266 NaN 42.167 32.775 52.877 NaN 52.982 55.924 49.656 51.265 50.39 52.939 NaN 42.075 NaN 15.945 NaN 25.236 NaN 15.4 18.873 44.647 30.347 42.358 NaN 20.263 NaN 32.584 22.894 NaN 14.896 15.641 NaN 17.291 27.45 42.873 NaN 42.875 NaN 16.134 15.104 24.178 NaN 24.919 29.698 34.062 18.365 NaN 32.813 26.668 27.248 23.262 24.453 23.66 11.63 14.361 17.025 13.811 25.354 NaN 11.333 7.7075 6.7778 6.5787 6.7744 10.311 NaN NaN NaN NaN NaN 9.552 NaN NaN NaN 7.2131 18.304 13.057 11.347 10.897 NaN 7.6748 11.063 15.74 22.75 NaN NaN NaN 16.632 19.264 17.383 17.879 NaN 24.073 24.637 NaN 29.37 19.151 18.612 11.048 NaN NaN 29.788 20.583 NaN 46.959 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 26.808 21.944 28.921 29.726 23.681 29.263 34.748 15.686 NaN 20.731 NaN 14.793 19.395 13.345 13.34 14.855 NaN 19.216 30.544 22.189 16.758 17.349 31.479 NaN NaN 26.497 31.666 41.484 25.755 22.434 NaN NaN 24.424 23.444 NaN NaN 23.407 12.409 15.068 NaN NaN 11.764 15.848 NaN NaN 19.41 NaN 21.499 NaN NaN 12.077 NaN NaN 10.722 10.582 9.9393 NaN 10.685 14.285 10.324 33.12 13.229 14.944 21.254 14.33 18.87 21.944 33.019 16.472 6.6789 NaN 22.55 16.568 25.139 19.715 19.405 35.694 NaN 26.736 23.56 29.285 22.306 NaN NaN 12.952 NaN NaN 24.827 33.813 33.618 NaN NaN 24.076 29.656 12.011 9.7336 NaN NaN NaN 15.487 19.343 20.231 NaN NaN 19.528 NaN 17.28 21.242 NaN NaN NaN NaN 16.581 13.038 9.6631 NaN NaN 14.25 13.806 22.082 20.995 20.896 16.037 NaN 35.899 19.872 NaN 11.498 10.498 9.4051 10.095 9.6492 9.8615 13.53 NaN NaN 29.201 NaN 25.467 17.309 30.186 27.491 32.48 31.747 31.926 15.752 31.068 25.007 17.85 NaN 7.1154 12.82 NaN 35.33 20.538 25.2 7.2556 33.792 43.22 48.628 NaN 18.296 10.689 22.176 NaN NaN 7.3706 8.8679 7.1527 9.7337 7.0102 8.6307 6.8223 NaN 28.067 26.678 21.427 25.933 19.528 29.328 27.169 20.258 21.602 NaN NaN 18.439 18.795 NaN NaN 11.398 13.718 18.592 16.843 14.262 21.168 19.588 NaN 33.32 26.239 19.882 24.299 NaN 26.732 20.047 22.914 NaN 16.394 NaN 19.578 19.133 22.735 21.53 21.121 NaN NaN 11.541 NaN 17.398 36.348 33.298 35.91 19.827 19.557 24.243 25.42 NaN 8.9886 8.0979 9.4549 NaN 15.236 NaN NaN 13.783 NaN 14.101 NaN 25.322 19.989 17.213 NaN NaN 15.74 29.374 18.6 17.524 23.369 26.29 19.114 NaN NaN 20.536 26.168 28.6 17.739 15.729 24.972 NaN 14.402 NaN 18.705 22.432 NaN NaN 35.334 25.012 27.123 19.013 NaN 31.363 27.049 24.736 25.662 26.251 24.318 NaN NaN 22.36 15.369 19.215 19.82 32.476 17.905 8.1619 18.48 23.496 18.445 11.013 16.914 30.289 19.944 27.538 13.324 14.81
Создайте совмещенный график ежегодных средних значений.
stackedplot(meanNO2bySiteTT)
Вы можете хотеть сохранить информацию из исходного расписания NO2data
в этом расписании результатов. Например, вы можете хотеть добавить широты и долготы сайтов к NO2bySite
. Они хранились для каждой метки времени в NO2data
. Но сохранить их более сжато в этом расписании, добавьте их согласно переменной пользовательские свойства к NO2bySite
.
LatLon = groupsummary(NO2data,"SiteID","mode",["Latitude","Longitude"]); NO2bySite = addprop(NO2bySite,["Latitude","Longitude"],["variable","variable"]); NO2bySite.Properties.CustomProperties.Latitude(string(LatLon.SiteID)) = LatLon.mode_Latitude'; NO2bySite.Properties.CustomProperties.Longitude(string(LatLon.SiteID)) = LatLon.mode_Longitude';
Вычислить податливость со вторым стандартом NAAQS для NO2 требует последовательности сгруппированных вычислений. По второму стандарту местоположение вне податливости, если 98-я процентиль 1-часовых ежедневных максимальных концентраций NO2, составил в среднем более чем 3 года, превышает 100 частей на миллиард.
Начните с почасовых концентраций NO2 сайтом. Чтобы найти ежедневный максимум для каждого сайта, используйте retime
функция, задавая "max"
как метод, чтобы найти максимальную концентрацию для ценности каждого дня данных. Затем найдите 98-е процентили ежедневных максимумов в ценности каждого года данных, вызвав retime
во второй раз. Чтобы вычислить процентили, используйте findPrctile
поддерживание функции упомянуто в этом примере.
dailyMax = retime(NO2bySite,"daily","max"); yearlyP98 = retime(dailyMax,"yearly",@(x)findPrctile(x,98))
yearlyP98=5×442 timetable
Timestamp Alaska_KenaiPeninsula_1004 Arizona_Apache_10 Arizona_Apache_11 Arizona_Apache_7 Arizona_Apache_8 Arizona_Apache_9 Arizona_Maricopa_3002 Arizona_Maricopa_3003 Arizona_Pima_1011 Arizona_Pima_19 Arizona_Pima_2 Arkansas_Pulaski_1002 California_Alameda_1001 California_Alameda_3 California_Butte_2 California_ContraCosta_1002 California_ContraCosta_2 California_ContraCosta_3 California_ContraCosta_3001 California_ElDorado_9 California_Fresno_241 California_Fresno_242 California_Fresno_5 California_Fresno_6 California_Fresno_7 California_Kern_232 California_Kern_4 California_Kern_5001 California_Kern_6 California_Kern_6001 California_Kern_7 California_LosAngeles_1002 California_LosAngeles_1103 California_LosAngeles_1105 California_LosAngeles_113 California_LosAngeles_1201 California_LosAngeles_1301 California_LosAngeles_16 California_LosAngeles_1601 California_LosAngeles_1701 California_LosAngeles_2 California_LosAngeles_2005 California_LosAngeles_2401 California_LosAngeles_4002 California_LosAngeles_4101 California_LosAngeles_5001 California_LosAngeles_6002 California_LosAngeles_7001 California_LosAngeles_8001 California_Marin_1 California_Mendocino_7 California_Monterey_1002 California_Napa_3 California_Orange_1 California_Orange_1002 California_Orange_5001 California_Plumas_1001 California_Riverside_5001 California_Riverside_6001 California_Riverside_8001 California_Sacramento_1 California_Sacramento_10 California_Sacramento_1001 California_Sacramento_2 California_Sacramento_5002 California_Sacramento_6 California_SanBernardino_1 California_SanBernardino_1004 California_SanBernardino_12 California_SanBernardino_2002 California_SanBernardino_3 California_SanBernardino_4001 California_SanBernardino_6 California_SanBernardino_7002 California_SanBernardino_9004 California_SanDiego_1 California_SanDiego_1002 California_SanDiego_1004 California_SanDiego_1006 California_SanDiego_1007 California_SanDiego_3 California_SanDiego_5 California_SanDiego_6 California_SanFrancisco_4 California_SanFrancisco_5 California_SanJoaquin_1002 California_SanLuisObispo_1004 California_SanLuisObispo_2001 California_SanLuisObispo_2002 California_SanLuisObispo_4001 California_SanMateo_1001 California_SantaBarbara_10 California_SantaBarbara_1010 California_SantaBarbara_1011 California_SantaBarbara_1012 California_SantaBarbara_1013 California_SantaBarbara_1014 California_SantaBarbara_1015 California_SantaBarbara_1016 California_SantaBarbara_1017 California_SantaBarbara_1018 California_SantaBarbara_1019 California_SantaBarbara_1020 California_SantaBarbara_1021 California_SantaBarbara_1025 California_SantaBarbara_1026 California_SantaBarbara_1027 California_SantaBarbara_1030 California_SantaBarbara_2002 California_SantaBarbara_2004 California_SantaBarbara_2005 California_SantaBarbara_4002 California_SantaBarbara_4003 California_SantaBarbara_4004 California_SantaBarbara_5001 California_SantaBarbara_8 California_SantaBarbara_9 California_SantaClara_2004 California_SantaCruz_3 California_Shasta_1001 California_Shasta_6 California_Solano_4 California_Sonoma_3 California_Stanislaus_1003 California_Stanislaus_1004 California_Stanislaus_5 California_Tulare_2002 California_Ventura_1003 California_Ventura_2002 California_Ventura_2003 California_Ventura_3001 California_Ventura_5 California_Ventura_6 California_Ventura_7001 Colorado_Adams_3001 Colorado_Arapahoe_1002 Colorado_Arapahoe_3 Colorado_Denver_2 Colorado_ElPaso_4 Colorado_ElPaso_6001 Colorado_ElPaso_6003 Colorado_ElPaso_6004 Colorado_ElPaso_6005 Colorado_ElPaso_6006 Colorado_ElPaso_6009 Colorado_ElPaso_6011 Colorado_ElPaso_6013 Connecticut_Fairfield_113 Connecticut_Fairfield_123 Connecticut_Hartford_1003 Connecticut_NewHaven_1123 Delaware_NewCastle_2002 Delaware_NewCastle_3001 DistrictOfColumbia_DistrictofColumbia_17 DistrictOfColumbia_DistrictofColumbia_25 Florida_Duval_32 Florida_Duval_70 Florida_Hillsborough_1052 Florida_Hillsborough_1055 Florida_Miami_Dade_27 Florida_Miami_Dade_4002 Florida_Orange_2002 Florida_PalmBeach_1004 Florida_PalmBeach_1101 Florida_Pinellas_18 Georgia_DeKalb_2 Georgia_Fulton_48 Illinois_Cook_1002 Illinois_Cook_1102 Illinois_Cook_1601 Illinois_Cook_3101 Illinois_Cook_3102 Illinois_Cook_3601 Illinois_Cook_37 Illinois_Cook_39 Illinois_Cook_40 Illinois_Cook_4002 Illinois_Cook_4003 Illinois_Cook_4004 Illinois_Cook_4005 Illinois_Cook_45 Illinois_Cook_53 Illinois_Cook_63 Illinois_DuPage_1003 Illinois_SaintClair_10 Indiana_Allen_6 Indiana_Clark_3 Indiana_Jasper_2 Indiana_Jasper_3 Indiana_Jefferson_1 Indiana_Knox_4 Indiana_Lake_1016 Indiana_Marion_30 Indiana_Marion_57 Indiana_Marion_65 Indiana_Marion_70 Indiana_Porter_15 Indiana_Porter_16 Indiana_Posey_1 Indiana_Posey_1002 Indiana_Posey_2 Indiana_Spencer_2 Indiana_Spencer_6 Indiana_Sullivan_1 Indiana_Tippecanoe_1001 Indiana_Vanderburgh_1001 Indiana_Vanderburgh_1002 Indiana_Vigo_1012 Kansas_Wyandotte_1 Kentucky_Boone_7 Kentucky_Boyd_10 Kentucky_Campbell_1001 Kentucky_Daviess_5 Kentucky_Fayette_12 Kentucky_Henderson_13 Kentucky_Jefferson_1020 Kentucky_McCracken_1024 Kentucky_Trigg_1 Louisiana_Calcasieu_100 Louisiana_EastBatonRouge_4 Louisiana_Jefferson_1001 Louisiana_Orleans_12 Louisiana_WestBatonRouge_1 Maryland_AnneArundel_19 Maryland_BaltimoreCity_40 Maryland_Baltimore_10 Maryland_Baltimore_3001 Massachusetts_Bristol_1004 Massachusetts_Essex_5 Massachusetts_Hampden_15 Massachusetts_Hampden_16 Massachusetts_Hampden_17 Massachusetts_Hampshire_4002 Massachusetts_Norfolk_8 Massachusetts_Norfolk_9 Massachusetts_Suffolk_1003 Massachusetts_Suffolk_2 Massachusetts_Suffolk_21 Massachusetts_Suffolk_35 Massachusetts_Suffolk_36 Massachusetts_Suffolk_37 Massachusetts_Worcester_20 Michigan_Dickinson_901 Michigan_Dickinson_902 Michigan_Kent_20 Michigan_Midland_940 Michigan_Midland_941 Michigan_Oakland_902 Michigan_Wayne_16 Michigan_Wayne_19 Michigan_Wayne_29 Minnesota_Carlton_6316 Minnesota_Hennepin_50 Minnesota_Hennepin_953 Minnesota_Ramsey_1 Minnesota_Ramsey_3 Minnesota_Ramsey_864 Minnesota_Wright_7 Missouri_Atchison_1 Missouri_Atchison_2 Missouri_Clay_25 Missouri_Clay_5 Missouri_Greene_14 Missouri_Greene_36 Missouri_Jackson_33 Missouri_Platte_23 Missouri_SaintCharles_1002 Missouri_SaintLouis_1 Missouri_SaintLouis_3001 Missouri_SaintLouis_5001 Missouri_SaintLouis_6 Missouri_SaintLouis_7001 Missouri_StLouisCity_72 Missouri_StLouisCity_80 Montana_Missoula_34 Montana_Rosebud_700 Montana_Rosebud_701 Montana_Rosebud_702 Montana_Rosebud_704 Montana_Rosebud_760 Montana_Rosebud_761 Montana_Rosebud_762 Nevada_Clark_1001 Nevada_Clark_16 Nevada_Clark_557 Nevada_Washoe_15 Nevada_Washoe_16 NewHampshire_Hillsborough_16 NewJersey_Bergen_1 NewJersey_Camden_3 NewJersey_Essex_1003 NewJersey_Essex_11 NewJersey_Hudson_6 NewJersey_Morris_3001 NewJersey_Union_4 NewJersey_Union_5001 NewMexico_Bernalillo_15 NewMexico_Bernalillo_23 NewMexico_Catron_1 NewMexico_Eddy_3 NewMexico_SanJuan_14 NewYork_Bronx_74 NewYork_Erie_2 NewYork_Erie_5 NewYork_Essex_5 NewYork_Nassau_5 NewYork_NewYork_10 NewYork_NewYork_56 NewYork_NewYork_63 NorthCarolina_Forsyth_22 NorthCarolina_Forsyth_7 NorthCarolina_Mecklenburg_34 NorthCarolina_Wake_14 NorthDakota_Burke_1 NorthDakota_Dunn_3 NorthDakota_Mercer_1 NorthDakota_Mercer_101 NorthDakota_Mercer_102 NorthDakota_Mercer_103 NorthDakota_Mercer_104 NorthDakota_Oliver_101 NorthDakota_Oliver_2 Ohio_Cuyahoga_2003 Ohio_Cuyahoga_33 Ohio_Cuyahoga_43 Ohio_Franklin_4 Ohio_Hamilton_1013 Ohio_Hamilton_35 Ohio_Hamilton_4002 Ohio_Jefferson_1012 Ohio_Montgomery_29 Ohio_Pickaway_1 Ohio_Pickaway_1001 Ohio_Stark_16 Oklahoma_Cleveland_44 Oklahoma_Cleveland_49 Oklahoma_Kay_600 Oklahoma_Muskogee_167 Oklahoma_Oklahoma_1037 Oklahoma_Oklahoma_33 Oklahoma_Tulsa_127 Oklahoma_Tulsa_174 Oklahoma_Tulsa_191 Oregon_Multnomah_80 Pennsylvania_Allegheny_3 Pennsylvania_Allegheny_31 Pennsylvania_Allegheny_8 Pennsylvania_Beaver_14 Pennsylvania_Berks_9 Pennsylvania_Blair_801 Pennsylvania_Bucks_12 Pennsylvania_Cambria_11 Pennsylvania_Dauphin_401 Pennsylvania_Delaware_2 Pennsylvania_Erie_10 Pennsylvania_Erie_3 Pennsylvania_Lackawanna_2006 Pennsylvania_Lancaster_7 Pennsylvania_Lawrence_15 Pennsylvania_Lehigh_4 Pennsylvania_Luzerne_1101 Pennsylvania_Montgomery_13 Pennsylvania_Northampton_17 Pennsylvania_Perry_301 Pennsylvania_Philadelphia_22 Pennsylvania_Philadelphia_23 Pennsylvania_Philadelphia_29 Pennsylvania_Philadelphia_4 Pennsylvania_Philadelphia_47 Pennsylvania_Washington_200 Pennsylvania_Washington_5 Pennsylvania_York_8 RhodeIsland_Providence_12 RhodeIsland_Providence_19 SouthCarolina_Aiken_3 SouthCarolina_Barnwell_1 SouthCarolina_Lexington_5 SouthCarolina_Richland_1006 Tennessee_Bradley_102 Tennessee_Davidson_10 Tennessee_Davidson_11 Tennessee_Giles_1 Tennessee_Maury_106 Tennessee_McMinn_101 Tennessee_Rutherford_101 Tennessee_Shelby_24 Tennessee_Sullivan_7 Tennessee_Sullivan_9 Tennessee_Williamson_103 Texas_Bexar_36 Texas_Brazoria_1003 Texas_Dallas_44 Texas_Dallas_45 Texas_Dallas_55 Texas_Dallas_69 Texas_ElPaso_27 Texas_ElPaso_37 Texas_Galveston_1002 Texas_Gregg_1 Texas_Harris_1034 Texas_Harris_1035 Texas_Harris_1037 Texas_Harris_24 Texas_Harris_26 Texas_Harris_47 Texas_Harris_7001 Texas_Jefferson_9 Texas_Orange_1001 Texas_Tarrant_1002 Texas_Tarrant_1003 Texas_Travis_17 Utah_Davis_1 Utah_SaltLake_3001 Utah_Utah_2 Utah_Weber_1 Vermont_Chittenden_3 Vermont_Rutland_2 Virginia_AlexandriaCity_9 Virginia_Arlington_20 Virginia_FairfaxCity_5 Virginia_Fairfax_1004 Virginia_Fairfax_18 Virginia_Fairfax_5001 Virginia_Henrico_14 Virginia_NorfolkCity_23 Virginia_RichmondCity_21 Virginia_Roanoke_1004 Virginia_VirginiaBeachCity_7 Washington_King_80 Washington_King_82 WestVirginia_Cabell_6 WestVirginia_Greenbrier_1 WestVirginia_Hancock_1004 WestVirginia_Kanawha_4 WestVirginia_Ohio_7 Wisconsin_Columbia_8 Wisconsin_Kenosha_1001 Wisconsin_Kenosha_16 Wisconsin_Milwaukee_41 Wisconsin_Milwaukee_80 Wisconsin_Rock_1002 Wisconsin_Rock_1004
___________ __________________________ _________________ _________________ ________________ ________________ ________________ _____________________ _____________________ _________________ _______________ ______________ _____________________ _______________________ ____________________ __________________ ___________________________ ________________________ ________________________ ___________________________ _____________________ _____________________ _____________________ ___________________ ___________________ ___________________ ___________________ _________________ ____________________ _________________ ____________________ _________________ __________________________ __________________________ __________________________ _________________________ __________________________ __________________________ ________________________ __________________________ __________________________ _______________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________ ______________________ ________________________ _________________ ___________________ ______________________ ______________________ ______________________ _________________________ _________________________ _________________________ _______________________ ________________________ __________________________ _______________________ __________________________ _______________________ __________________________ _____________________________ ___________________________ _____________________________ __________________________ _____________________________ __________________________ _____________________________ _____________________________ _____________________ ________________________ ________________________ ________________________ ________________________ _____________________ _____________________ _____________________ _________________________ _________________________ __________________________ _____________________________ _____________________________ _____________________________ _____________________________ ________________________ __________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ _________________________ _________________________ __________________________ ______________________ ______________________ ___________________ ___________________ ___________________ __________________________ __________________________ _______________________ ______________________ _______________________ _______________________ _______________________ _______________________ ____________________ ____________________ _______________________ ___________________ ______________________ ___________________ _________________ _________________ ____________________ ____________________ ____________________ ____________________ ____________________ ____________________ ____________________ ____________________ _________________________ _________________________ _________________________ _________________________ _______________________ _______________________ ________________________________________ ________________________________________ ________________ ________________ _________________________ _________________________ _____________________ _______________________ ___________________ ______________________ ______________________ ___________________ ________________ _________________ __________________ __________________ __________________ __________________ __________________ __________________ ________________ ________________ ________________ __________________ __________________ __________________ __________________ ________________ ________________ ________________ ____________________ ______________________ _______________ _______________ ________________ ________________ ___________________ ______________ _________________ _________________ _________________ _________________ _________________ _________________ _________________ _______________ __________________ _______________ _________________ _________________ __________________ _______________________ ________________________ ________________________ _________________ __________________ ________________ ________________ ______________________ __________________ ___________________ _____________________ _______________________ _______________________ ________________ _______________________ __________________________ ________________________ ____________________ __________________________ _______________________ _________________________ _____________________ _______________________ __________________________ _____________________ ________________________ ________________________ ________________________ ____________________________ _______________________ _______________________ __________________________ _______________________ ________________________ ________________________ ________________________ ________________________ __________________________ ______________________ ______________________ ________________ ____________________ ____________________ ____________________ _________________ _________________ _________________ ______________________ _____________________ ______________________ __________________ __________________ ____________________ __________________ ___________________ ___________________ ________________ _______________ __________________ __________________ ___________________ __________________ __________________________ _____________________ ________________________ ________________________ _____________________ ________________________ _______________________ _______________________ ___________________ ___________________ ___________________ ___________________ ___________________ ___________________ ___________________ ___________________ _________________ _______________ ________________ ________________ ________________ ____________________________ __________________ __________________ ____________________ __________________ __________________ _____________________ _________________ ____________________ _______________________ _______________________ __________________ ________________ ____________________ ________________ ______________ ______________ _______________ ________________ __________________ __________________ __________________ ________________________ _______________________ ____________________________ _____________________ ___________________ __________________ ____________________ ______________________ ______________________ ______________________ ______________________ ______________________ ____________________ __________________ ________________ ________________ _______________ __________________ ________________ __________________ ___________________ __________________ _______________ __________________ _____________ _____________________ _____________________ ________________ _____________________ ______________________ ____________________ __________________ __________________ __________________ ___________________ ________________________ _________________________ ________________________ ______________________ ____________________ ______________________ _____________________ _______________________ ________________________ _______________________ ____________________ ___________________ ____________________________ ________________________ ________________________ _____________________ _________________________ __________________________ ___________________________ ______________________ ____________________________ ____________________________ ____________________________ ___________________________ ____________________________ ___________________________ _________________________ ___________________ _________________________ _________________________ _____________________ ________________________ _________________________ ___________________________ _____________________ _____________________ _____________________ _________________ ___________________ ____________________ ________________________ ___________________ ____________________ ____________________ ________________________ ______________ ___________________ _______________ _______________ _______________ _______________ _______________ _______________ ____________________ _____________ _________________ _________________ _________________ _______________ _______________ _______________ _________________ _________________ _________________ __________________ __________________ _______________ ____________ __________________ ___________ ____________ ____________________ _________________ _________________________ _____________________ ______________________ _____________________ ___________________ _____________________ ___________________ _______________________ ________________________ _____________________ ____________________________ __________________ __________________ _____________________ _________________________ _________________________ ______________________ ___________________ ____________________ ______________________ ____________________ ______________________ ______________________ ___________________ ___________________
01-Jan-1985 NaN 27 29 25 10 22 100 60 70 NaN 80 53 100 80 60 50 80 80 120 60 NaN NaN 120 70 90 90 110 NaN NaN NaN NaN 190 230 230 180 140 210 NaN 210 170 180 170 200 220 NaN NaN NaN 60 200 70 NaN 70 60 170 150 170 NaN 70 NaN 130 90 NaN 80 80 NaN 90 110 130 NaN 120 120 NaN 50 100 NaN 110 120 150 70 NaN 130 NaN 110 110 NaN 80 30 50 70 50 100 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 80 NaN 40 NaN NaN NaN NaN 60 90 NaN NaN 20 NaN 70 80 NaN NaN 100 100 NaN NaN 70 60 30 NaN 100 132 86 NaN 160 106 NaN NaN NaN NaN NaN NaN NaN NaN NaN 84 66 88 80 160 103 84 65 50 54 58 47 61 45 NaN 72 65 52.5 89.7 97 91 63 93 NaN NaN 89 97 114 86 NaN NaN NaN 87 81 NaN NaN 66 NaN 60 47 47 53 NaN NaN 75 71 NaN 74 60 97 NaN 96 NaN 37 34 34 NaN 53 69 36 NaN 56 115 65 49 55 83 98 68 25 39.8 94 60 77 81 64 107 66 81 57 67 74 NaN NaN NaN NaN NaN 71 99 87 NaN NaN 65 NaN 37.7 30.8 NaN NaN NaN 60 14.8 81.7 NaN NaN 66 NaN NaN 70 NaN NaN NaN NaN 65.3 45 33 NaN 127.9 52.5 40 63 60 65 52 NaN 172 79 NaN 37 40 31 37 39 36.5 28 284.6 NaN 181.6 NaN 120 NaN 117 94 109 108 119 73 124 82 75 NaN 23 NaN 60 139 62 80 27 113 125 NaN NaN 54 NaN 65 NaN NaN 11 26 25 29 20 36 28 NaN NaN 105 80 82 56 85 97 65 87 NaN NaN 82 61 NaN NaN NaN 55.2 60.5 67.9 48.8 77 73.2 NaN 96 87 91 73 61 93 70 70 72 82 NaN 85 65 67 68 73 76 65 40 110 NaN 110 100 90 88 56 77 75 NaN NaN 27 NaN 39.8 45 NaN NaN 64 NaN 40 NaN 95 67 57.5 NaN 60 60 100 70 60 NaN 80 80 60 30 90 100 100 70 60 100 50 60 30 80 90 NaN NaN 130 130 110 49 NaN 90 90 74.8 87.1 69 90.2 NaN NaN 80 53 67 70 90 56 31 70 68 55 34.5 81 77 66 82 54.1 49.3
01-Jan-1986 NaN 13 14 15 11 13 NaN 43 114 NaN 81 54 110 80 60 50 80 80 140 60 80 NaN 140 50 80 80 100 NaN NaN NaN NaN 210 240 NaN 190 150 210 NaN 180 180 180 180 180 210 NaN 180 NaN 60 NaN 80 NaN 60 80 180 140 160 NaN 70 NaN 120 90 NaN 50 60 NaN 70 100 140 NaN 150 NaN 60 60 80 NaN 110 120 150 70 NaN 140 130 120 80 80 100 30 50 70 50 100 NaN 49 53 21 20 25 41 NaN NaN NaN NaN NaN 34 NaN NaN NaN 29 70 40 30 30 NaN 29 30 50 70 NaN NaN NaN 70 80 80 50 NaN 100 90 NaN 110 70 70 30 NaN NaN 133 94 NaN 155 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 84 71 89 80 90 85 122 65 NaN 61 NaN 71 73 45 42 67 NaN 72.2 94 87 42 60 85 NaN NaN 77 86 113 80 75 NaN NaN 49 81 NaN NaN 75 50 66 NaN NaN 60 130 NaN NaN 68 NaN 237 NaN NaN 49 NaN NaN 36 35 35 NaN 31 61 33 116.8 46 115 55 48 75 77 98 76 21 NaN 84 71 85 81 66 110 NaN 81 49 114 85 NaN NaN 55 NaN NaN 121 122 93 NaN NaN 73 110 40.8 35 NaN NaN NaN 39.8 66.9 92.9 NaN NaN 80 NaN 53 71 NaN NaN NaN NaN 65.8 52 32 NaN NaN 54.1 45 75 84 67 58 NaN 157 81 NaN 38 30 27 35 28 26 48 NaN NaN 116.3 NaN 210 52 92 85 111 100 117 57 100 82 64 NaN 15 40 NaN 113 72 114 20 101 138 127 NaN 66 46 79 NaN NaN 20 28 24 38 21 31 23 NaN 65 75 75 94 63 90 85 86 72 NaN NaN 69 61.6 NaN NaN 63.7 54.1 63.2 64.2 53.6 82.3 97.7 NaN 180 88 65 71 NaN 98 67 72 NaN 60 NaN 60 59 67 75 79 NaN NaN 42 NaN 40 110 90 90 83 61 70 72 NaN 33.4 21.7 27 NaN 62 NaN NaN 53 NaN 57 NaN 91 72.5 67 NaN NaN 70 110 70 70 80 100 70 NaN NaN 80 90 110 70 60 100 NaN 40 NaN 70 80 NaN NaN 130 90 80 57 NaN 85 85 80.7 71.6 78.6 72.7 NaN NaN 75 55 68 80 90 70 29 67 72 62 35.5 99 119 71 80 45.1 56.8
Затем вычислите скользящее среднее значение для каждого сайта, задав трехлетнее окно для скользящего среднего значения. smoothdata
позволяет вам применить movmean
функционируйте к каждой переменной в yearlyP98
.
moving3yearAvg = smoothdata(yearlyP98,"movmean",[years(3) 0])
moving3yearAvg=5×442 timetable
Timestamp Alaska_KenaiPeninsula_1004 Arizona_Apache_10 Arizona_Apache_11 Arizona_Apache_7 Arizona_Apache_8 Arizona_Apache_9 Arizona_Maricopa_3002 Arizona_Maricopa_3003 Arizona_Pima_1011 Arizona_Pima_19 Arizona_Pima_2 Arkansas_Pulaski_1002 California_Alameda_1001 California_Alameda_3 California_Butte_2 California_ContraCosta_1002 California_ContraCosta_2 California_ContraCosta_3 California_ContraCosta_3001 California_ElDorado_9 California_Fresno_241 California_Fresno_242 California_Fresno_5 California_Fresno_6 California_Fresno_7 California_Kern_232 California_Kern_4 California_Kern_5001 California_Kern_6 California_Kern_6001 California_Kern_7 California_LosAngeles_1002 California_LosAngeles_1103 California_LosAngeles_1105 California_LosAngeles_113 California_LosAngeles_1201 California_LosAngeles_1301 California_LosAngeles_16 California_LosAngeles_1601 California_LosAngeles_1701 California_LosAngeles_2 California_LosAngeles_2005 California_LosAngeles_2401 California_LosAngeles_4002 California_LosAngeles_4101 California_LosAngeles_5001 California_LosAngeles_6002 California_LosAngeles_7001 California_LosAngeles_8001 California_Marin_1 California_Mendocino_7 California_Monterey_1002 California_Napa_3 California_Orange_1 California_Orange_1002 California_Orange_5001 California_Plumas_1001 California_Riverside_5001 California_Riverside_6001 California_Riverside_8001 California_Sacramento_1 California_Sacramento_10 California_Sacramento_1001 California_Sacramento_2 California_Sacramento_5002 California_Sacramento_6 California_SanBernardino_1 California_SanBernardino_1004 California_SanBernardino_12 California_SanBernardino_2002 California_SanBernardino_3 California_SanBernardino_4001 California_SanBernardino_6 California_SanBernardino_7002 California_SanBernardino_9004 California_SanDiego_1 California_SanDiego_1002 California_SanDiego_1004 California_SanDiego_1006 California_SanDiego_1007 California_SanDiego_3 California_SanDiego_5 California_SanDiego_6 California_SanFrancisco_4 California_SanFrancisco_5 California_SanJoaquin_1002 California_SanLuisObispo_1004 California_SanLuisObispo_2001 California_SanLuisObispo_2002 California_SanLuisObispo_4001 California_SanMateo_1001 California_SantaBarbara_10 California_SantaBarbara_1010 California_SantaBarbara_1011 California_SantaBarbara_1012 California_SantaBarbara_1013 California_SantaBarbara_1014 California_SantaBarbara_1015 California_SantaBarbara_1016 California_SantaBarbara_1017 California_SantaBarbara_1018 California_SantaBarbara_1019 California_SantaBarbara_1020 California_SantaBarbara_1021 California_SantaBarbara_1025 California_SantaBarbara_1026 California_SantaBarbara_1027 California_SantaBarbara_1030 California_SantaBarbara_2002 California_SantaBarbara_2004 California_SantaBarbara_2005 California_SantaBarbara_4002 California_SantaBarbara_4003 California_SantaBarbara_4004 California_SantaBarbara_5001 California_SantaBarbara_8 California_SantaBarbara_9 California_SantaClara_2004 California_SantaCruz_3 California_Shasta_1001 California_Shasta_6 California_Solano_4 California_Sonoma_3 California_Stanislaus_1003 California_Stanislaus_1004 California_Stanislaus_5 California_Tulare_2002 California_Ventura_1003 California_Ventura_2002 California_Ventura_2003 California_Ventura_3001 California_Ventura_5 California_Ventura_6 California_Ventura_7001 Colorado_Adams_3001 Colorado_Arapahoe_1002 Colorado_Arapahoe_3 Colorado_Denver_2 Colorado_ElPaso_4 Colorado_ElPaso_6001 Colorado_ElPaso_6003 Colorado_ElPaso_6004 Colorado_ElPaso_6005 Colorado_ElPaso_6006 Colorado_ElPaso_6009 Colorado_ElPaso_6011 Colorado_ElPaso_6013 Connecticut_Fairfield_113 Connecticut_Fairfield_123 Connecticut_Hartford_1003 Connecticut_NewHaven_1123 Delaware_NewCastle_2002 Delaware_NewCastle_3001 DistrictOfColumbia_DistrictofColumbia_17 DistrictOfColumbia_DistrictofColumbia_25 Florida_Duval_32 Florida_Duval_70 Florida_Hillsborough_1052 Florida_Hillsborough_1055 Florida_Miami_Dade_27 Florida_Miami_Dade_4002 Florida_Orange_2002 Florida_PalmBeach_1004 Florida_PalmBeach_1101 Florida_Pinellas_18 Georgia_DeKalb_2 Georgia_Fulton_48 Illinois_Cook_1002 Illinois_Cook_1102 Illinois_Cook_1601 Illinois_Cook_3101 Illinois_Cook_3102 Illinois_Cook_3601 Illinois_Cook_37 Illinois_Cook_39 Illinois_Cook_40 Illinois_Cook_4002 Illinois_Cook_4003 Illinois_Cook_4004 Illinois_Cook_4005 Illinois_Cook_45 Illinois_Cook_53 Illinois_Cook_63 Illinois_DuPage_1003 Illinois_SaintClair_10 Indiana_Allen_6 Indiana_Clark_3 Indiana_Jasper_2 Indiana_Jasper_3 Indiana_Jefferson_1 Indiana_Knox_4 Indiana_Lake_1016 Indiana_Marion_30 Indiana_Marion_57 Indiana_Marion_65 Indiana_Marion_70 Indiana_Porter_15 Indiana_Porter_16 Indiana_Posey_1 Indiana_Posey_1002 Indiana_Posey_2 Indiana_Spencer_2 Indiana_Spencer_6 Indiana_Sullivan_1 Indiana_Tippecanoe_1001 Indiana_Vanderburgh_1001 Indiana_Vanderburgh_1002 Indiana_Vigo_1012 Kansas_Wyandotte_1 Kentucky_Boone_7 Kentucky_Boyd_10 Kentucky_Campbell_1001 Kentucky_Daviess_5 Kentucky_Fayette_12 Kentucky_Henderson_13 Kentucky_Jefferson_1020 Kentucky_McCracken_1024 Kentucky_Trigg_1 Louisiana_Calcasieu_100 Louisiana_EastBatonRouge_4 Louisiana_Jefferson_1001 Louisiana_Orleans_12 Louisiana_WestBatonRouge_1 Maryland_AnneArundel_19 Maryland_BaltimoreCity_40 Maryland_Baltimore_10 Maryland_Baltimore_3001 Massachusetts_Bristol_1004 Massachusetts_Essex_5 Massachusetts_Hampden_15 Massachusetts_Hampden_16 Massachusetts_Hampden_17 Massachusetts_Hampshire_4002 Massachusetts_Norfolk_8 Massachusetts_Norfolk_9 Massachusetts_Suffolk_1003 Massachusetts_Suffolk_2 Massachusetts_Suffolk_21 Massachusetts_Suffolk_35 Massachusetts_Suffolk_36 Massachusetts_Suffolk_37 Massachusetts_Worcester_20 Michigan_Dickinson_901 Michigan_Dickinson_902 Michigan_Kent_20 Michigan_Midland_940 Michigan_Midland_941 Michigan_Oakland_902 Michigan_Wayne_16 Michigan_Wayne_19 Michigan_Wayne_29 Minnesota_Carlton_6316 Minnesota_Hennepin_50 Minnesota_Hennepin_953 Minnesota_Ramsey_1 Minnesota_Ramsey_3 Minnesota_Ramsey_864 Minnesota_Wright_7 Missouri_Atchison_1 Missouri_Atchison_2 Missouri_Clay_25 Missouri_Clay_5 Missouri_Greene_14 Missouri_Greene_36 Missouri_Jackson_33 Missouri_Platte_23 Missouri_SaintCharles_1002 Missouri_SaintLouis_1 Missouri_SaintLouis_3001 Missouri_SaintLouis_5001 Missouri_SaintLouis_6 Missouri_SaintLouis_7001 Missouri_StLouisCity_72 Missouri_StLouisCity_80 Montana_Missoula_34 Montana_Rosebud_700 Montana_Rosebud_701 Montana_Rosebud_702 Montana_Rosebud_704 Montana_Rosebud_760 Montana_Rosebud_761 Montana_Rosebud_762 Nevada_Clark_1001 Nevada_Clark_16 Nevada_Clark_557 Nevada_Washoe_15 Nevada_Washoe_16 NewHampshire_Hillsborough_16 NewJersey_Bergen_1 NewJersey_Camden_3 NewJersey_Essex_1003 NewJersey_Essex_11 NewJersey_Hudson_6 NewJersey_Morris_3001 NewJersey_Union_4 NewJersey_Union_5001 NewMexico_Bernalillo_15 NewMexico_Bernalillo_23 NewMexico_Catron_1 NewMexico_Eddy_3 NewMexico_SanJuan_14 NewYork_Bronx_74 NewYork_Erie_2 NewYork_Erie_5 NewYork_Essex_5 NewYork_Nassau_5 NewYork_NewYork_10 NewYork_NewYork_56 NewYork_NewYork_63 NorthCarolina_Forsyth_22 NorthCarolina_Forsyth_7 NorthCarolina_Mecklenburg_34 NorthCarolina_Wake_14 NorthDakota_Burke_1 NorthDakota_Dunn_3 NorthDakota_Mercer_1 NorthDakota_Mercer_101 NorthDakota_Mercer_102 NorthDakota_Mercer_103 NorthDakota_Mercer_104 NorthDakota_Oliver_101 NorthDakota_Oliver_2 Ohio_Cuyahoga_2003 Ohio_Cuyahoga_33 Ohio_Cuyahoga_43 Ohio_Franklin_4 Ohio_Hamilton_1013 Ohio_Hamilton_35 Ohio_Hamilton_4002 Ohio_Jefferson_1012 Ohio_Montgomery_29 Ohio_Pickaway_1 Ohio_Pickaway_1001 Ohio_Stark_16 Oklahoma_Cleveland_44 Oklahoma_Cleveland_49 Oklahoma_Kay_600 Oklahoma_Muskogee_167 Oklahoma_Oklahoma_1037 Oklahoma_Oklahoma_33 Oklahoma_Tulsa_127 Oklahoma_Tulsa_174 Oklahoma_Tulsa_191 Oregon_Multnomah_80 Pennsylvania_Allegheny_3 Pennsylvania_Allegheny_31 Pennsylvania_Allegheny_8 Pennsylvania_Beaver_14 Pennsylvania_Berks_9 Pennsylvania_Blair_801 Pennsylvania_Bucks_12 Pennsylvania_Cambria_11 Pennsylvania_Dauphin_401 Pennsylvania_Delaware_2 Pennsylvania_Erie_10 Pennsylvania_Erie_3 Pennsylvania_Lackawanna_2006 Pennsylvania_Lancaster_7 Pennsylvania_Lawrence_15 Pennsylvania_Lehigh_4 Pennsylvania_Luzerne_1101 Pennsylvania_Montgomery_13 Pennsylvania_Northampton_17 Pennsylvania_Perry_301 Pennsylvania_Philadelphia_22 Pennsylvania_Philadelphia_23 Pennsylvania_Philadelphia_29 Pennsylvania_Philadelphia_4 Pennsylvania_Philadelphia_47 Pennsylvania_Washington_200 Pennsylvania_Washington_5 Pennsylvania_York_8 RhodeIsland_Providence_12 RhodeIsland_Providence_19 SouthCarolina_Aiken_3 SouthCarolina_Barnwell_1 SouthCarolina_Lexington_5 SouthCarolina_Richland_1006 Tennessee_Bradley_102 Tennessee_Davidson_10 Tennessee_Davidson_11 Tennessee_Giles_1 Tennessee_Maury_106 Tennessee_McMinn_101 Tennessee_Rutherford_101 Tennessee_Shelby_24 Tennessee_Sullivan_7 Tennessee_Sullivan_9 Tennessee_Williamson_103 Texas_Bexar_36 Texas_Brazoria_1003 Texas_Dallas_44 Texas_Dallas_45 Texas_Dallas_55 Texas_Dallas_69 Texas_ElPaso_27 Texas_ElPaso_37 Texas_Galveston_1002 Texas_Gregg_1 Texas_Harris_1034 Texas_Harris_1035 Texas_Harris_1037 Texas_Harris_24 Texas_Harris_26 Texas_Harris_47 Texas_Harris_7001 Texas_Jefferson_9 Texas_Orange_1001 Texas_Tarrant_1002 Texas_Tarrant_1003 Texas_Travis_17 Utah_Davis_1 Utah_SaltLake_3001 Utah_Utah_2 Utah_Weber_1 Vermont_Chittenden_3 Vermont_Rutland_2 Virginia_AlexandriaCity_9 Virginia_Arlington_20 Virginia_FairfaxCity_5 Virginia_Fairfax_1004 Virginia_Fairfax_18 Virginia_Fairfax_5001 Virginia_Henrico_14 Virginia_NorfolkCity_23 Virginia_RichmondCity_21 Virginia_Roanoke_1004 Virginia_VirginiaBeachCity_7 Washington_King_80 Washington_King_82 WestVirginia_Cabell_6 WestVirginia_Greenbrier_1 WestVirginia_Hancock_1004 WestVirginia_Kanawha_4 WestVirginia_Ohio_7 Wisconsin_Columbia_8 Wisconsin_Kenosha_1001 Wisconsin_Kenosha_16 Wisconsin_Milwaukee_41 Wisconsin_Milwaukee_80 Wisconsin_Rock_1002 Wisconsin_Rock_1004
___________ __________________________ _________________ _________________ ________________ ________________ ________________ _____________________ _____________________ _________________ _______________ ______________ _____________________ _______________________ ____________________ __________________ ___________________________ ________________________ ________________________ ___________________________ _____________________ _____________________ _____________________ ___________________ ___________________ ___________________ ___________________ _________________ ____________________ _________________ ____________________ _________________ __________________________ __________________________ __________________________ _________________________ __________________________ __________________________ ________________________ __________________________ __________________________ _______________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________ ______________________ ________________________ _________________ ___________________ ______________________ ______________________ ______________________ _________________________ _________________________ _________________________ _______________________ ________________________ __________________________ _______________________ __________________________ _______________________ __________________________ _____________________________ ___________________________ _____________________________ __________________________ _____________________________ __________________________ _____________________________ _____________________________ _____________________ ________________________ ________________________ ________________________ ________________________ _____________________ _____________________ _____________________ _________________________ _________________________ __________________________ _____________________________ _____________________________ _____________________________ _____________________________ ________________________ __________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ ____________________________ _________________________ _________________________ __________________________ ______________________ ______________________ ___________________ ___________________ ___________________ __________________________ __________________________ _______________________ ______________________ _______________________ _______________________ _______________________ _______________________ ____________________ ____________________ _______________________ ___________________ ______________________ ___________________ _________________ _________________ ____________________ ____________________ ____________________ ____________________ ____________________ ____________________ ____________________ ____________________ _________________________ _________________________ _________________________ _________________________ _______________________ _______________________ ________________________________________ ________________________________________ ________________ ________________ _________________________ _________________________ _____________________ _______________________ ___________________ ______________________ ______________________ ___________________ ________________ _________________ __________________ __________________ __________________ __________________ __________________ __________________ ________________ ________________ ________________ __________________ __________________ __________________ __________________ ________________ ________________ ________________ ____________________ ______________________ _______________ _______________ ________________ ________________ ___________________ ______________ _________________ _________________ _________________ _________________ _________________ _________________ _________________ _______________ __________________ _______________ _________________ _________________ __________________ _______________________ ________________________ ________________________ _________________ __________________ ________________ ________________ ______________________ __________________ ___________________ _____________________ _______________________ _______________________ ________________ _______________________ __________________________ ________________________ ____________________ __________________________ _______________________ _________________________ _____________________ _______________________ __________________________ _____________________ ________________________ ________________________ ________________________ ____________________________ _______________________ _______________________ __________________________ _______________________ ________________________ ________________________ ________________________ ________________________ __________________________ ______________________ ______________________ ________________ ____________________ ____________________ ____________________ _________________ _________________ _________________ ______________________ _____________________ ______________________ __________________ __________________ ____________________ __________________ ___________________ ___________________ ________________ _______________ __________________ __________________ ___________________ __________________ __________________________ _____________________ ________________________ ________________________ _____________________ ________________________ _______________________ _______________________ ___________________ ___________________ ___________________ ___________________ ___________________ ___________________ ___________________ ___________________ _________________ _______________ ________________ ________________ ________________ ____________________________ __________________ __________________ ____________________ __________________ __________________ _____________________ _________________ ____________________ _______________________ _______________________ __________________ ________________ ____________________ ________________ ______________ ______________ _______________ ________________ __________________ __________________ __________________ ________________________ _______________________ ____________________________ _____________________ ___________________ __________________ ____________________ ______________________ ______________________ ______________________ ______________________ ______________________ ____________________ __________________ ________________ ________________ _______________ __________________ ________________ __________________ ___________________ __________________ _______________ __________________ _____________ _____________________ _____________________ ________________ _____________________ ______________________ ____________________ __________________ __________________ __________________ ___________________ ________________________ _________________________ ________________________ ______________________ ____________________ ______________________ _____________________ _______________________ ________________________ _______________________ ____________________ ___________________ ____________________________ ________________________ ________________________ _____________________ _________________________ __________________________ ___________________________ ______________________ ____________________________ ____________________________ ____________________________ ___________________________ ____________________________ ___________________________ _________________________ ___________________ _________________________ _________________________ _____________________ ________________________ _________________________ ___________________________ _____________________ _____________________ _____________________ _________________ ___________________ ____________________ ________________________ ___________________ ____________________ ____________________ ________________________ ______________ ___________________ _______________ _______________ _______________ _______________ _______________ _______________ ____________________ _____________ _________________ _________________ _________________ _______________ _______________ _______________ _________________ _________________ _________________ __________________ __________________ _______________ ____________ __________________ ___________ ____________ ____________________ _________________ _________________________ _____________________ ______________________ _____________________ ___________________ _____________________ ___________________ _______________________ ________________________ _____________________ ____________________________ __________________ __________________ _____________________ _________________________ _________________________ ______________________ ___________________ ____________________ ______________________ ____________________ ______________________ ______________________ ___________________ ___________________
01-Jan-1985 NaN 27 29 25 10 22 100 60 70 NaN 80 53 100 80 60 50 80 80 120 60 NaN NaN 120 70 90 90 110 NaN NaN NaN NaN 190 230 230 180 140 210 NaN 210 170 180 170 200 220 NaN NaN NaN 60 200 70 NaN 70 60 170 150 170 NaN 70 NaN 130 90 NaN 80 80 NaN 90 110 130 NaN 120 120 NaN 50 100 NaN 110 120 150 70 NaN 130 NaN 110 110 NaN 80 30 50 70 50 100 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 80 NaN 40 NaN NaN NaN NaN 60 90 NaN NaN 20 NaN 70 80 NaN NaN 100 100 NaN NaN 70 60 30 NaN 100 132 86 NaN 160 106 NaN NaN NaN NaN NaN NaN NaN NaN NaN 84 66 88 80 160 103 84 65 50 54 58 47 61 45 NaN 72 65 52.5 89.7 97 91 63 93 NaN NaN 89 97 114 86 NaN NaN NaN 87 81 NaN NaN 66 NaN 60 47 47 53 NaN NaN 75 71 NaN 74 60 97 NaN 96 NaN 37 34 34 NaN 53 69 36 NaN 56 115 65 49 55 83 98 68 25 39.8 94 60 77 81 64 107 66 81 57 67 74 NaN NaN NaN NaN NaN 71 99 87 NaN NaN 65 NaN 37.7 30.8 NaN NaN NaN 60 14.8 81.7 NaN NaN 66 NaN NaN 70 NaN NaN NaN NaN 65.3 45 33 NaN 127.9 52.5 40 63 60 65 52 NaN 172 79 NaN 37 40 31 37 39 36.5 28 284.6 NaN 181.6 NaN 120 NaN 117 94 109 108 119 73 124 82 75 NaN 23 NaN 60 139 62 80 27 113 125 NaN NaN 54 NaN 65 NaN NaN 11 26 25 29 20 36 28 NaN NaN 105 80 82 56 85 97 65 87 NaN NaN 82 61 NaN NaN NaN 55.2 60.5 67.9 48.8 77 73.2 NaN 96 87 91 73 61 93 70 70 72 82 NaN 85 65 67 68 73 76 65 40 110 NaN 110 100 90 88 56 77 75 NaN NaN 27 NaN 39.8 45 NaN NaN 64 NaN 40 NaN 95 67 57.5 NaN 60 60 100 70 60 NaN 80 80 60 30 90 100 100 70 60 100 50 60 30 80 90 NaN NaN 130 130 110 49 NaN 90 90 74.8 87.1 69 90.2 NaN NaN 80 53 67 70 90 56 31 70 68 55 34.5 81 77 66 82 54.1 49.3
01-Jan-1986 NaN 20 21.5 20 10.5 17.5 100 51.5 92 NaN 80.5 53.5 105 80 60 50 80 80 130 60 80 NaN 130 60 85 85 105 NaN NaN NaN NaN 200 235 230 185 145 210 NaN 195 175 180 175 190 215 NaN 180 NaN 60 200 75 NaN 65 70 175 145 165 NaN 70 NaN 125 90 NaN 65 70 NaN 80 105 135 NaN 135 120 60 55 90 NaN 110 120 150 70 NaN 135 130 115 95 80 90 30 50 70 50 100 NaN 49 53 21 20 25 41 NaN NaN NaN NaN NaN 34 NaN NaN NaN 29 75 40 35 30 NaN 29 30 55 80 NaN NaN 20 70 75 80 50 NaN 100 95 NaN 110 70 65 30 NaN 100 132.5 90 NaN 157.5 106 NaN NaN NaN NaN NaN NaN NaN NaN NaN 84 68.5 88.5 80 125 94 103 65 50 57.5 58 59 67 45 42 69.5 65 62.35 91.85 92 66.5 61.5 89 NaN NaN 83 91.5 113.5 83 75 NaN NaN 68 81 NaN NaN 70.5 50 63 47 47 56.5 130 NaN 75 69.5 NaN 155.5 60 97 49 96 NaN 36.5 34.5 34.5 NaN 42 65 34.5 116.8 51 115 60 48.5 65 80 98 72 23 39.8 89 65.5 81 81 65 108.5 66 81 53 90.5 79.5 NaN NaN 55 NaN NaN 96 110.5 90 NaN NaN 69 110 39.25 32.9 NaN NaN NaN 49.9 40.85 87.3 NaN NaN 73 NaN 53 70.5 NaN NaN NaN NaN 65.55 48.5 32.5 NaN 127.9 53.3 42.5 69 72 66 55 NaN 164.5 80 NaN 37.5 35 29 36 33.5 31.25 38 284.6 NaN 148.95 NaN 165 52 104.5 89.5 110 104 118 65 112 82 69.5 NaN 19 40 60 126 67 97 23.5 107 131.5 127 NaN 60 46 72 NaN NaN 15.5 27 24.5 33.5 20.5 33.5 25.5 NaN 65 90 77.5 88 59.5 87.5 91 75.5 79.5 NaN NaN 75.5 61.3 NaN NaN 63.7 54.65 61.85 66.05 51.2 79.65 85.45 NaN 138 87.5 78 72 61 95.5 68.5 71 72 71 NaN 72.5 62 67 71.5 76 76 65 41 110 40 110 95 90 85.5 58.5 73.5 73.5 NaN 33.4 24.35 27 39.8 53.5 NaN NaN 58.5 NaN 48.5 NaN 93 69.75 62.25 NaN 60 65 105 70 65 80 90 75 60 30 85 95 105 70 60 100 50 50 30 75 85 NaN NaN 130 110 95 53 NaN 87.5 87.5 77.75 79.35 73.8 81.45 NaN NaN 77.5 54 67.5 75 90 63 30 68.5 70 58.5 35 90 98 68.5 81 49.6 53.05
Отобразите сайты, которые являются вне податливости. Сначала укажите диапазон времени, запускающийся в 1 987, первый год, в течение которого движущееся трехлетнее окно имеет три целых года данных.
full3years = timerange("1987-01-01","1989-01-01","closed")
full3years = timetable timerange subscript: Select timetable rows with times in the closed interval: [01-Jan-1987 00:00:00, 01-Jan-1989 00:00:00] See Select Timetable Data by Row Time and Variable Type.
Затем найдите сайты, которые превысили стандарт в течение любого года в 1987–1989 периодах времени. Векторный exceed
вектор из логических значений, значениями которых является 1
TRUE
) где соответствующие переменные moving3yearAvg
имейте значения, которые превышают стандарт. Можно использовать логические массивы, чтобы индексировать в таблицы. В этом случае индексируйте в moving3yearAvg
при помощи exceed
отобразить только переменные для сайтов, которые превышают стандарт.
exceed = any(moving3yearAvg{full3years,:}>100,1); moving3yearAvg(full3years,exceed)
ans=3×85 timetable
Timestamp California_Alameda_1001 California_ContraCosta_3001 California_Fresno_5 California_Kern_4 California_LosAngeles_1002 California_LosAngeles_1103 California_LosAngeles_1105 California_LosAngeles_113 California_LosAngeles_1201 California_LosAngeles_1301 California_LosAngeles_16 California_LosAngeles_1601 California_LosAngeles_1701 California_LosAngeles_2 California_LosAngeles_2005 California_LosAngeles_2401 California_LosAngeles_4002 California_LosAngeles_5001 California_LosAngeles_6002 California_LosAngeles_8001 California_Orange_1 California_Orange_1002 California_Orange_5001 California_Riverside_6001 California_Riverside_8001 California_SanBernardino_1 California_SanBernardino_1004 California_SanBernardino_2002 California_SanBernardino_3 California_SanBernardino_9004 California_SanDiego_1 California_SanDiego_1002 California_SanDiego_1004 California_SanDiego_1007 California_SanDiego_3 California_SanDiego_5 California_SanDiego_6 California_SanMateo_1001 California_SantaClara_2004 California_Tulare_2002 Colorado_Adams_3001 Colorado_Arapahoe_1002 Colorado_Arapahoe_3 Colorado_Denver_2 Colorado_ElPaso_4 Delaware_NewCastle_3001 DistrictOfColumbia_DistrictofColumbia_25 Illinois_Cook_3102 Illinois_Cook_40 Illinois_Cook_53 Indiana_Knox_4 Indiana_Lake_1016 Indiana_Marion_70 Kentucky_Boyd_10 Maryland_BaltimoreCity_40 Massachusetts_Hampden_17 Massachusetts_Suffolk_2 Massachusetts_Worcester_20 Missouri_Jackson_33 Missouri_StLouisCity_72 Montana_Missoula_34 Nevada_Clark_1001 Nevada_Clark_16 Nevada_Clark_557 Nevada_Washoe_15 Nevada_Washoe_16 NewHampshire_Hillsborough_16 NewJersey_Bergen_1 NewJersey_Essex_1003 NewJersey_Essex_11 NewJersey_Hudson_6 NewJersey_Union_4 NewYork_Bronx_74 NewYork_Nassau_5 NewYork_NewYork_10 NewYork_NewYork_56 NewYork_NewYork_63 Pennsylvania_Allegheny_31 Pennsylvania_Philadelphia_22 Pennsylvania_Philadelphia_29 Pennsylvania_Philadelphia_47 Texas_Dallas_44 Texas_Harris_1037 Utah_SaltLake_3001 Virginia_Fairfax_5001
___________ _______________________ ___________________________ ___________________ _________________ __________________________ __________________________ __________________________ _________________________ __________________________ __________________________ ________________________ __________________________ __________________________ _______________________ __________________________ __________________________ __________________________ __________________________ __________________________ __________________________ ___________________ ______________________ ______________________ _________________________ _________________________ __________________________ _____________________________ _____________________________ __________________________ _____________________________ _____________________ ________________________ ________________________ ________________________ _____________________ _____________________ _____________________ ________________________ __________________________ ______________________ ___________________ ______________________ ___________________ _________________ _________________ _______________________ ________________________________________ __________________ ________________ ________________ ______________ _________________ _________________ ________________ _________________________ ________________________ _______________________ __________________________ ___________________ _______________________ ___________________ _________________ _______________ ________________ ________________ ________________ ____________________________ __________________ ____________________ __________________ __________________ _________________ ________________ ________________ __________________ __________________ __________________ _________________________ ____________________________ ____________________________ ____________________________ _______________ _________________ __________________ _____________________
01-Jan-1987 100 133.33 120 103.33 196.67 230 230 176.67 140 200 NaN 190 173.33 173.33 173.33 196.67 200 180 NaN 200 176.67 143.33 170 NaN 126.67 103.33 140 133.33 120 140 110 116.67 146.67 NaN 133.33 135 116.67 96.667 NaN 93.333 133 95.667 NaN 157.33 106 110 101.33 NaN 116 114 109.5 NaN 189.33 117 104.33 NaN 108.33 122 127.9 138.67 NaN 284.6 NaN 133.63 140 163.33 85.5 107 113.33 112 117.67 108 119.33 108.67 127.67 126 NaN 125.67 110 123.33 96.667 105 106.67 120 81.45
01-Jan-1988 102.5 133.33 120 105 200 235 230 172.5 142.5 195 160 187.5 173.33 177.5 173.33 192.5 197.5 180 NaN 200 175 145 167.5 NaN 132.5 97.5 145 130 120 135 112.5 120 152.5 NaN 132.5 143.33 120 100 NaN 95 131.5 102.25 124 149.25 106 105 95.5 114 116 114 98.667 NaN 162.25 112.5 103.5 178 104.75 112.67 127.9 125 109 284.6 183.2 141.5 140 163.33 100.67 109.75 119.75 115.5 123.75 112 111 110.5 129.5 129 111 119 110 115 97.5 105 105 120 82.267
01-Jan-1989 103.33 140 113.33 110 196.67 230 NaN 160 140 183.33 155 183.33 175 170 170 196.67 190 180 120 NaN 176.67 160 166.67 120 140 86.667 156.67 126.67 NaN 136.67 116.67 123.33 163.33 170 130 150 126.67 103.33 130 103.33 133.33 114.5 108.5 153.33 NaN 83.333 85.667 99.5 121 180 83 140 137.67 103.67 95.667 178 93 102 NaN 86.667 92 NaN 162.75 136.1 140 160 119.33 112 121 122.67 124.33 123.33 96 106.33 126.33 130.33 111 99.667 NaN 113.33 110 NaN 106.67 118 100.9
NO2bySite
расписание имеет широты и долготы для сайтов, сохраненных как пользовательские свойства. Широты и долготы сопоставлены с переменными расписания. Можно отметить сайты, которые превысили стандарт на карте при помощи geoscatter
функция. Сайты, которые превысили стандарт в 1 987, отмечены желтым. (Здесь, moving3yearAvg{1,:}
получает доступ к первой строке расписания, соответствуя году 1987.) Сайты из податливости в 1 987 были обычно большими городами, такими как Лос-Анджелес. Из-за Закона о чистом воздухе, подобный анализ с помощью последних данных в течение лет 2015–2019 не показал бы сайтов из податливости со стандартом NO2.
geoscatter(moving3yearAvg.Properties.CustomProperties.Latitude,... moving3yearAvg.Properties.CustomProperties.Longitude,... moving3yearAvg{1,:},moving3yearAvg{1,:}>100,'filled')
Другой способ сгруппироваться ко времени при помощи периодических единиц измерения времени, чтобы искать вещи как сезонность или ежедневные циклы. Например, рассмотрите среднесуточный шаблон концентраций NO2 на каждом сайте. Вероятно, что выбросы сгорания ископаемого топлива деятельности человека и атмосферной фотохимии, управляемой солнцем, способствуют ежедневному циклу в концентрациях NO2. Вы не можете вычислить средний ежедневный цикл с помощью retime
. Один подход должен использовать varfun
функция путем добавления сгруппированной переменной на основе времени суток каждой метки времени. timeofday
функция возвращает время суток или отрезок времени с полуночи, как длительность. Этот пример кода показывает подход при помощи varfun
.
NO2bySite.Hour = timeofday(NO2bySite.Timestamp); NO2bySite.Hour.Format = "hh:mm"; meanDailyCycleNO2 = varfun(@mean,NO2bySite,"GroupingVariable","Hour")
В течение общих календарных периодов, таких как час дня или месяца года, существует более простой метод. Эти общие календарные периоды являются опциями groupsummary
функция. Вызовите groupsummary
с "hourofday"
опция.
meanDailyCycleNO2 = groupsummary(NO2bySite,"Timestamp","hourofday","mean")
meanDailyCycleNO2=24×444 table
hourofday_Timestamp GroupCount mean_Alaska_KenaiPeninsula_1004 mean_Arizona_Apache_10 mean_Arizona_Apache_11 mean_Arizona_Apache_7 mean_Arizona_Apache_8 mean_Arizona_Apache_9 mean_Arizona_Maricopa_3002 mean_Arizona_Maricopa_3003 mean_Arizona_Pima_1011 mean_Arizona_Pima_19 mean_Arizona_Pima_2 mean_Arkansas_Pulaski_1002 mean_California_Alameda_1001 mean_California_Alameda_3 mean_California_Butte_2 mean_California_ContraCosta_1002 mean_California_ContraCosta_2 mean_California_ContraCosta_3 mean_California_ContraCosta_3001 mean_California_ElDorado_9 mean_California_Fresno_241 mean_California_Fresno_242 mean_California_Fresno_5 mean_California_Fresno_6 mean_California_Fresno_7 mean_California_Kern_232 mean_California_Kern_4 mean_California_Kern_5001 mean_California_Kern_6 mean_California_Kern_6001 mean_California_Kern_7 mean_California_LosAngeles_1002 mean_California_LosAngeles_1103 mean_California_LosAngeles_1105 mean_California_LosAngeles_113 mean_California_LosAngeles_1201 mean_California_LosAngeles_1301 mean_California_LosAngeles_16 mean_California_LosAngeles_1601 mean_California_LosAngeles_1701 mean_California_LosAngeles_2 mean_California_LosAngeles_2005 mean_California_LosAngeles_2401 mean_California_LosAngeles_4002 mean_California_LosAngeles_4101 mean_California_LosAngeles_5001 mean_California_LosAngeles_6002 mean_California_LosAngeles_7001 mean_California_LosAngeles_8001 mean_California_Marin_1 mean_California_Mendocino_7 mean_California_Monterey_1002 mean_California_Napa_3 mean_California_Orange_1 mean_California_Orange_1002 mean_California_Orange_5001 mean_California_Plumas_1001 mean_California_Riverside_5001 mean_California_Riverside_6001 mean_California_Riverside_8001 mean_California_Sacramento_1 mean_California_Sacramento_10 mean_California_Sacramento_1001 mean_California_Sacramento_2 mean_California_Sacramento_5002 mean_California_Sacramento_6 mean_California_SanBernardino_1 mean_California_SanBernardino_1004 mean_California_SanBernardino_12 mean_California_SanBernardino_2002 mean_California_SanBernardino_3 mean_California_SanBernardino_4001 mean_California_SanBernardino_6 mean_California_SanBernardino_7002 mean_California_SanBernardino_9004 mean_California_SanDiego_1 mean_California_SanDiego_1002 mean_California_SanDiego_1004 mean_California_SanDiego_1006 mean_California_SanDiego_1007 mean_California_SanDiego_3 mean_California_SanDiego_5 mean_California_SanDiego_6 mean_California_SanFrancisco_4 mean_California_SanFrancisco_5 mean_California_SanJoaquin_1002 mean_California_SanLuisObispo_1004 mean_California_SanLuisObispo_2001 mean_California_SanLuisObispo_2002 mean_California_SanLuisObispo_4001 mean_California_SanMateo_1001 mean_California_SantaBarbara_10 mean_California_SantaBarbara_1010 mean_California_SantaBarbara_1011 mean_California_SantaBarbara_1012 mean_California_SantaBarbara_1013 mean_California_SantaBarbara_1014 mean_California_SantaBarbara_1015 mean_California_SantaBarbara_1016 mean_California_SantaBarbara_1017 mean_California_SantaBarbara_1018 mean_California_SantaBarbara_1019 mean_California_SantaBarbara_1020 mean_California_SantaBarbara_1021 mean_California_SantaBarbara_1025 mean_California_SantaBarbara_1026 mean_California_SantaBarbara_1027 mean_California_SantaBarbara_1030 mean_California_SantaBarbara_2002 mean_California_SantaBarbara_2004 mean_California_SantaBarbara_2005 mean_California_SantaBarbara_4002 mean_California_SantaBarbara_4003 mean_California_SantaBarbara_4004 mean_California_SantaBarbara_5001 mean_California_SantaBarbara_8 mean_California_SantaBarbara_9 mean_California_SantaClara_2004 mean_California_SantaCruz_3 mean_California_Shasta_1001 mean_California_Shasta_6 mean_California_Solano_4 mean_California_Sonoma_3 mean_California_Stanislaus_1003 mean_California_Stanislaus_1004 mean_California_Stanislaus_5 mean_California_Tulare_2002 mean_California_Ventura_1003 mean_California_Ventura_2002 mean_California_Ventura_2003 mean_California_Ventura_3001 mean_California_Ventura_5 mean_California_Ventura_6 mean_California_Ventura_7001 mean_Colorado_Adams_3001 mean_Colorado_Arapahoe_1002 mean_Colorado_Arapahoe_3 mean_Colorado_Denver_2 mean_Colorado_ElPaso_4 mean_Colorado_ElPaso_6001 mean_Colorado_ElPaso_6003 mean_Colorado_ElPaso_6004 mean_Colorado_ElPaso_6005 mean_Colorado_ElPaso_6006 mean_Colorado_ElPaso_6009 mean_Colorado_ElPaso_6011 mean_Colorado_ElPaso_6013 mean_Connecticut_Fairfield_113 mean_Connecticut_Fairfield_123 mean_Connecticut_Hartford_1003 mean_Connecticut_NewHaven_1123 mean_Delaware_NewCastle_2002 mean_Delaware_NewCastle_3001 mean_DistrictOfColumbia_DistrictofColumbia_17 mean_DistrictOfColumbia_DistrictofColumbia_25 mean_Florida_Duval_32 mean_Florida_Duval_70 mean_Florida_Hillsborough_1052 mean_Florida_Hillsborough_1055 mean_Florida_Miami_Dade_27 mean_Florida_Miami_Dade_4002 mean_Florida_Orange_2002 mean_Florida_PalmBeach_1004 mean_Florida_PalmBeach_1101 mean_Florida_Pinellas_18 mean_Georgia_DeKalb_2 mean_Georgia_Fulton_48 mean_Illinois_Cook_1002 mean_Illinois_Cook_1102 mean_Illinois_Cook_1601 mean_Illinois_Cook_3101 mean_Illinois_Cook_3102 mean_Illinois_Cook_3601 mean_Illinois_Cook_37 mean_Illinois_Cook_39 mean_Illinois_Cook_40 mean_Illinois_Cook_4002 mean_Illinois_Cook_4003 mean_Illinois_Cook_4004 mean_Illinois_Cook_4005 mean_Illinois_Cook_45 mean_Illinois_Cook_53 mean_Illinois_Cook_63 mean_Illinois_DuPage_1003 mean_Illinois_SaintClair_10 mean_Indiana_Allen_6 mean_Indiana_Clark_3 mean_Indiana_Jasper_2 mean_Indiana_Jasper_3 mean_Indiana_Jefferson_1 mean_Indiana_Knox_4 mean_Indiana_Lake_1016 mean_Indiana_Marion_30 mean_Indiana_Marion_57 mean_Indiana_Marion_65 mean_Indiana_Marion_70 mean_Indiana_Porter_15 mean_Indiana_Porter_16 mean_Indiana_Posey_1 mean_Indiana_Posey_1002 mean_Indiana_Posey_2 mean_Indiana_Spencer_2 mean_Indiana_Spencer_6 mean_Indiana_Sullivan_1 mean_Indiana_Tippecanoe_1001 mean_Indiana_Vanderburgh_1001 mean_Indiana_Vanderburgh_1002 mean_Indiana_Vigo_1012 mean_Kansas_Wyandotte_1 mean_Kentucky_Boone_7 mean_Kentucky_Boyd_10 mean_Kentucky_Campbell_1001 mean_Kentucky_Daviess_5 mean_Kentucky_Fayette_12 mean_Kentucky_Henderson_13 mean_Kentucky_Jefferson_1020 mean_Kentucky_McCracken_1024 mean_Kentucky_Trigg_1 mean_Louisiana_Calcasieu_100 mean_Louisiana_EastBatonRouge_4 mean_Louisiana_Jefferson_1001 mean_Louisiana_Orleans_12 mean_Louisiana_WestBatonRouge_1 mean_Maryland_AnneArundel_19 mean_Maryland_BaltimoreCity_40 mean_Maryland_Baltimore_10 mean_Maryland_Baltimore_3001 mean_Massachusetts_Bristol_1004 mean_Massachusetts_Essex_5 mean_Massachusetts_Hampden_15 mean_Massachusetts_Hampden_16 mean_Massachusetts_Hampden_17 mean_Massachusetts_Hampshire_4002 mean_Massachusetts_Norfolk_8 mean_Massachusetts_Norfolk_9 mean_Massachusetts_Suffolk_1003 mean_Massachusetts_Suffolk_2 mean_Massachusetts_Suffolk_21 mean_Massachusetts_Suffolk_35 mean_Massachusetts_Suffolk_36 mean_Massachusetts_Suffolk_37 mean_Massachusetts_Worcester_20 mean_Michigan_Dickinson_901 mean_Michigan_Dickinson_902 mean_Michigan_Kent_20 mean_Michigan_Midland_940 mean_Michigan_Midland_941 mean_Michigan_Oakland_902 mean_Michigan_Wayne_16 mean_Michigan_Wayne_19 mean_Michigan_Wayne_29 mean_Minnesota_Carlton_6316 mean_Minnesota_Hennepin_50 mean_Minnesota_Hennepin_953 mean_Minnesota_Ramsey_1 mean_Minnesota_Ramsey_3 mean_Minnesota_Ramsey_864 mean_Minnesota_Wright_7 mean_Missouri_Atchison_1 mean_Missouri_Atchison_2 mean_Missouri_Clay_25 mean_Missouri_Clay_5 mean_Missouri_Greene_14 mean_Missouri_Greene_36 mean_Missouri_Jackson_33 mean_Missouri_Platte_23 mean_Missouri_SaintCharles_1002 mean_Missouri_SaintLouis_1 mean_Missouri_SaintLouis_3001 mean_Missouri_SaintLouis_5001 mean_Missouri_SaintLouis_6 mean_Missouri_SaintLouis_7001 mean_Missouri_StLouisCity_72 mean_Missouri_StLouisCity_80 mean_Montana_Missoula_34 mean_Montana_Rosebud_700 mean_Montana_Rosebud_701 mean_Montana_Rosebud_702 mean_Montana_Rosebud_704 mean_Montana_Rosebud_760 mean_Montana_Rosebud_761 mean_Montana_Rosebud_762 mean_Nevada_Clark_1001 mean_Nevada_Clark_16 mean_Nevada_Clark_557 mean_Nevada_Washoe_15 mean_Nevada_Washoe_16 mean_NewHampshire_Hillsborough_16 mean_NewJersey_Bergen_1 mean_NewJersey_Camden_3 mean_NewJersey_Essex_1003 mean_NewJersey_Essex_11 mean_NewJersey_Hudson_6 mean_NewJersey_Morris_3001 mean_NewJersey_Union_4 mean_NewJersey_Union_5001 mean_NewMexico_Bernalillo_15 mean_NewMexico_Bernalillo_23 mean_NewMexico_Catron_1 mean_NewMexico_Eddy_3 mean_NewMexico_SanJuan_14 mean_NewYork_Bronx_74 mean_NewYork_Erie_2 mean_NewYork_Erie_5 mean_NewYork_Essex_5 mean_NewYork_Nassau_5 mean_NewYork_NewYork_10 mean_NewYork_NewYork_56 mean_NewYork_NewYork_63 mean_NorthCarolina_Forsyth_22 mean_NorthCarolina_Forsyth_7 mean_NorthCarolina_Mecklenburg_34 mean_NorthCarolina_Wake_14 mean_NorthDakota_Burke_1 mean_NorthDakota_Dunn_3 mean_NorthDakota_Mercer_1 mean_NorthDakota_Mercer_101 mean_NorthDakota_Mercer_102 mean_NorthDakota_Mercer_103 mean_NorthDakota_Mercer_104 mean_NorthDakota_Oliver_101 mean_NorthDakota_Oliver_2 mean_Ohio_Cuyahoga_2003 mean_Ohio_Cuyahoga_33 mean_Ohio_Cuyahoga_43 mean_Ohio_Franklin_4 mean_Ohio_Hamilton_1013 mean_Ohio_Hamilton_35 mean_Ohio_Hamilton_4002 mean_Ohio_Jefferson_1012 mean_Ohio_Montgomery_29 mean_Ohio_Pickaway_1 mean_Ohio_Pickaway_1001 mean_Ohio_Stark_16 mean_Oklahoma_Cleveland_44 mean_Oklahoma_Cleveland_49 mean_Oklahoma_Kay_600 mean_Oklahoma_Muskogee_167 mean_Oklahoma_Oklahoma_1037 mean_Oklahoma_Oklahoma_33 mean_Oklahoma_Tulsa_127 mean_Oklahoma_Tulsa_174 mean_Oklahoma_Tulsa_191 mean_Oregon_Multnomah_80 mean_Pennsylvania_Allegheny_3 mean_Pennsylvania_Allegheny_31 mean_Pennsylvania_Allegheny_8 mean_Pennsylvania_Beaver_14 mean_Pennsylvania_Berks_9 mean_Pennsylvania_Blair_801 mean_Pennsylvania_Bucks_12 mean_Pennsylvania_Cambria_11 mean_Pennsylvania_Dauphin_401 mean_Pennsylvania_Delaware_2 mean_Pennsylvania_Erie_10 mean_Pennsylvania_Erie_3 mean_Pennsylvania_Lackawanna_2006 mean_Pennsylvania_Lancaster_7 mean_Pennsylvania_Lawrence_15 mean_Pennsylvania_Lehigh_4 mean_Pennsylvania_Luzerne_1101 mean_Pennsylvania_Montgomery_13 mean_Pennsylvania_Northampton_17 mean_Pennsylvania_Perry_301 mean_Pennsylvania_Philadelphia_22 mean_Pennsylvania_Philadelphia_23 mean_Pennsylvania_Philadelphia_29 mean_Pennsylvania_Philadelphia_4 mean_Pennsylvania_Philadelphia_47 mean_Pennsylvania_Washington_200 mean_Pennsylvania_Washington_5 mean_Pennsylvania_York_8 mean_RhodeIsland_Providence_12 mean_RhodeIsland_Providence_19 mean_SouthCarolina_Aiken_3 mean_SouthCarolina_Barnwell_1 mean_SouthCarolina_Lexington_5 mean_SouthCarolina_Richland_1006 mean_Tennessee_Bradley_102 mean_Tennessee_Davidson_10 mean_Tennessee_Davidson_11 mean_Tennessee_Giles_1 mean_Tennessee_Maury_106 mean_Tennessee_McMinn_101 mean_Tennessee_Rutherford_101 mean_Tennessee_Shelby_24 mean_Tennessee_Sullivan_7 mean_Tennessee_Sullivan_9 mean_Tennessee_Williamson_103 mean_Texas_Bexar_36 mean_Texas_Brazoria_1003 mean_Texas_Dallas_44 mean_Texas_Dallas_45 mean_Texas_Dallas_55 mean_Texas_Dallas_69 mean_Texas_ElPaso_27 mean_Texas_ElPaso_37 mean_Texas_Galveston_1002 mean_Texas_Gregg_1 mean_Texas_Harris_1034 mean_Texas_Harris_1035 mean_Texas_Harris_1037 mean_Texas_Harris_24 mean_Texas_Harris_26 mean_Texas_Harris_47 mean_Texas_Harris_7001 mean_Texas_Jefferson_9 mean_Texas_Orange_1001 mean_Texas_Tarrant_1002 mean_Texas_Tarrant_1003 mean_Texas_Travis_17 mean_Utah_Davis_1 mean_Utah_SaltLake_3001 mean_Utah_Utah_2 mean_Utah_Weber_1 mean_Vermont_Chittenden_3 mean_Vermont_Rutland_2 mean_Virginia_AlexandriaCity_9 mean_Virginia_Arlington_20 mean_Virginia_FairfaxCity_5 mean_Virginia_Fairfax_1004 mean_Virginia_Fairfax_18 mean_Virginia_Fairfax_5001 mean_Virginia_Henrico_14 mean_Virginia_NorfolkCity_23 mean_Virginia_RichmondCity_21 mean_Virginia_Roanoke_1004 mean_Virginia_VirginiaBeachCity_7 mean_Washington_King_80 mean_Washington_King_82 mean_WestVirginia_Cabell_6 mean_WestVirginia_Greenbrier_1 mean_WestVirginia_Hancock_1004 mean_WestVirginia_Kanawha_4 mean_WestVirginia_Ohio_7 mean_Wisconsin_Columbia_8 mean_Wisconsin_Kenosha_1001 mean_Wisconsin_Kenosha_16 mean_Wisconsin_Milwaukee_41 mean_Wisconsin_Milwaukee_80 mean_Wisconsin_Rock_1002 mean_Wisconsin_Rock_1004
___________________ __________ _______________________________ ______________________ ______________________ _____________________ _____________________ _____________________ __________________________ __________________________ ______________________ ____________________ ___________________ __________________________ ____________________________ _________________________ _______________________ ________________________________ _____________________________ _____________________________ ________________________________ __________________________ __________________________ __________________________ ________________________ ________________________ ________________________ ________________________ ______________________ _________________________ ______________________ _________________________ ______________________ _______________________________ _______________________________ _______________________________ ______________________________ _______________________________ _______________________________ _____________________________ _______________________________ _______________________________ ____________________________ _______________________________ _______________________________ _______________________________ _______________________________ _______________________________ _______________________________ _______________________________ _______________________________ _______________________ ___________________________ _____________________________ ______________________ ________________________ ___________________________ ___________________________ ___________________________ ______________________________ ______________________________ ______________________________ ____________________________ _____________________________ _______________________________ ____________________________ _______________________________ ____________________________ _______________________________ __________________________________ ________________________________ __________________________________ _______________________________ __________________________________ _______________________________ __________________________________ __________________________________ __________________________ _____________________________ _____________________________ _____________________________ _____________________________ __________________________ __________________________ __________________________ ______________________________ ______________________________ _______________________________ __________________________________ __________________________________ __________________________________ __________________________________ _____________________________ _______________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ _________________________________ ______________________________ ______________________________ _______________________________ ___________________________ ___________________________ ________________________ ________________________ ________________________ _______________________________ _______________________________ ____________________________ ___________________________ ____________________________ ____________________________ ____________________________ ____________________________ _________________________ _________________________ ____________________________ ________________________ ___________________________ ________________________ ______________________ ______________________ _________________________ _________________________ _________________________ _________________________ _________________________ _________________________ _________________________ _________________________ ______________________________ ______________________________ ______________________________ ______________________________ ____________________________ ____________________________ _____________________________________________ _____________________________________________ _____________________ _____________________ ______________________________ ______________________________ __________________________ ____________________________ ________________________ ___________________________ ___________________________ ________________________ _____________________ ______________________ _______________________ _______________________ _______________________ _______________________ _______________________ _______________________ _____________________ _____________________ _____________________ _______________________ _______________________ _______________________ _______________________ _____________________ _____________________ _____________________ _________________________ ___________________________ ____________________ ____________________ _____________________ _____________________ ________________________ ___________________ ______________________ ______________________ ______________________ ______________________ ______________________ ______________________ ______________________ ____________________ _______________________ ____________________ ______________________ ______________________ _______________________ ____________________________ _____________________________ _____________________________ ______________________ _______________________ _____________________ _____________________ ___________________________ _______________________ ________________________ __________________________ ____________________________ ____________________________ _____________________ ____________________________ _______________________________ _____________________________ _________________________ _______________________________ ____________________________ ______________________________ __________________________ ____________________________ _______________________________ __________________________ _____________________________ _____________________________ _____________________________ _________________________________ ____________________________ ____________________________ _______________________________ ____________________________ _____________________________ _____________________________ _____________________________ _____________________________ _______________________________ ___________________________ ___________________________ _____________________ _________________________ _________________________ _________________________ ______________________ ______________________ ______________________ ___________________________ __________________________ ___________________________ _______________________ _______________________ _________________________ _______________________ ________________________ ________________________ _____________________ ____________________ _______________________ _______________________ ________________________ _______________________ _______________________________ __________________________ _____________________________ _____________________________ __________________________ _____________________________ ____________________________ ____________________________ ________________________ ________________________ ________________________ ________________________ ________________________ ________________________ ________________________ ________________________ ______________________ ____________________ _____________________ _____________________ _____________________ _________________________________ _______________________ _______________________ _________________________ _______________________ _______________________ __________________________ ______________________ _________________________ ____________________________ ____________________________ _______________________ _____________________ _________________________ _____________________ ___________________ ___________________ ____________________ _____________________ _______________________ _______________________ _______________________ _____________________________ ____________________________ _________________________________ __________________________ ________________________ _______________________ _________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ _________________________ _______________________ _____________________ _____________________ ____________________ _______________________ _____________________ _______________________ ________________________ _______________________ ____________________ _______________________ __________________ __________________________ __________________________ _____________________ __________________________ ___________________________ _________________________ _______________________ _______________________ _______________________ ________________________ _____________________________ ______________________________ _____________________________ ___________________________ _________________________ ___________________________ __________________________ ____________________________ _____________________________ ____________________________ _________________________ ________________________ _________________________________ _____________________________ _____________________________ __________________________ ______________________________ _______________________________ ________________________________ ___________________________ _________________________________ _________________________________ _________________________________ ________________________________ _________________________________ ________________________________ ______________________________ ________________________ ______________________________ ______________________________ __________________________ _____________________________ ______________________________ ________________________________ __________________________ __________________________ __________________________ ______________________ ________________________ _________________________ _____________________________ ________________________ _________________________ _________________________ _____________________________ ___________________ ________________________ ____________________ ____________________ ____________________ ____________________ ____________________ ____________________ _________________________ __________________ ______________________ ______________________ ______________________ ____________________ ____________________ ____________________ ______________________ ______________________ ______________________ _______________________ _______________________ ____________________ _________________ _______________________ ________________ _________________ _________________________ ______________________ ______________________________ __________________________ ___________________________ __________________________ ________________________ __________________________ ________________________ ____________________________ _____________________________ __________________________ _________________________________ _______________________ _______________________ __________________________ ______________________________ ______________________________ ___________________________ ________________________ _________________________ ___________________________ _________________________ ___________________________ ___________________________ ________________________ ________________________
0 1826 11.067 5 NaN 5.5 NaN 5.8 32.726 14.354 21.406 28.032 24.291 14.211 25.197 23.05 14.065 17.794 21.557 20.961 37.392 12.859 18.895 18.505 30.127 17.676 21.78 26.663 36.455 12.487 13.738 23.841 16.139 51.783 56.009 58.113 40.43 41.108 43.376 35.362 49.271 52.205 45.488 50.675 43.835 41.112 31.931 39.447 39.333 19.822 40.603 19.932 11.379 15.293 18.034 41.522 32.273 38.499 10.219 22.653 36.461 39.84 19.016 25.607 18.12 18.808 20.777 20.192 31.541 43.196 11.918 39.857 45.24 18.559 12.178 27.05 45.278 26.012 28.571 36.717 15.058 37.174 28.608 23.827 26.61 23.097 23.121 26.404 11.765 13.988 18.196 14.168 22.684 23.397 11.613 6.8706 7.521 6.3204 5.7838 8.6386 8.5229 11.749 7.9907 8.789 22.127 7.4138 7.8793 7.2338 8.797 7.1772 16.574 14.849 11.44 10 5.9286 7.5291 10.698 16.756 25.186 30.06 11.189 10 13.729 21.152 17.193 NaN 17.587 25.686 22.386 12.557 32.817 18.426 16.033 10.438 13.6 24 32.111 19.436 25.254 34.13 NaN 14.745 19.143 24.777 32.953 8.6858 21.343 28.167 29.845 26.061 26.552 23.204 28.863 28.954 28.074 27.881 29.858 18.426 11.783 21.97 18.506 18.302 17.395 14.248 13.894 17.03 18.542 19.07 32.172 25.919 27.348 20.137 29.261 28.087 29.35 28.644 27.535 32.97 32.305 26.011 30.004 26.923 26.591 26.643 26.686 26.006 24.952 15.164 20.391 13.09 11.805 10.934 20.888 30.979 28.444 26.321 NaN 26.191 14.774 15.3 14 25.159 13 10.077 11.376 11.034 14.754 11.212 14.368 12.105 21.279 14.28 14.613 23.721 14.263 22.191 24.028 28.99 18.132 6.6434 13.797 23.969 18.506 25.061 20.548 21.404 32.885 19.49 28.777 16.737 24.928 23.542 27.896 46.412 14.3 21.438 23.996 26.006 31.988 30.211 25.601 26.971 27.376 28.731 12.19 10.244 21.988 12.421 11.314 17.478 27.172 25.826 27.888 8.635 23.307 27.626 22.751 23.833 23.184 13.135 8.5055 11.132 19.503 14.271 9.122 17.107 29.978 15.185 16.403 24.269 21.551 23.377 19.873 24.398 34.543 24.434 15.402 11.642 11.263 8.964 9.7615 11.129 10.084 11.737 33.768 39.849 34.402 33.333 28.508 22.45 34.946 28.791 33.814 36.543 33.991 16.934 34.889 27.533 20.042 20.522 NaN 11.794 14.667 35.804 23.676 28.538 7.9273 34.319 43.353 47.154 18.779 19.395 13.542 22.454 13.806 7.7727 6.5152 8.3152 7.0698 8.8211 6.8861 9.4444 7.8742 9.2727 26.154 30.04 23.891 30.198 20.436 31.105 31.069 22.072 25.242 11.988 12.829 21.704 18.443 14.825 15.526 14.913 15.834 21.356 17.654 14.734 20.117 19.899 30.11 33.928 30.068 24.316 26.073 22.344 29.448 21.913 27.444 28.635 19.412 18.415 25.324 21.601 22.857 23.739 24.213 27.479 24.849 10.673 32.308 15.455 34.196 32.07 37.16 24.617 25.375 25.825 25.508 19.818 9.614 8.1506 9.5858 7.9039 15.955 14.828 14.896 18.539 10.455 15.422 6.4706 28.537 21.874 19.487 7.5615 16.405 16.805 25.858 19.96 18.08 27.283 22.536 24.406 15.728 11.009 21.249 26.497 26.634 19.892 16.459 24.267 16.319 15.451 14.128 21.076 22.429 17.095 20.538 38.052 29.908 33.8 15.523 14.981 29.54 25.977 23.95 25.628 24.213 26.094 18.067 21.325 25.555 18.788 20.008 18.215 28.907 18.878 8.888 21.786 27.369 19.487 11.607 31.082 28.775 21.356 25.235 15.674 15.797
⋮
Чтобы визуализировать ежедневный цикл для первых нескольких сайтов, используйте stackedplot
. Сравните шаблон одного пика в удаленных сайтах на Аляске и Аризоне к утреннему и вечернему peaks в течение часа пик на городских сайтах в Аризоне и Калифорнии.
meanDailyCycleNO2.GroupCount = []; meanDailyCycleNO2.hourofday_Timestamp = hours(double(meanDailyCycleNO2.hourofday_Timestamp)); stackedplot(meanDailyCycleNO2,'XVariable','hourofday_Timestamp')
retime
, groupsummary
, и varfun
функции все применяют функции отдельно к каждой табличной переменной. Но иногда у вас есть функции, которые используют больше чем одну табличную переменную в качестве входных параметров. Например, вы можете хотеть найти время или индекс, в котором некоторое условие произошло в каждой группе значений данных. В таких случаях используйте rowfun
функция. Это позволяет вам применить функции, которые требуют нескольких входных параметров.
Например, определите, когда максимальная концентрация NO2 произошла на каждом сайте. Это определение требует функции, такой как findMax
поддерживание функции упомянуто в этом примере. findMax
функция требует и меток времени и значений данных как входные параметры. Это возвращает максимальное значение со временем, в которое произошло максимальное значение.
Сгруппировать данные в NO2data
SiteID
и найдите времена, когда максимальная концентрация NO2 произошла на каждом сайте, используйте rowfun
. Укажите что входные параметры к findMax
Timestamp
и MeasuredNO2
от NO2data
. Преобразуйте NO2data
к таблице так, чтобы rowfun
возвращает таблицу.
NO2data = timetable2table(NO2data); rowfun(@findMax,NO2data,"GroupingVariable","SiteID","InputVariables",["Timestamp","MeasuredNO2"], ... "OutputVariableNames",["MaxMeasuredNO2","MaxOccurrenceTime"])
ans=442×4 table
SiteID GroupCount MaxMeasuredNO2 MaxOccurrenceTime
___________________________ __________ ______________ ____________________
Alaska_KenaiPeninsula_1004 7071 194 03-Aug-1989 10:00:00
Arizona_Apache_10 14313 32 01-Jul-1985 09:00:00
Arizona_Apache_11 13551 33 22-Aug-1985 10:00:00
Arizona_Apache_7 13821 25 14-Feb-1985 17:00:00
Arizona_Apache_8 13701 14 22-Feb-1989 09:00:00
Arizona_Apache_9 13675 25 16-Nov-1988 12:00:00
Arizona_Maricopa_3002 5746 140 11-Jan-1985 10:00:00
Arizona_Maricopa_3003 9904 150 08-Mar-1985 17:00:00
Arizona_Pima_1011 35608 194 22-Jan-1987 10:00:00
Arizona_Pima_19 10191 93 22-Nov-1989 10:00:00
Arizona_Pima_2 12283 110 27-Jun-1985 09:00:00
Arkansas_Pulaski_1002 40723 92 27-Jan-1988 05:00:00
California_Alameda_1001 42863 150 06-Oct-1987 10:00:00
California_Alameda_3 42453 140 12-Feb-1988 08:00:00
California_Butte_2 39502 230 31-Jan-1987 19:00:00
California_ContraCosta_1002 36327 90 12-Mar-1989 15:00:00
⋮
Этими результатами вы могли расширить свой анализ, чтобы узнать, почему концентрации NO2 были особенно высоки в те даты.
Поддерживающие локальные функции заданы ниже.
function [maxVal,maxTime] = findMax(times,vals) % Return time at which maximum element of vals occurred [maxVal,maxIndex] = max(vals); if ~isnan(maxVal) maxTime = times(maxIndex); else maxTime = NaT; end end function y = findPrctile(x,p) % Return data point nearest to percentile p, without interpolation xs = sort(x); n = sum(~isnan(x)); % use non-NaN elements only k = p*n/100 + 0.5; % index of data point that represents 100*(i-0.5)/n th percentile y = xs(round(k)); % data point nearest specified p end
categorical
| table
| timetable
| readtable
| detectImportOptions
| varfun
| datetime
| groupcounts
| groupsummary
| rowfun
| retime
| stackedplot