doreapp / prix-carburants Goto Github PK
View Code? Open in Web Editor NEWFetches french fuel prices
Home Page: https://doreapp.github.io/prix-carburants/
License: MIT License
Fetches french fuel prices
Home Page: https://doreapp.github.io/prix-carburants/
License: MIT License
Initialize the project
Add all the data available in Open Data to data branch.
Needs #19
Create source code for a github-pages website using Jekyll
.
It must include:
Add missing information in current parsing:
Should provide a static analysis of
To show data on github pages we do not need to have all the data from every day save in a dedicated branch.
We only need to have relevant data in gh-pages/assets/data
folder.
Therefore, remove actions that fetches frequently data and save it in data
branch & remove the branch
Add an action that runs when the website sources are edited and that deploy the source code to gh-pages
branch of this repository.
Depends on #12.
Some errors occurs during the update of the data (as https://github.com/Doreapp/prix-carburants/actions/runs/4476648671/jobs/7867225579 and https://github.com/Doreapp/prix-carburants/actions/runs/4486219971/jobs/7888499757 can showcase).
This issue is meant to improve the logging system, so that such errors are understood (even though not catched yet)
For now, we consider that department codes are "01" to "95". We can imagine adding a 96th department, starting at 0, removing a code or adding a non-numeric code, such as 2A
for Corsica.
The list of departments to use should be dynamically found from the data
Rather than using
python -m prixcarburants download instantaneous
We would use
python -m prixcarburants download now
Once #10 is done, create an action to automatically and frequently (e.g. every 3 hours) fetch new data from Open Data and save it in the data
branch.
Save the data as latest
.
This new data should come from instantaneous
data source, and contains only meaningful values, i.e.:
Parse the data fetch from open data
Javascript files are under /assets/javascript/
. They are not found on the deployed website. I think they should be under assets/js/
so that GitHub pages accept them.
Some of the continuous integration workflow are failing.
Given those jobs, the error is coming from a 403 HTTP error:
403 Client Error: rate limit exceeded for url: https://api.github.com/repos/Doreapp/prix-carburants/contents/assets/data/metrics.json?ref=gh-pages
Some other jobs (i.e. https://github.com/Doreapp/prix-carburants/actions/runs/4942342860/jobs/8835770321) are failing due to
502 Server Error: Bad Gateway for url: https://api.github.com/repos/Doreapp/prix-carburants/contents/assets/data/latest.json
https://github.com/Doreapp/prix-carburants/actions/runs/4942342860/jobs/8835770321
The request should retry when failing on CI, multiple time with a time delta between each.
Display a Map showing every sale point prices of a given fuel type
Disable fuel selector while data is still loading, and display sliders
From fetched and parsed zip
file, create a file in a web format (such as json
or yaml
).
Should be able to use it like:
$ python -m prixcarburants download day
Downloaded in .tmp/PrixCarburants_jour.xml
$ python -m prixcarburants transform .tmp/PrixCarburants_jour.xml
Data saved in .tmp/PrixCarburants_jour.json
Depends on #7.
python
script, extract average prices per department (2 first digits of the postcode) an fuel type into metrics
plotly.js
(see this example)Add -l
/ --level
parameter, that takes one argument: the logging level.
Choices are : debug
, info
, warning
and error
Create design files about the direction of the app.
It should contain goals and possible approaches.
Be able to list sale points from latest data
From latest data saved every hour, extracts metrics and display them in github-pages website.
Metrics are:
This metrics must be saved in /_data/
directory in gh-pages
branch, and be used to display the data using jekyll templating
Rather than having a dictionary like prices[department][fuel_type]
, have prices[fuel_type][department]
.
Needed as we more often split by fuel_type
rather than by department.
Moreover, rather than using numbers as key, transform the prices
and fuel_names
objects in arrays:
{
"prices" : [
{
"44": 2.2
..
}, {
"44": 1.1
..
}
],
"fuel_names": [...]
}
During long execution, such as file downloading of parsing, display progress bars
Add https://donnees.roulez-eco.fr/opendata/jour
URL as the source for daily data.
Goal:
To download JS libraries (leaflet
for now), we are currently using a makefile
target that uses curl
commands.. Improve this process.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.