Comments (5)
We use station_id
in geoclim
functions. Is this different to station
?
from cdms.products.
In case it's useful, each of these examples mean something very specific in Python, especially when working with databases and using object relational mapping: station
would be an object (instance) that represented a row in the database with each database column as a property, e.g. station.name
, station.latitude
, ... , station.id
.
It's very common to have a variable called station_id
, of type Integer or String, that contains a value taken from a station.id
.
I would expect elements
and stations
to be collections containing multiple objects of type element
and station
respectively.
date_time
would be an instance of DateTime (a date with a time) whilst date
would be a Date object without a time.
from cdms.products.
Thanks @isedwards that's useful context.
In these functions, the first argument is a data frame and these extra arguments specify the column names in the data.
So I think keeping them short and simple would be good and in line with R best practice. So although they are strings specifying a column name, I don't think we should be adding something like _name
or _col
to all the arguments, although that would distinguish them more from "objects". It should be clear from the function signature and documentation that these are names of columns in data
.
On those specific names:
- I think I prefer
date_time
todate
because it will be a date with time in some cases element
if it's a single column andelements
if multiple columns can be givenstation
if it's a station identifying column name.
For functions where station
is used for facets, I prefer using station
because it could be either station_id
or station_name
.
For geoclim
the station_id
is required specifically. So I think that's the distinction.
Thanks for helping to get the consistency here @lilyclements
from cdms.products.
I think I prefer date_time to date because it will be a date with time in some cases
@dannyparsons should we have date_time
as the parameter name in functions where the function accepts a date-time
object, but doesn't necessarily make sense - e.g. dekad
, pentad
?
from cdms.products.
Yes that sounds good. Pretty much everywhere that we use a Date could also be a Date-time as we're generally using it to extract components or as a time series sequence, which could include a time component too.
from cdms.products.
Related Issues (20)
- Creates extremes function
- Refer to `naflex` package on CRAN HOT 1
- Add an example dataset to the package
- Export CDT Dekadal data HOT 6
- Package name HOT 3
- Only use names and function signatures that are also valid in Python HOT 8
- Discussion on using "tidy evaluation" or not for column names HOT 2
- The signature of `export_geoclim_month` is inconsistent with Python
- Bugs in the inventory_plot function HOT 1
- Make tests accessible on installed package HOT 3
- Bug when using elements in the climatic_summary function HOT 2
- Add test for climatic_summary when there's no summaries provided
- Errors in prepare_geoclim function HOT 2
- Add test for climatic_summary that contains a `summaries_params` parameter HOT 3
- "element" not recognized in Input (file_path = paste0("CDT-", element, ".csv")
- Incorrect column names from export_geoclim_month.R
- R functions to write tests on HOT 4
- Parameters ignored in `export_geoclim_dekad()` and `export_geoclim_pentad()` HOT 1
- Invalid tests in `test-histogram_plot.R`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cdms.products.