Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a script: Boston_CityHallElectricity #41

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

shivam7569
Copy link

I have added a new script of Boston_CityHall_Electricity dataset as per the instructions.

Copy link
Contributor

@henrykironde henrykironde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andy6975 thanks for this PR. This is a good start.

When installing could you use pip install . -U / pip install . --upgrade and not pip install retriever.
It is also good practice to keep your current working branches upgraded to master.

@@ -0,0 +1,35 @@
{
"citation": "FILL",
"description": "FILL",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to fill in the values that have FILL
Give a good description of the dataset

"description": "Electric power load at City Hall (1 City Hall Square) measured every 15 minutes."

Landing page for the dataset

"homepage": "https://data.boston.gov/dataset/city-hall-electricity-usage",

The link used to download the csv file

"url": "https://data.boston.gov/dataset/1b894599-21ff-478f-937d-653954977951/resource/f123e65d-dc0e-4c83-9348-ed46fec498c0/download/tmpvi7_mwih.csv"

"licenses": [ { ... "name": "PDDL"

"name": "FILL"
}
],
"name": "FILL",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of the dataset. This is usually the same as the file name with no extension and _replaced with - i.e boston-cityhall-electricity

"resources": [
{
"dialect": {},
"name": "tmp7mv7ycav",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name is that table name, we can give our table a better name. For example we could say consumption or usage, etc

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add "path":"tmp7mv7ycav.csv" in the resources. You can put that below 'name'

@henrykironde
Copy link
Contributor

@shivam7569
Copy link
Author

I have added the required information in the script. Sorry for multiple PRs, I realized it later that once you push from a branch on your forked repo to original repo, then from next time it automatically does that to the original repo. I hope I'm not being a big trouble. Thanks!

@@ -0,0 +1,36 @@
{
"citation": "Department of Innovation and Technology",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No citation in the data so we can leave that as, "citation": ""

"name": "Open Data Commons Public Domain Dedication and License (PDDL)"
}
],
"name": "boston-cityhall-electricity-usage",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you choose name boston-cityhall-electricity-usage
then the file should be named as boston_cityhall_electricity_usage.json

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have corrected the name of the file.

Copy link
Contributor

@henrykironde henrykironde Oct 1, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the _ vs - in file name

"citation": "Department of Innovation and Technology",
"description": "Electric power load at City Hall (1 City Hall Square) measured every 15 minutes. And it is continously updated.",
"homepage": "https://data.boston.gov/dataset/city-hall-electricity-usage",
"keywords": ["City Hall", "Demand", "Electricity", "Energy", "Load", "Meter", "Power"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Electricity", "Energy", "Boston" could be enough.

"name": "Open Data Commons Public Domain Dedication and License (PDDL)"
}
],
"name": "boston-cityhall-electricity-usage",
Copy link
Contributor

@henrykironde henrykironde Oct 1, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the _ vs - in file name

],
"retriever": "True",
"retriever_minimum_version": "2.1.0",
"title": "Boston-CityHall-Energy-Consumption",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Boston City Hall Electricity Usage

@henrykironde
Copy link
Contributor

@andy6975 Sorry lets keep the keywords as you had them before

@shivam7569
Copy link
Author

The name has been corrected. The tags have been left as they were before,

@henrykironde
Copy link
Contributor

@andy6975, this all looks good.
Now we need to change the dialect to add "," since the file is comma separated

            "dialect": {
                "delimiter": ","
            },

Also add a blank line after
https://github.com/weecology/retriever-recipes/pull/41/files#diff-164cd784c96a3b9261cc2896e039c194R36

Once you are done Run, python version.py with in the repo to update the version.txt file and push it to

@shivam7569
Copy link
Author

The following changes have been made:

  • The delimiter has been added.
  • A new line at the end of the script.
  • version.txt file has been updated

@henrykironde
Copy link
Contributor

You missed this. Boston-CityHall-Energy-Consumption > Boston City Hall Energy Consumption
After run retriever reset scripts this will delete the scripts in the ~/.retriever/scripts directory making your environment clean.

While you are still in this same repo, run retriever update and then python version.py
Since you are adding one script the version file will have only one line of change added

@shivam7569
Copy link
Author

shivam7569 commented Oct 1, 2019

I have changed the title. Sorry I didn't notice it before.
I ran the commands you ask me to and I read about them in the documentation too and this helped me understand more about the working of this project.

@henrykironde
Copy link
Contributor

The version file is still missing something,
Let us run pip install . -U in both the retriever and retriever-recipes repos.
Do a clean up of scripts retriever reset scripts, retriever update and
Then run python version.py in the retriever-recipes.
This may clean the version file.

@shivam7569
Copy link
Author

shivam7569 commented Oct 2, 2019

Hi, what change are we exactly looking for the version.txt file to show? As I read it, I think it's the file which has the names of all the available datasets and since we've added the boston electricity dataset, it should also has the name of this dataset, right? But I think you mean to see that difference in retriever repo too and not just retriever-recipes repo, right?

Base automatically changed from master to main February 11, 2021 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants