Comments (6)
The ‘export_cdt’ function works the same for dekadal as for daily etc so there won’t be any parameter changes, just calling the export_cdt function directly.
However am happy to do this still, and adding an additional check the data type is dekadal. Can do the same with daily data?
from cdms.products.
That's good they will work the same!
I think the difference will just be that for daily data the date
column will be the date for each day whereas for dekadal data this column will need to be in the format: 1999011, 1999012, 1999013, 1999021
etc. which is like the number of each dekad.
In the way that our dekad
function works currently this would need to be paste0(year, month, dekad)
to get this format since dekad
returns 1, 2, 3...
.
So I think we would just need to do this bit of pre-processing in the function. I think we keep it as one function with these options.
from cdms.products.
Sure. I assumed that the data in this function would have had the dekad function already applied.
So shall I change the “date” parameter to “type” (or whichever the parameter name is in the other _export function) and then it can read in a “date” variable for daily data, and the dekadal column for the dekad data.
from cdms.products.
Should it have a check in? If it works for any date format at the moment then a check might lose the functionality if, say, someone used pentad
from cdms.products.
Yes, a type = c("daily", "dekad")
argument would be good. The optional parameters date
, year
, month
, dekad
.
If type = "daily"
then only date
is required. The others are ignored. This is used for the output.
If type = "dekad"
then we need date
or year
, month
, dekad
. We make a new column paste0(year, month, dekad)
for use in the output. If only date
is provided we can create year
, month
, dekad
from it.
from cdms.products.
I'm not sure if CDT accepts formats other than daily and dekad, which is what Climsoft exports to. If other formats are possible, we can always add those later.
from cdms.products.
Related Issues (20)
- Creates extremes function
- Refer to `naflex` package on CRAN HOT 1
- Add an example dataset to the package
- Parameter names - consistency HOT 5
- 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.