Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.
/ CLY-Weather Public archive

CLY-Weather is a Bash script + C program that translates weather data into various graphs, using gnuplot. Computing project for the first semester of Pre-Engineering 2 at CY Tech. Grade given : 20/20

License

Notifications You must be signed in to change notification settings

CLY-Meteo/CLY-Weather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Roses are red, violets are blue, Nouha's writing the documentation and Jordan's in tears.


CLY-Weather (CLI + CY-Météo)

License Top language Commit activity Repo size

CLY-Weather (CLI + CY-Météo) is a Bash script + C program that translates weather data into various graphs, using gnuplot.

Summary

How to use CLY-Weather ?

Dependencies

Compilation

  • gcc
  • make

Runtime

  • awk
  • gnuplot

Basic syntax

You can use CLY-Weather through this command, from the root folder of the project.

./cly-weather.sh -f SOURCE_FILE DATA_TYPE [OPTIONS]

The expected source file is a CSV file, containing weather data organized like this :

Station ID;Date;Sea level pressure;Average wind direction 10 nm;Average wind speed 10 nm;Humidity;Station pressure;Pressure variation in 24 hours;Precipitation in the last 24 hours;Coordinates;Temperature (°C );Minimum temperature over 24 hours (°C);Maximum temperature over 24 hours (°C);Altitude;municipalities (code)

In order to successfully run, CLY-Weather needs at least one data type argument. If all goes well, you should be awarded with as many graphs as data types entered as arguments : one graph per argument.

NOTE : The graphs are not directly dumped as images. They use gnuplot's window to display. This allows for the user to preview the graph before saving it with additional settings and in the format that they prefer.

Data Type options

Temperature : (-t1, -t2, -t3)

-t1 : Produces a graph of the minimum, average, and maximum temperature for each station.
-t2 : Produces a graph of the average temperature per day/hour on every station.
-t3 : Produces a graph of the temperatures per day/hour for each station.

Pressure : (-p1, -p2, -p3)

-p1 : Produces a graph of the minimum, average, and maximum pressure for each station.
-p2 : Produces a graph of the average pressure per day/hour on every station.
-p3 : Produces a graph of the pressures per day/hour for each station.

Wind : (-w)

-w : Produces a vector map of the average wind orientation and speed for each station.

Altitude : (-h)

-h : Produces a map of the altitude for each station.

Humidity : (-m)

-m : Produces a map of the maximum humidity for each station.

Location options

Note : Only one location can be specified at a time.

-F : France & Corse
-G : Guyane
-S : Saint-Pierre et Miquelon
-A : Antilles
-O : Océan indien
-Q : Antarctique

-g <min> <max> : Longitude filtering. Can be paired with -a.
-a <min> <max> : Latitude filtering. Can be paired with -g.

Date Filtering

Note : Only one date interval can be specified at a time.

-d <start> <end> : Date filtering. Expects the format YYYY-MM-DD.

Sorting algorithm

Note : Only one sorting algorithm can be specified at a time.

--avl : Sorts the data using an AVL tree. (Default)
--abr : Sorts the data using an ABR tree.
--tab : Sorts the data using a table.

Additionally, the --help argument will displays the program's help page.

How to compile CLY-Weather's C program ?

From the root folder of the project...

  • Open a terminal, and move to the c_source folder.
  • Run make
  • Enjoy.

(If you want cly-weather.sh to use your compiled binary, move the binary back to the root folder of the project.)

About

CLY-Weather is a Bash script + C program that translates weather data into various graphs, using gnuplot. Computing project for the first semester of Pre-Engineering 2 at CY Tech. Grade given : 20/20

Resources

License

Stars

Watchers

Forks