How does ee.Reducer.median() differ from just ee.ImageCollection.median() - Issues with a chart?Creating...

Is it possible to detect 100% of SQLi with a simple regex?

Using font-relative distances in tikzpictures

Confusion about different running times of two algorithms in C

Is there any danger of my neighbor having my wife's signature?

How can I use a Module anonymously as the function for /@?

Why do we interpret the accelerated expansion of the universe as the proof for the existence of dark energy?

Badly designed reimbursement form. What does that say about the company?

What does "don't have a baby" imply or mean in this sentence?

How to play songs that contain one guitar when we have two or more guitarists?

Was the Soviet N1 really capable of sending 9.6 GB/s of telemetry?

How can I portray body horror and still be sensitive to people with disabilities?

Aligning Systems of Equations

How do I avoid the "chosen hero" feeling?

Are there any spells or magic items that allow for making of ‘logic gates or wires’?

Are encryption algorithms with fixed-point free permutations inherently flawed?

Identical projects by students at two different colleges: still plagiarism?

Will linear voltage regulator step up current?

Why are "square law" devices important?

How many copper coins fit inside a cubic foot?

What is formjacking?

Why do we divide Permutations to get to Combinations?

Is layered encryption more secure than long passwords?

How can I make my enemies feel real and make combat more engaging?

What is the difference between crontab -e and nano /etc/crontab?



How does ee.Reducer.median() differ from just ee.ImageCollection.median() - Issues with a chart?


Creating chart from OpenLayers mapRotating Chart symbols with ArcMap dataframe?Creating Pie Chart with radius based on another field?Create Chart from Query Task?How to mosaic multiple MODIS images of Multiple months using MRT tool?Chart with multiple entiresGoogle Earth Engine, how to distinguish between rivers/streams and ponds/lakes in a water maskImage collection to Single Image in Google Earth EngineNDVI Scaling in Google Earth Engine?Wrong with adding time series in the same chart in Google Earth Engine













1















I am trying to create a chart that displays an image series from an Image Collection and there are two things that I do not understand:




  1. In the first part of the code that you will see below, I do not get what the difference is between .median() and using a reducer: ee.Reducer.median() while plotting the chart? Does using it twice have a difference?



  2. My chart is plotting more than 12 images when there are only 12 images in the imageCollection.



     var clipper = function(image){
    return image.clip(geometry);
    };


    // Load the MODIS data that is being processed

    var modis = ee.ImageCollection('MODIS/006/MOD09GQ').map(clipper);
    var months = ee.List.sequence(1,12);

    // Group by month, and then reduce within groups by mean();
    // the result is an ImageCollection with one image for each
    // month.

    //ee.ImageCollection.fromImages - essentially includes a list of images

    var byMonth = ee.ImageCollection.fromImages(
    months.map(function(m) {
    return modis.filter(ee.Filter.calendarRange(m, m, 'month'))
    .filterBounds(geometry)
    .median() // Unable to run this chunk of code without this function
    .set('month', m);
    }));

    print("Monthly Images Median",byMonth);

    print(ui.Chart.image.seriesByRegion({
    imageCollection: byMonth,
    regions: geometry,
    reducer: ee.Reducer.median(),
    band: 'sur_refl_b01',
    scale: 250,
    xProperty: 'system:index',
    seriesProperty: 'label'
    }));



The chart looks like this:



enter image description here










share|improve this question





























    1















    I am trying to create a chart that displays an image series from an Image Collection and there are two things that I do not understand:




    1. In the first part of the code that you will see below, I do not get what the difference is between .median() and using a reducer: ee.Reducer.median() while plotting the chart? Does using it twice have a difference?



    2. My chart is plotting more than 12 images when there are only 12 images in the imageCollection.



       var clipper = function(image){
      return image.clip(geometry);
      };


      // Load the MODIS data that is being processed

      var modis = ee.ImageCollection('MODIS/006/MOD09GQ').map(clipper);
      var months = ee.List.sequence(1,12);

      // Group by month, and then reduce within groups by mean();
      // the result is an ImageCollection with one image for each
      // month.

      //ee.ImageCollection.fromImages - essentially includes a list of images

      var byMonth = ee.ImageCollection.fromImages(
      months.map(function(m) {
      return modis.filter(ee.Filter.calendarRange(m, m, 'month'))
      .filterBounds(geometry)
      .median() // Unable to run this chunk of code without this function
      .set('month', m);
      }));

      print("Monthly Images Median",byMonth);

      print(ui.Chart.image.seriesByRegion({
      imageCollection: byMonth,
      regions: geometry,
      reducer: ee.Reducer.median(),
      band: 'sur_refl_b01',
      scale: 250,
      xProperty: 'system:index',
      seriesProperty: 'label'
      }));



    The chart looks like this:



    enter image description here










    share|improve this question



























      1












      1








      1








      I am trying to create a chart that displays an image series from an Image Collection and there are two things that I do not understand:




      1. In the first part of the code that you will see below, I do not get what the difference is between .median() and using a reducer: ee.Reducer.median() while plotting the chart? Does using it twice have a difference?



      2. My chart is plotting more than 12 images when there are only 12 images in the imageCollection.



         var clipper = function(image){
        return image.clip(geometry);
        };


        // Load the MODIS data that is being processed

        var modis = ee.ImageCollection('MODIS/006/MOD09GQ').map(clipper);
        var months = ee.List.sequence(1,12);

        // Group by month, and then reduce within groups by mean();
        // the result is an ImageCollection with one image for each
        // month.

        //ee.ImageCollection.fromImages - essentially includes a list of images

        var byMonth = ee.ImageCollection.fromImages(
        months.map(function(m) {
        return modis.filter(ee.Filter.calendarRange(m, m, 'month'))
        .filterBounds(geometry)
        .median() // Unable to run this chunk of code without this function
        .set('month', m);
        }));

        print("Monthly Images Median",byMonth);

        print(ui.Chart.image.seriesByRegion({
        imageCollection: byMonth,
        regions: geometry,
        reducer: ee.Reducer.median(),
        band: 'sur_refl_b01',
        scale: 250,
        xProperty: 'system:index',
        seriesProperty: 'label'
        }));



      The chart looks like this:



      enter image description here










      share|improve this question
















      I am trying to create a chart that displays an image series from an Image Collection and there are two things that I do not understand:




      1. In the first part of the code that you will see below, I do not get what the difference is between .median() and using a reducer: ee.Reducer.median() while plotting the chart? Does using it twice have a difference?



      2. My chart is plotting more than 12 images when there are only 12 images in the imageCollection.



         var clipper = function(image){
        return image.clip(geometry);
        };


        // Load the MODIS data that is being processed

        var modis = ee.ImageCollection('MODIS/006/MOD09GQ').map(clipper);
        var months = ee.List.sequence(1,12);

        // Group by month, and then reduce within groups by mean();
        // the result is an ImageCollection with one image for each
        // month.

        //ee.ImageCollection.fromImages - essentially includes a list of images

        var byMonth = ee.ImageCollection.fromImages(
        months.map(function(m) {
        return modis.filter(ee.Filter.calendarRange(m, m, 'month'))
        .filterBounds(geometry)
        .median() // Unable to run this chunk of code without this function
        .set('month', m);
        }));

        print("Monthly Images Median",byMonth);

        print(ui.Chart.image.seriesByRegion({
        imageCollection: byMonth,
        regions: geometry,
        reducer: ee.Reducer.median(),
        band: 'sur_refl_b01',
        scale: 250,
        xProperty: 'system:index',
        seriesProperty: 'label'
        }));



      The chart looks like this:



      enter image description here







      google-earth-engine modis chart






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 18 mins ago







      Vijay Ramesh

















      asked 27 mins ago









      Vijay RameshVijay Ramesh

      617220




      617220






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "79"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313120%2fhow-does-ee-reducer-median-differ-from-just-ee-imagecollection-median-issu%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313120%2fhow-does-ee-reducer-median-differ-from-just-ee-imagecollection-median-issu%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Щит и меч (фильм) Содержание Названия серий | Сюжет |...

          Венесуэла на летних Олимпийских играх 2000 Содержание Состав...

          Meter-Bus Содержание Параметры шины | Стандартизация |...