Giter Club home page Giter Club logo

delretrieve's Introduction

DOI
DEL Logo

South African
Domestic Electrical Load Study
Data Retrieval

About this package

This package contains tools to retrieve primary data from the South African Domestic Electrical Load (DEL) database. It requires access to a MSSQL server installation of the original General_LR4 database produced during the NRS Load Research study.

Notes on data access:

There are easier options than setting up your own server instance of the database.

  1. Data access can be requested from Data First at the University of Cape Town (UCT). On site access to the complete 5 minute data is available through their secure server room and does not require a MSSQL server installation.
  2. Several datasets with aggregated views are available online and can be accessed for academic purposes.

Other useful packages are:
delprocess for cleaning, wrangling, processing, aggregating and feature engineering of the DEL data.

Package structure

delretrieve
    |-- delretrieve
        |-- data
            |-- blobAnon.csv
            |-- charAnon.csv
            |-- cnxnstr.txt	
            |-- store_path.txt
            |-- DEL_logo.png
        |-- __init__.py
        |-- command_line.py
        |-- retrieve_del.py	
        |-- support.py
    |-- MANIFEST.in
    |-- README.md
    |-- setup.py

Setup instructions

Ensure that python 3 is installed on your computer. A simple way of getting it is to install it with Anaconda. Once python has been installed, the delretrieve package can be installed.

  1. Clone this repository from github.
  2. Navigate to the root directory (delretrieve) and run python setup.py install.
  3. Update the database connection information in USER_HOME/del_data/usr/cnxnstr.txt. The data retrieval process will ONLY work if you have installed the database on a MSSQL server instance and have access permissions to the data.

Data retrieval

From the command line (or Anaconda Prompt on windows) run:

  1. delretrieve_data -p to retrieve 5min load profile timeseries data You will be prompted to enter the start and end year (choose in the range of 1994 - 2014) for which you want to retrieve data
  2. delretrieve_data -t to retrieve all supplementary tables
  3. delretrieve_data -s to retrieve anonymised survey responses

When you use the command line interface for the first time, you will be requested to confirm the path for storing retrieved data. The 5 minute load profile data is ~120GB. Ensure that you choose a location with sufficient storage space! The default location isUSER_HOME/del_data/observations/. You can change the storage location by creating a new target directory and altering the path in USER_HOME/del_data/usr/store_path.txt, or by deleting the path and entering a new path when prompted by the command line.

Additional command-line options

-c: (optional) saves files as .csv files instead of .feather (see notes on file format below)
-y: (optional) start year for profile data retrieval
-z: (optional) end year for profile data retrieval

Output

The default format for retrieving data is as a .feather file, which provides fast and efficient retrieval and uploads for data frames. Feather is compatible with both R and python. Feather files should be stored for working purposes only as the file format is not suitable for archiving. Feather files built under one version can be incompatible with those built under a new version, in which case you will need to reconstruct them from the raw MSSQL database. Learn more about feather.

Data Exploration

getGroups, getProfiles, writeProfiles, writeTables, saveTables, saveAnswers, saveRawProfiles

Acknowledgements

Citation

Toussaint, Wiebke. delretrieve: Data Retrieval of the South African Domestic Electrical Load Study, version 1.01. Zenodo. https://doi.org/10.5281/zenodo.3605425 (2019).

Funding

This code has been developed by the Energy Research Centre at the University of Cape Town with funding from the South African National Energy Development Initiative under the CESAR programme.

Developed by Funded by
ERC Logo Sanedi Logo

delretrieve's People

Contributors

wiebket avatar

Stargazers

 avatar  avatar

Watchers

 avatar

delretrieve's Issues

README feedback items

Generally good README. Some notes, mostly concerning the README directly, but some with knock-on edits.

  • Data First link seems to be improperly formatted. Linking to that top level page seems insufficient guidance for asking about data access.
  • would be nice to have a link to description of data set itself (e.g., any publications? page on Data First devoted to this data set?)
  • "Setup Instructions" directions mildly imply that python 3 would be installed as part of cloning process.
  • directions say "Navigate to...dlr_data_retrieval", but the structure picture says "dlr_data"
  • for update cnxtnstr.txt, link to file itself in repository? Possible to make filling in that file easier? E.g. Server={REPLACE EVERYTHING WITHIN BRACES BY XX.YY.ZZ};
  • for start & end years: exclusive or inclusive?
  • command line convention: - should be used with single, lowercase letters. So recommend -c instead of -csv. The latter is read as combining the c, s, and v flags. Should be able to specify a long form option as --csv.

Package module

  • update setup.py
  • update support.py
  • move cnxnstr.txt to usr_dir/usr/cnxnstr.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.