1
0
Fork 0
mirror of https://github.com/CLY-Meteo/CLY-Weather.git synced 2026-06-01 13:20:29 +02:00
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
  • Shell 57.9%
  • C 40.6%
  • Makefile 1.5%
Find a file
2023-02-03 23:55:08 +01:00
c_source docs: Comment tweaks 2023-02-03 23:55:08 +01:00
examples docs: Add examples 2023-02-03 23:28:50 +01:00
.gitignore docs: Add examples 2023-02-03 23:28:50 +01:00
cly-weather-sorting feat: Add chained list support 2023-02-03 21:49:18 +01:00
cly-weather.sh docs: Comment tweaks 2023-02-03 23:55:08 +01:00
Document.pdf docs: Comment tweaks 2023-02-03 23:55:08 +01:00
help.sh fix: Fixing my English crime 2023-02-02 20:07:12 +01:00
LICENSE docs: Switch to MPL-2.0 2022-12-13 14:51:05 +01:00
README.md feat: Add -p3 & -t3 support + a bunch of fixes 2023-02-03 21:03:14 +01:00

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.)