Skip to content
README.md 3.7 KiB
Newer Older
# edl_fetch_explore
by Maroun Bou Sleiman

This project explores the Lebanese electricity sector (Electricite du Liban = EDL). The electricity sector in Lebanon is notoriously known for being one of the worst in the world. I do not understand how such a basic service, based on old technology, cannot be provided to the people.
This project uses openly available data to assess this sector. The feeding data used are the ones published by EDL on their website (http://www.edl.gov.lb/feeding.php). The accuracy and quality of this dataset is therefore the sole responsibility of EDL.
The notebook is also published on [RPubs](https://rpubs.com/marounbs/edl_mapping).

Maroun Bou Sleiman's avatar
Maroun Bou Sleiman committed
Shield: [![CC BY 4.0][cc-by-shield]][cc-by]

This work is licensed under a
[Creative Commons Attribution 4.0 International License][cc-by].

[![CC BY 4.0][cc-by-image]][cc-by]

[cc-by]: http://creativecommons.org/licenses/by/4.0/
[cc-by-image]: https://i.creativecommons.org/l/by/4.0/88x31.png
[cc-by-shield]: https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg

## Setup
Basic R 4.0 template. See the `Dockerfile` and `install.R` files for modifications from the base template.

## Steps
1. First step is to crawl the http://www.edl.gov.lb/?=&lang=en website, specifically the daily supply section (http://www.edl.gov.lb/feeding.php). This is performed using the `./R/edl_feeding_crawler.R` followed by `./R/edl_feeding_postprocess.R`. It's a time consuming step. It is best to run from terminal as follows if you want to track inputs and outputs. 
Maroun Bou Sleiman's avatar
Maroun Bou Sleiman committed
Rscript ./R/edl_feeding_crawler.R
Rscript ./R/edl_feeding_postprocess.R
Maroun Bou Sleiman's avatar
Maroun Bou Sleiman committed
renku run Rscript ./R/edl_feeding_crawler.R
renku run Rscript ./R/edl_feeding_postprocess.R

## If you append `update` as an argument, the script will first read available data and complete it with more recent data
Rscript ./R/edl_feeding_crawler.R update
Rscript ./R/edl_feeding_postprocess.R update

By default the script will fetch the data from 20 Oct 2008 to "today". You'll need to modify the script to change the dates. Earlies date (I think) is 20 Oct 2008.

2. Second step is general observation of the acquired data

3. Third step is placing the data on the map.

# General Renku information
Maroun Bou Sleiman's avatar
Maroun Bou Sleiman committed
## Introduction

This is a Renku project - basically a git repository with some
bells and whistles. You'll find we have already created some
useful things like `data` and `notebooks` directories and
a `Dockerfile`.

## Working with the project

The simplest way to start your project is right from the Renku
platform - just click on the `Environments` tab and start a new session.
This will start an interactive environment right in your browser.

To work with the project anywhere outside the Renku platform,
click the `Settings` tab where you will find the
git repo URLs - use `git` to clone the project on whichever machine you want.

### Changing interactive environment dependencies

Initially we install a very minimal set of packages to keep the images small.
However, you can add python and conda packages in `requirements.txt` and
`environment.yml`, and R packages to `install.R` (listed as, for example,
`install.packages("ggplot2")`), to your heart's content. If you need more fine-grained
control over your environment, please see [the documentation](https://renku.readthedocs.io/en/latest/user/advanced_interfaces.html#dockerfile-modifications).

## Project configuration

Project options can be found in `.renku/renku.ini`. In this
project there is currently only one option, which specifies
the default type of environment to open, in this case `/rstudio`.

## Moving forward

Once you feel at home with your project, we recommend that you replace
this README file with your own project documentation! Happy data wrangling!