datacorner / fr_meteo_data

France Meteo data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get Meteo Data

Requirements

If you want to use the program you'll need:

  • Python 3.7
  • Internet Access

And if you don't want to use it, so ... just download the data in the /data directory ;-)

Description

This project aims to retreive all the historical data between two dates. The result is copied in a csv file in the folder specified. Currently the program only grab data from internet (via https://www.historique-meteo.net/france) for France by using scraping methods. However it can be extended to get meteo informations from other countries as the web site manage many countries.

Note: The result is by default stored using the old French regions.

The old region to new region can be launch by running a second command line (conversion). The new regions are the ones below:

Region list: 'Île-de-France', 'Nouvelle-Aquitaine', 'Auvergne-Rhône-Alpes', 'Bourgogne-Franche-Comté', 'Hauts-de-France', 'Grand Est', 'Guadeloupe', 'Martinique', 'Guyane', 'La Réunion', 'Mayotte', 'Centre-Val de Loire', 'Normandie', 'Pays de la Loire', 'Bretagne', 'Occitanie', "Provence-Alpes-Côte d'Azur", 'Corse'

Command line details

Run the command line for collecting data:

python GetFRMeteoData.py -a collect -s <Starting Date> -e <Ending Date> -f <Destination Folder> 

Here are the input parameter description:
-a : action (collect here) -s : Starting/From date
-e : Ending/To date
-f : Destination Folder

Run the command line for conversion (Old to new regions) data:

python GetFRMeteoData.py -a convert -i <input file> -o <output file> 

Here are the input parameter description:
-a : action (convert here) -i : input file
-o : output file

Result

The result is stored in a csv file (in the input folder) with that format:

  • Index: Row index (concat of Region and day)
  • TempMax_Deg: Maximum Temperature of the day in Celcius degree
  • TempMin_Deg: Minimum Temperature of the day in Celcius degree
  • Wind_kmh: Wind speed (km/h)
  • Wet_percent: Wet in (%)
  • Visibility_km: Visibility (km)
  • CloudCoverage_percent: Cloud coverage (%)
  • Dayduration_hour: Day/sun duration (min)
  • region: Region
  • day: Day in format YYYY/MM/DD

Datasets

The Meteo datasets can be downloaded from the /data directory. This directory is then splitted by Region and time range. Currently only France by year is available. For France, you can find 2 kinds of files the old regions (prefix oldReg_) and the new region breakdown (without prefix, starting by MeteoFR_).

About

France Meteo data


Languages

Language:Jupyter Notebook 87.7%Language:Python 12.3%