https://github.com/gilles-mastropasqua/meteo-graph-api
Météo-France GraphQL API for structured access to historical meteorological data. Retrieve station metadata, hourly observations, and climate records dating back to 1850.
https://github.com/gilles-mastropasqua/meteo-graph-api
meteo-api meteo-france meteo-station meteorological-data weather-api weather-station
Last synced: 2 months ago
JSON representation
Météo-France GraphQL API for structured access to historical meteorological data. Retrieve station metadata, hourly observations, and climate records dating back to 1850.
- Host: GitHub
- URL: https://github.com/gilles-mastropasqua/meteo-graph-api
- Owner: gilles-mastropasqua
- License: mit
- Created: 2025-02-27T14:38:21.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2025-03-11T15:55:59.000Z (2 months ago)
- Last Synced: 2025-03-11T16:40:27.960Z (2 months ago)
- Topics: meteo-api, meteo-france, meteo-station, meteorological-data, weather-api, weather-station
- Language: TypeScript
- Homepage: https://api.meteo-graph.fr
- Size: 39.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# meteo-graph-api
Welcome to the **Meteo-graph-api** project! This GraphQL API provides access to meteorological data from
Météo-France observation stations. It is designed to process and serve structured meteorological data collected from
official sources.This project is intended to work alongside the
**[meteo-graph-collector](https://github.com/gilles-mastropasqua/meteo-graph-collector)**, which retrieves raw
meteorological data from external sources and prepares it for use within this API.## Purpose of this API
The **Météo-France GraphQL API** is designed to structure and expose meteorological data collected from the dataset:
🔗 **[Base Climatologique - Données Horaires](https://meteo.data.gouv.fr/datasets/6569b4473bedf2e7abad3b72)**
This dataset includes hourly meteorological observations from Météo-France stations, providing information such as:
- 🌡️ **Temperature**
- 💧 **Humidity**
- 🌬️ **Wind Speed & Direction**
- 🌦️ **Precipitation Levels**
- ⚡ **Atmospheric Pressure**
- 🌤️ **Cloud Cover**
- 🌅 **Solar Radiation**
- ❄️ **Snow Depth**
- 📍 **Geographical Location & Altitude...**
- ⏳ **Historical data available since 1850 for some stations**The API ensures that data is structured, accessible, and queryable using GraphQL, making it easy to integrate into
applications needing historical meteorological data. The dataset is updated once per day at **07:00 UTC**,
ensuring the latest observations are available for analysis.
## Prerequisites
- **Node.js**: Ensure you have [Node.js](https://nodejs.org/) installed.
- **npm**: Comes with Node.js. Verify with `npm -v`.## Installation
1. **Clone the repository**:
```bash
git clone https://github.com/gilles-mastropasqua/METEO-FRANCE-GRAPHQL-API.git
cd METEO-FRANCE-GRAPHQL-API
```2. **Install dependencies**:
Due to an incompatibility between `pothos` and `prisma` version 6, use the `--legacy-peer-deps` flag:
```bash
npm install --legacy-peer-deps
```## Configuration
1. **Environment Variables**:
- Duplicate `example.env` and rename it to `.env`:
```bash
cp example.env .env
```- Open `.env` and configure the necessary variables.
2. **Prisma Setup**:
- **Generate the Prisma client**:
```bash
npx prisma generate
```- **Apply database migrations**:
```bash
npx prisma migrate deploy
```## Running the Server
- **Development mode** (with auto-reloading):
```bash
npm run dev
```- **Production mode**:
1. **Build the project**:
```bash
npm run build
```2. **Start the server**:
```bash
npm start
```## Usage
Once the server is running, access the GraphiQL interface at:
```
http://localhost:4000
```This interface allows you to explore and test available GraphQL queries.
## License
For details, see the [LICENSE](LICENSE) file.
## Additional Resources
- **Pothos Documentation**:
[https://pothos-graphql.dev/docs/plugins/prisma](https://pothos-graphql.dev/docs/plugins/prisma)
- **Prisma Documentation**: [https://www.prisma.io/docs](https://www.prisma.io/docs)If you have any suggestions or improvements for the project, feel free to **contact me** or submit a pull request on
GitHub.Feel free to check these resources to enhance your understanding and make the most of this API.