Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fiter data by R #3

Open
jinlx opened this issue Dec 27, 2018 · 0 comments
Open

fiter data by R #3

jinlx opened this issue Dec 27, 2018 · 0 comments

Comments

@jinlx
Copy link
Owner

jinlx commented Dec 27, 2018

%This could be used when data is too much to be opened by excel. For example, when I used hourly data
%from air data, EPA. The data is too much and excel could show all of them. So I design these codes to fiter
%the data you want, like data of specific data or city.

read required packages

require("data.table")
require("dplyr")

fast read in the package for csv

RH <- fread("/Users/macbook/Downloads/hourly_RH_DP_2017.csv")
wind <- fread("/Users/macbook/Downloads/hourly_WIND_2017.csv")

pick up RH data of Idaho State

idaho.ada.RH <- RH %>% filter(State Name == "Idaho") %>% filter(County Name == "Ada")
idaho.ada.wind <- wind %>% filter(State Name == "Idaho") %>% filter(County Name == "Ada")

write data

fwrite(idaho.ada.RH, "/Users/macbook/Downloads/Idaho Ada RH.csv")
fwrite(idaho.ada.wind, "/Users/macbook/Downloads/Idaho Ada Wind.csv")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant