NWS CLI data Coverting to .CSV file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting NWS CLI data Coverting to .CSV file
# 1  
Old 01-13-2014
NWS CLI data Coverting to .CSV file

Hi everyone, I found this forum through a google search I'm hoping someone can help me. I am so clueless on coding stuff so bare with me.

I need to write a script/program to convert the snowfall data to a .CSV file. But I guess it doesn't end there.

I'm looking to grab snowfall totals and departures from the NWS CLI data for all climo sites reporting it and enter them into excel. Just those numbers.

I did this manually for the climo sites with the CLI reports.. I'm looking for a way to automatically get them into excel.

Here's the manual version so you have an idea what data I'm talking about.

Image


Thanks so much!

---------- Post updated at 10:24 PM ---------- Previous update was at 10:23 PM ----------

I can't post links until I have 5 posts.

I don't know where to find the raw data from NWS, what I use is the climate links for each NWS office like this one in Buffalo. (just add www & eliminate space)
nws.noaa .gov/climate/index.php?wfo=buf

Just click Go and you'll see the snowfall data.

Or use this link to see the entire NWS Offices listed on same page. Maybe that might help? nws.noaa .gov/view/validProds.php?prod=CLI
# 2  
Old 01-14-2014
Not clear. Where do you start you automating process? What should be the end result (yes, a .csv file, but what structure)? In which system (yes, EXCEL, but running where)?
# 3  
Old 01-14-2014
Quote:
Originally Posted by RudiC
Not clear. Where do you start you automating process? What should be the end result (yes, a .csv file, but what structure)? In which system (yes, EXCEL, but running where)?
Thanks for the reply. Those are the things I'm not sure about.. I know what I need but not sure how to set it up or what needs to be done. If I can just get them into columns that would be enough. Structure like the image I posted. Is that what you mean?

As far as running where, Are you asking me what web page I'm trying to setup? I don't have any that's why I figured just getting them into excel for now.

I noticed you can refresh data from the web using a link in excel (just learned this), but each link requires a new tab I believe. I was hoping to get all the data on one page.

I don't know, maybe I'm being too complex. Let me sip some more coffee and see if I can better explain it
# 4  
Old 01-14-2014
Quote:
Let me sip some more coffee and see if I can better explain it
Yes, its still difficult for me to understand. Lets try this, please post a sample input and output that you are looking for, then we can take it from there.
# 5  
Old 01-14-2014
Quote:
Originally Posted by matrixmadhan
Yes, its still difficult for me to understand. Lets try this, please post a sample input and output that you are looking for, then we can take it from there.
Thanks for replying, give me few minutes, working on a post now...

---------- Post updated at 07:49 AM ---------- Previous update was at 07:43 AM ----------

Ok, so I exported the CLI data from this link into Excel

Then I used "text to columns" to separate the data.

Then I used a formula you can see at top right that grabs the specific snow total data I'm looking for.

I'm hoping when I refresh the new data gets put into the same cells and my formula updates..(it should)

Image

---------- Post updated at 07:52 AM ---------- Previous update was at 07:49 AM ----------

This is all great and easy for me to look at and work with, however, how do I get this onto the web and into a better graphic table? I assume I need a webpage first, right?

Here is an example of what I would love to do... This guy grabbed all the data and had it available like this on his site (which now disappeared because he got sick).

Not sure if this is even off topic, I thought it has to do with getting the script to convert into csv file. No idea.

Image
# 6  
Old 01-14-2014
Let me try to understand.

First the link, looks like its a gov link, please make sure that this is not confidential and in view of the terms and conditions / contract, if this is confidential and posting in public forums might be problematic for you.

Please correct me if am wrong.

Are you trying to extract / convert data from excel into txt file?
Are you trying to pro-grammatically fetch the data from the link and transform to some other format?

Please scale down the input and output, then you can scale up as needed!

---------- Post updated at 06:28 PM ---------- Previous update was at 06:28 PM ----------

Ah! Thats airport data, make sure again if its ok to post these data in public forums.
This User Gave Thanks to matrixmadhan For This Post:
# 7  
Old 01-14-2014
Quote:
Originally Posted by matrixmadhan
Let me try to understand.

First the link, looks like its a gov link, please make sure that this is not confidential and in view of the terms and conditions / contract, if this is confidential and posting in public forums might be problematic for you.

Please correct me if am wrong.

Are you trying to extract / convert data from excel into txt file?
Are you trying to pro-grammatically fetch the data from the link and transform to some other format?

Please scale down the input and output, then you can scale up as needed!

---------- Post updated at 06:28 PM ---------- Previous update was at 06:28 PM ----------

Ah! Thats airport data, make sure again if its ok to post these data in public forums.
Thanks. Yes, that's public available data, no problems there. I think the answers to both those questions is yes. But isn't converting to a text file as simple as Copy and paste value only?

Yes, I want to fetch the data from the link and have it available on a webpage but not as a text file because I would need it to automatically update. I'm so sorry if this is all confusing. Like I said, I have in my mind what I want, I just don't know how to explain it better or where to start.

Just to confirm again, those links are fine. It's public data. Nothing hidden about weather for climo sites. Here's IEM which has a similar setup to what I'm looking to do. Notice they have the locations and all the data in columns next to it which refreshes with each update.



---------- Post updated at 08:10 AM ---------- Previous update was at 08:09 AM ----------

I see some threads that might be useful. I'll try to check them out later on to see if I can get more info which would be helpful for you guys.

---------- Post updated at 08:13 AM ---------- Previous update was at 08:10 AM ----------

Here's an image from the IEM site I was talking about.. See how everything is on that table on that page using up to date info?

Image

---------- Post updated at 08:15 AM ---------- Previous update was at 08:13 AM ----------

That's what I would like done and I believe I have to convert the script.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Compare 2 files of csv file and match column data and create a new csv file of them

Hi, I am newbie in shell script. I need your help to solve my problem. Firstly, I have 2 files of csv and i want to compare of the contents then the output will be written in a new csv file. File1: SourceFile,DateTimeOriginal /home/intannf/foto/IMG_0713.JPG,2015:02:17 11:14:07... (8 Replies)
Discussion started by: refrain
8 Replies

2. Shell Programming and Scripting

CSV file data extraction

Hi I am writing a shell script to parse a CSV file , in which i am facing a problem to separate the columns . Could some one help me with it. IN301330/00001 pvavan kumar limited xyz@ttccpp.com IN302148/00002 PRECIOUS SECURITIES (P) LTD viash@yahoo.co.in IN300239/00000 CENTRE india... (8 Replies)
Discussion started by: nanduri
8 Replies

3. Shell Programming and Scripting

Data Manipulation on a .csv file

Hallo Friends, I need you help. My file has 5000 or so lines and currently looks like below(sample). Service Type,Origin,Destination,Rate Per Minute,Minimum Charge,Time Based Rate,Time Based From Day,Time Based To Day,Time Based From Time,Time Based To Time,Destination Prefix List,, VoIS... (3 Replies)
Discussion started by: kekanap
3 Replies

4. Shell Programming and Scripting

Fetching data from .csv file

Hi Experts, I have created a table with columns as empname,empid,phone,shiftname. Now I am having a .csv file format which contains the shift datas of the employees. I have to fetch this file and compare with the table I created to send an alert to the specified user. (2 Replies)
Discussion started by: micky3112
2 Replies

5. Shell Programming and Scripting

How to extract data from csv file

Hello everybody, Here is my problem, I don't know anything about shell programming and my boss is actually asking me to develop a shell script in order to get values in a csv file from a specific date. Here is a sample of the csv file : Date;Enchaînement;Titre;Libellé ;calendrier;Heure début;Heure... (11 Replies)
Discussion started by: freyr
11 Replies

6. Shell Programming and Scripting

I want to append data to same .csv file.

I have a script which has to be scheduled to run 3 times a day. My script picks the required fields from logfile and stores the data in a.csv file. Sample data. my logfile contain: 0097A,0374D,100903,1519,00000606191 0097A,C88RA,100903,0724,00000606105 So the output of first execution... (3 Replies)
Discussion started by: shrima.pratima
3 Replies

7. Linux

Coverting a log file into XML

ID -------CODE-------DATE-------URL I have a log file with entries like this. The file has about 6 lakhs record and the size is about 42MB. I need to covert them into a XML file like <ID></ID> <CODE></CODE> <DATE></DATE> <URL></URL> I have done a logic for this and successfully done.... (0 Replies)
Discussion started by: arunkumar.in
0 Replies

8. Shell Programming and Scripting

extracting data from a .csv file

I have a .csv file equipment,bandtype abc,aws def,mmds ghi,umts jkl,mmds I can get the equipment from `hostname`. In my script i want to check what is the hostname. then see if it exists in the.csv file. if it does then i want to store the second parameter(bandtype) for the corresponding... (3 Replies)
Discussion started by: lassimanji
3 Replies

9. Programming

coverting html data to text in 'c'

hi, iam reading the webpage using curl socket. so iam geting the data in html format so how can convert html data to text data ,so i can move forward. thank u, sree (3 Replies)
Discussion started by: phani_sree
3 Replies

10. Shell Programming and Scripting

Shell Script to Load data into the database using a .csv file and .ctl file

Since i'm new to scripting i'm findind it difficult to code a script. The script has to be an executable with 2 paramters passed to it.The Parameters are 1. The Control file name(.ctl file) 2. The Data file name(.csv file) Does anybody have an idea about it? :confused: (3 Replies)
Discussion started by: Csmani
3 Replies
Login or Register to Ask a Question